Skip to content

Commit

Permalink
Bug fixing in clubfeet and separate
Browse files Browse the repository at this point in the history
Plus minor internal editing
  • Loading branch information
SimonaRighini committed Nov 19, 2019
1 parent c8f01e2 commit 66b638c
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 12 deletions.
6 changes: 3 additions & 3 deletions calibfit.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ pro calibresiduals, X,Y,datafit,Unit2,peak,err, x_peak, rasd, decsd, tipo, SNR,
off=(x_peak-decsd) ; degrees
end
1: begin
meanlat=decsd ; radians
off=(x_peak-rasd)*cos(meanlat) ; degrees
meanlat=decsd/180d*!dpi ; radians
off=(x_peak-rasd)*cos(decsd/180d*!dpi) ; degrees
end
endcase
n_off=1
Expand Down Expand Up @@ -65,7 +65,7 @@ pro calibfit, scanflag,stacflag,polyflag,section,tipo,allpath,namefile,Out3,flux
; Main procedure, devoted to the fitting operations, both in the linear and cubic cases, for targets.
;
; Authors: Marcello Giroletti, Simona Righini
; Last edited: Oct 5, 2017
; Last edited: Nov 19th, 2019
;

; scanflag = scan buono (=1) o cattivo (=0)
Expand Down
2 changes: 1 addition & 1 deletion findh0key.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pro findh0key, header, stringa, key, value, info, rflag
search=strmatch(header, stringa)
index=where(search eq 1)
sp=path_sep()
if index ne -1 and stringa eq '*Converted FITS*' then return
if index ne -1 and stringa eq '*Converted FITS*' then return
if index ne -1 and stringa eq '*Obtained from ESCS 0.1 TP FITS*' then return
if index ne -1 then begin
content=strsplit(header[index],'=',/extract)
Expand Down
44 changes: 38 additions & 6 deletions runcalib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pro runcalib, pickpath=pickpath, skypath=skypath, sub=sub, linear=linear, cubic=
;
; By default, the choice is 'both'.
;
; At present, graphic output is exceedingly slow, in particular for single subscans (if the /sub option is selected).
; Plot output in PDF is exceedingly slow, in particular for single subscans (if the /sub option is selected).
; So it is disabled by default.
; To enable it, explicitly set the option:
;
Expand Down Expand Up @@ -537,6 +537,14 @@ pro cal_stack, path=path, out=out, plot=plot, beam=beam, speed=speed, dt=dt, sou
calflux, strupcase(target), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'3C123RA': begin
calflux, strupcase('3C123'), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'3C123DEC': begin
calflux, strupcase('3C123'), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'3C147': begin
calflux, strupcase(target), freq/1000.0, intSnu, intSnu_err
method='P&B'
Expand All @@ -554,14 +562,38 @@ pro cal_stack, path=path, out=out, plot=plot, beam=beam, speed=speed, dt=dt, sou
calflux, strupcase(target), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'3C286RA': begin
calflux, strupcase('3C286'), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'3C286DEC': begin
calflux, strupcase('3C286'), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'3C295': begin
calflux, strupcase(target), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'3C295RA': begin
calflux, strupcase('3C295'), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'3C295DEC': begin
calflux, strupcase('3C295'), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'NGC7027': begin
calflux, strupcase(target), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'NGC7027RA': begin
calflux, strupcase('NGC7027'), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'NGC7027DEC': begin
calflux, strupcase('NGC7027'), freq/1000.0, intSnu, intSnu_err
method='P&B'
end
'DR21': begin
a=1.810
b=-0.122
Expand All @@ -579,39 +611,39 @@ pro cal_stack, path=path, out=out, plot=plot, beam=beam, speed=speed, dt=dt, sou
flux=10^(a+b*alog10(freq)+c*alog10(freq)*alog10(freq))
method='CustomSRC'
end
'CAL01': begin
'CAL100': begin
; fake source for tests, having flux density=0.1 Jy
a=-1.00
b=0.00
c=0.00
flux=10^(a+b*alog10(freq)+c*alog10(freq)*alog10(freq))
method='CustomSRC'
end
'CAL05': begin
'CAL0500': begin
; fake source for tests, having flux density=0.5 Jy
a=-0.301030
b=0.00
c=0.00
flux=10^(a+b*alog10(freq)+c*alog10(freq)*alog10(freq))
method='CustomSRC'
end
'CAL1': begin
'CAL1000': begin
; fake source for tests, having flux density=1 Jy
a=0.00
b=0.00
c=0.00
flux=10^(a+b*alog10(freq)+c*alog10(freq)*alog10(freq))
method='CustomSRC'
end
'CAL2': begin
'CAL2000': begin
; fake source for tests, having flux density=2 Jy
a=0.30103
b=0.00
c=0.00
flux=10^(a+b*alog10(freq)+c*alog10(freq)*alog10(freq))
method='CustomSRC'
end
'CAL3': begin
'CAL3000': begin
; fake source for tests, having flux density=3 Jy
a=0.4771212
b=0.00
Expand Down
2 changes: 1 addition & 1 deletion runtarget.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pro runtarget, pickpath=pickpath, skypath=skypath, sub=sub, linear=linear, cubic
;
; By default, the choice is 'both'.
;
; At present, graphic output is exceedingly slow, in particular for single subscans (if the /sub option is selected).
; Plot output in PDF is exceedingly slow, in particular for single subscans (if the /sub option is selected).
; So it is disabled by default.
; To enable it, explicitly set the option:
;
Expand Down
2 changes: 1 addition & 1 deletion separate.pro
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pro separate, multiK=multiK, extlist=extlist
; directing the file to the proper location
type='TARGETS'+sp ; default choice

checkcal=where(target eq calname, isitcal)
checkcal=where(strupcase(target) eq calname, isitcal)
if isitcal ne 0 then begin
type = 'CALIBRATORS'+sp ; overriding the default choice: the source is a calibrator
if subsubnum eq 2 then begin ; to handle cases when SKYDIPS have been mis-named
Expand Down

0 comments on commit 66b638c

Please sign in to comment.