diff --git a/src/idl/dustem_set_plot_range.pro b/src/idl/dustem_set_plot_range.pro index 475bf19..9f1c277 100644 --- a/src/idl/dustem_set_plot_range.pro +++ b/src/idl/dustem_set_plot_range.pro @@ -3,17 +3,23 @@ PRO dustem_set_plot_range,test_m,test_x,_extra=_extra,help=help ;+ ; NAME: ; dustem_set_plot_range +; ; PURPOSE: ; Sets the X and Y plotting ranges for the different datasets in emission and extinction when in polarization mode and not (using the _extra structure). +; ; CATEGORY: ; DustEMWrap +; ; CALLING SEQUENCE: ; dustem_set_plot_range,test_m,test_x,_extra=_extra +; ; INPUTS: ; test_m : (Boolean) signaling emission mode ; test_x : (Boolean) signaling extinction mode +; ; OPTIONAL INPUT PARAMETERS: ; _extra structure containing the plotting keywords +; ; OUTPUTS: ; NONE ; OPTIONAL OUTPUT PARAMETERS: @@ -78,7 +84,7 @@ IF keyword_set(_extra) THEN BEGIN STRUPCASE(strmid(tgnms_extra,8,/reverse_offset)) NE '_EMISSION'),ctestyr) ;(strsplit(tgnms_extra,'_')) NE [0],ctestyr) - if ctestyr ne 0 then message, 'You have provided one Y-range when multiple ones may be provided.', /continue + if ctestyr le 1 then message, 'You have provided one Y-range when multiple ones may be provided.', /continue idyr_polsed = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ STRUPCASE(strmid(tgnms_extra,5,/reverse_offset)) EQ 'POLSED',ctyr_polsed) @@ -219,7 +225,7 @@ IF keyword_set(_extra) THEN BEGIN STRUPCASE(strmid(tgnms_extra,10,/reverse_offset)) NE '_EXTINCTION'),ctestyr) ; - if ctestyr ne 0 then message, 'You have provided one Y-range when multiple Y-ranges may be provided.',/continue + if ctestyr le 1 then message, 'You have provided one Y-range when multiple Y-ranges may be provided.',/continue idyr_polext = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ @@ -345,7 +351,6 @@ IF keyword_set(_extra) THEN BEGIN IF !run_pol THEN BEGIN ;SEVERAL DATA SETS: THE SED DASHBOARD & EXT DASHBOARD - tstxr = strupcase(tgnms_extra) EQ 'XRANGE' or $ strupcase(tgnms_extra) EQ 'XR' or $ (strmid(strupcase(tgnms_extra),0,2) EQ 'XR' and $ @@ -359,7 +364,7 @@ IF keyword_set(_extra) THEN BEGIN idxr = where(tstxr,ctestxr) - if ctestxr ne 0 then message, 'You have provided one X-range when multiple ones may be needed',/continue + if ctestxr le 1 then message, 'You have provided one X-range when multiple ones may be needed',/continue t_m = (strmid(strupcase(tgnms_extra),0,1) EQ 'X' and $ STRUPCASE(strmid(tgnms_extra,1,/reverse_offset)) EQ '_M') or $ @@ -398,7 +403,7 @@ IF keyword_set(_extra) THEN BEGIN (strmid(strupcase(tgnms_extra),0,2) EQ 'YR' and tst and $ STRUPCASE(strmid(tgnms_extra,10,/reverse_offset)) NE '_EXTINCTION'),ctestyr) ; - if ctestyr ne 0 then message, 'You have provided one Y-range when multiple ones are needed.',/continue + if ctestyr le 1 then message, 'You have provided one Y-range when multiple ones are needed.',/continue ;EMISSION idyr_polsed = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ @@ -461,7 +466,7 @@ IF keyword_set(_extra) THEN BEGIN idtit = where(testit, ctit) - if ctit ne 0 then message, 'You have provivded one title when two (emission + extinctino are needed).', /continue + if ctit le 1 then message, 'You have provided one title when two (emission + extinction are needed).', /continue idtit_m = where((strmid(strupcase(tgnms_extra),0,1) EQ 'T' and $ STRUPCASE(strmid(tgnms_extra,1,/reverse_offset)) EQ '_M') or $ @@ -554,7 +559,7 @@ IF keyword_set(_extra) THEN BEGIN ENDIF ELSE BEGIN ;TWO DATA SETS : EXT AND SED - + tstxr = strupcase(tgnms_extra) EQ 'XRANGE' or $ strupcase(tgnms_extra) EQ 'XR' or $ (strmid(strupcase(tgnms_extra),0,2) EQ 'XR' and $ @@ -568,14 +573,14 @@ IF keyword_set(_extra) THEN BEGIN idxr = where(tstxr,ctestxr) - if ctestxr ne 0 then message, 'You have provided one X-range when multiple ones are needed',/continue + if ctestxr le 1 then message, 'You have provided one X-range when multiple ones are needed',/continue t_m = (strmid(strupcase(tgnms_extra),0,1) EQ 'X' and $ STRUPCASE(strmid(tgnms_extra,1,/reverse_offset)) EQ '_M') or $ (strmid(strupcase(tgnms_extra),0,1) EQ 'X' and $ STRUPCASE(strmid(tgnms_extra,8,/reverse_offset)) EQ '_EMISSION') - indxr_m = where(t_m,ctestxr_m) + idxr_m = where(t_m,ctestxr_m) @@ -599,7 +604,7 @@ IF keyword_set(_extra) THEN BEGIN (strmid(strupcase(tgnms_extra),0,2) EQ 'YR' and $ STRUPCASE(strmid(tgnms_extra,10,/reverse_offset)) NE '_EXTINCTION'),ctestyr) ; - if ctestyr ne 0 then message, 'You have provided one Y-range when multiple ones are needed.',/continue + if ctestyr le 1 then message, 'You have provided one Y-range when multiple ones are needed.',/continue @@ -608,7 +613,7 @@ IF keyword_set(_extra) THEN BEGIN (strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ STRUPCASE(strmid(tgnms_extra,8,/reverse_offset)) EQ '_EMISSION') - indyr_m = where(t_m,ctestxr_m) + idyr_m = where(t_m,ctestyr_m) t_x = (strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ STRUPCASE(strmid(tgnms_extra,1,/reverse_offset)) EQ '_X') or $ @@ -632,7 +637,7 @@ IF keyword_set(_extra) THEN BEGIN idtit = where(testit, ctit) - if ctit ne 0 then message, 'You have provivded one title when two (emission + extinctino are needed).', /continue + if ctit le 1 then message, 'You have provided one title when two (emission + extinction are needed).', /continue idtit_m = where((strmid(strupcase(tgnms_extra),0,1) EQ 'T' and $ STRUPCASE(strmid(tgnms_extra,1,/reverse_offset)) EQ '_M') or $ @@ -645,13 +650,10 @@ IF keyword_set(_extra) THEN BEGIN (strmid(strupcase(tgnms_extra),0,1) EQ 'T' and $ STRUPCASE(strmid(tgnms_extra,10,/reverse_offset)) EQ '_EXTINCTION'),ctit_x) - - ;FILLING UP X ranges (same xrange): EMISSION IF ctestxr_m ne 0 THEN !dustem_plot_range.(0).xr=_extra.(idxr_m(0)) - ;FILLING UP X ranges (same xrange) - EXTINCTION IF ctestxr_x ne 0 THEN !dustem_plot_range.(6).xr=_extra.(idxr_x(0)) -- libgit2 0.21.2