Commit 1e2792b7 authored by Carl Schaffer's avatar Carl Schaffer
Browse files

adding check for existence of calibration file

parent 811d7aee
......@@ -3,6 +3,13 @@ pro get_calib_v7,filecal,dmod1,dmod2,data=data,lambda=lambda,zbad=zbad,$
flat1=flat1,flat2=flat2,timeflat1=timeff1,timeflat2=timeff2,cdelta=cdelta,$
telcal_offset=telcal_offset,inscal_offset=inscal_offset
; verify calibration file exists, exit with error code if not
fies = file_search(filecal, count = cnt)
if(cnt eq 0) then begin
print, "Calibration file "+filecal+" not found!"
exit,status=1
endif
if(keyword_set(plot) eq 1) then plot=1 else plot=0
if(keyword_set(cdelta) eq 0) then cdelta=0.
if(keyword_set(telcal_offset) eq 0) then telcal_offset=0.
......@@ -14,7 +21,7 @@ pro get_calib_v7,filecal,dmod1,dmod2,data=data,lambda=lambda,zbad=zbad,$
for j=2,8 do dc=dc+rfits_im(filecal,j,/badp)
dc=dc/8.
tam=size(dc)
date=param_fits(hdr,'DATE-OBS=',delimiter='-',vartype=1)
dum=date[0]
date[0]=date[2]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment