Commit ed89a46e authored by Gonzalez, Miguel's avatar Gonzalez, Miguel

Change to avoid possible errors if datp.other_tit does not exist.

parent 88cfcb2f
......@@ -50,8 +50,11 @@ pasp = 1
if n_elements(datp) eq 0 then take_datp, datp else pasp = 0
; Detector distance
inst = strlowcase((strsplit(datp.other_tit, /extract))[0])
if n_elements(e_d) eq 1 then r = e_d else begin
inst = ''
tags = tag_names(datp)
idx = where(tags eq 'OTHER_TIT', found)
if found then inst = strlowcase((strsplit(datp.other_tit, /extract))[0])
case inst of
'd2b': r = 130.0
'salsa': r = 100.0
......@@ -69,7 +72,7 @@ if n_elements(e_d) eq 1 then r = e_d else begin
end
endcase
endelse
lamp_journal, 'Starting straight_2d for ' + inst + ' with r = ' + string(r)
lamp_journal, 'Starting straight_2d with r = ' + string(r)
if (size(win))[0] eq 3 then kz = (size(win))[3]-1 else kz = 0
......
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