Commit d9fcbbc3ad91e202d8b1e3cd6bad6341b18257f2

Authored by Annie Hughes
1 parent 3d7409a3
Exists in master

fixed logic for large dashboard plots

Showing 1 changed file with 17 additions and 15 deletions   Show diff stats
src/idl/dustem_set_plot_range.pro
... ... @@ -3,17 +3,23 @@ PRO dustem_set_plot_range,test_m,test_x,_extra=_extra,help=help
3 3 ;+
4 4 ; NAME:
5 5 ; dustem_set_plot_range
  6 +;
6 7 ; PURPOSE:
7 8 ; 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).
  9 +;
8 10 ; CATEGORY:
9 11 ; DustEMWrap
  12 +;
10 13 ; CALLING SEQUENCE:
11 14 ; dustem_set_plot_range,test_m,test_x,_extra=_extra
  15 +;
12 16 ; INPUTS:
13 17 ; test_m : (Boolean) signaling emission mode
14 18 ; test_x : (Boolean) signaling extinction mode
  19 +;
15 20 ; OPTIONAL INPUT PARAMETERS:
16 21 ; _extra structure containing the plotting keywords
  22 +;
17 23 ; OUTPUTS:
18 24 ; NONE
19 25 ; OPTIONAL OUTPUT PARAMETERS:
... ... @@ -78,7 +84,7 @@ IF keyword_set(_extra) THEN BEGIN
78 84 STRUPCASE(strmid(tgnms_extra,8,/reverse_offset)) NE '_EMISSION'),ctestyr) ;(strsplit(tgnms_extra,'_')) NE [0],ctestyr)
79 85  
80 86  
81   - if ctestyr ne 0 then message, 'You have provided one Y-range when multiple ones may be provided.', /continue
  87 + if ctestyr le 1 then message, 'You have provided one Y-range when multiple ones may be provided.', /continue
82 88  
83 89 idyr_polsed = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $
84 90 STRUPCASE(strmid(tgnms_extra,5,/reverse_offset)) EQ 'POLSED',ctyr_polsed)
... ... @@ -219,7 +225,7 @@ IF keyword_set(_extra) THEN BEGIN
219 225 STRUPCASE(strmid(tgnms_extra,10,/reverse_offset)) NE '_EXTINCTION'),ctestyr) ;
220 226  
221 227  
222   - if ctestyr ne 0 then message, 'You have provided one Y-range when multiple Y-ranges may be provided.',/continue
  228 + if ctestyr le 1 then message, 'You have provided one Y-range when multiple Y-ranges may be provided.',/continue
223 229  
224 230  
225 231 idyr_polext = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $
... ... @@ -345,7 +351,6 @@ IF keyword_set(_extra) THEN BEGIN
345 351  
346 352 IF !run_pol THEN BEGIN ;SEVERAL DATA SETS: THE SED DASHBOARD & EXT DASHBOARD
347 353  
348   -
349 354 tstxr = strupcase(tgnms_extra) EQ 'XRANGE' or $
350 355 strupcase(tgnms_extra) EQ 'XR' or $
351 356 (strmid(strupcase(tgnms_extra),0,2) EQ 'XR' and $
... ... @@ -359,7 +364,7 @@ IF keyword_set(_extra) THEN BEGIN
359 364  
360 365 idxr = where(tstxr,ctestxr)
361 366  
362   - if ctestxr ne 0 then message, 'You have provided one X-range when multiple ones may be needed',/continue
  367 + if ctestxr le 1 then message, 'You have provided one X-range when multiple ones may be needed',/continue
363 368  
364 369 t_m = (strmid(strupcase(tgnms_extra),0,1) EQ 'X' and $
365 370 STRUPCASE(strmid(tgnms_extra,1,/reverse_offset)) EQ '_M') or $
... ... @@ -398,7 +403,7 @@ IF keyword_set(_extra) THEN BEGIN
398 403 (strmid(strupcase(tgnms_extra),0,2) EQ 'YR' and tst and $
399 404 STRUPCASE(strmid(tgnms_extra,10,/reverse_offset)) NE '_EXTINCTION'),ctestyr) ;
400 405  
401   - if ctestyr ne 0 then message, 'You have provided one Y-range when multiple ones are needed.',/continue
  406 + if ctestyr le 1 then message, 'You have provided one Y-range when multiple ones are needed.',/continue
402 407  
403 408 ;EMISSION
404 409 idyr_polsed = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $
... ... @@ -461,7 +466,7 @@ IF keyword_set(_extra) THEN BEGIN
461 466  
462 467 idtit = where(testit, ctit)
463 468  
464   - if ctit ne 0 then message, 'You have provivded one title when two (emission + extinctino are needed).', /continue
  469 + if ctit le 1 then message, 'You have provided one title when two (emission + extinction are needed).', /continue
465 470  
466 471 idtit_m = where((strmid(strupcase(tgnms_extra),0,1) EQ 'T' and $
467 472 STRUPCASE(strmid(tgnms_extra,1,/reverse_offset)) EQ '_M') or $
... ... @@ -554,7 +559,7 @@ IF keyword_set(_extra) THEN BEGIN
554 559  
555 560  
556 561 ENDIF ELSE BEGIN ;TWO DATA SETS : EXT AND SED
557   -
  562 +
558 563 tstxr = strupcase(tgnms_extra) EQ 'XRANGE' or $
559 564 strupcase(tgnms_extra) EQ 'XR' or $
560 565 (strmid(strupcase(tgnms_extra),0,2) EQ 'XR' and $
... ... @@ -568,14 +573,14 @@ IF keyword_set(_extra) THEN BEGIN
568 573  
569 574 idxr = where(tstxr,ctestxr)
570 575  
571   - if ctestxr ne 0 then message, 'You have provided one X-range when multiple ones are needed',/continue
  576 + if ctestxr le 1 then message, 'You have provided one X-range when multiple ones are needed',/continue
572 577  
573 578 t_m = (strmid(strupcase(tgnms_extra),0,1) EQ 'X' and $
574 579 STRUPCASE(strmid(tgnms_extra,1,/reverse_offset)) EQ '_M') or $
575 580 (strmid(strupcase(tgnms_extra),0,1) EQ 'X' and $
576 581 STRUPCASE(strmid(tgnms_extra,8,/reverse_offset)) EQ '_EMISSION')
577 582  
578   - indxr_m = where(t_m,ctestxr_m)
  583 + idxr_m = where(t_m,ctestxr_m)
579 584  
580 585  
581 586  
... ... @@ -599,7 +604,7 @@ IF keyword_set(_extra) THEN BEGIN
599 604 (strmid(strupcase(tgnms_extra),0,2) EQ 'YR' and $
600 605 STRUPCASE(strmid(tgnms_extra,10,/reverse_offset)) NE '_EXTINCTION'),ctestyr) ;
601 606  
602   - if ctestyr ne 0 then message, 'You have provided one Y-range when multiple ones are needed.',/continue
  607 + if ctestyr le 1 then message, 'You have provided one Y-range when multiple ones are needed.',/continue
603 608  
604 609  
605 610  
... ... @@ -608,7 +613,7 @@ IF keyword_set(_extra) THEN BEGIN
608 613 (strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $
609 614 STRUPCASE(strmid(tgnms_extra,8,/reverse_offset)) EQ '_EMISSION')
610 615  
611   - indyr_m = where(t_m,ctestxr_m)
  616 + idyr_m = where(t_m,ctestyr_m)
612 617  
613 618 t_x = (strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $
614 619 STRUPCASE(strmid(tgnms_extra,1,/reverse_offset)) EQ '_X') or $
... ... @@ -632,7 +637,7 @@ IF keyword_set(_extra) THEN BEGIN
632 637  
633 638 idtit = where(testit, ctit)
634 639  
635   - if ctit ne 0 then message, 'You have provivded one title when two (emission + extinctino are needed).', /continue
  640 + if ctit le 1 then message, 'You have provided one title when two (emission + extinction are needed).', /continue
636 641  
637 642 idtit_m = where((strmid(strupcase(tgnms_extra),0,1) EQ 'T' and $
638 643 STRUPCASE(strmid(tgnms_extra,1,/reverse_offset)) EQ '_M') or $
... ... @@ -645,13 +650,10 @@ IF keyword_set(_extra) THEN BEGIN
645 650 (strmid(strupcase(tgnms_extra),0,1) EQ 'T' and $
646 651 STRUPCASE(strmid(tgnms_extra,10,/reverse_offset)) EQ '_EXTINCTION'),ctit_x)
647 652  
648   -
649   -
650 653 ;FILLING UP X ranges (same xrange): EMISSION
651 654  
652 655 IF ctestxr_m ne 0 THEN !dustem_plot_range.(0).xr=_extra.(idxr_m(0))
653 656  
654   -
655 657 ;FILLING UP X ranges (same xrange) - EXTINCTION
656 658  
657 659 IF ctestxr_x ne 0 THEN !dustem_plot_range.(6).xr=_extra.(idxr_x(0))
... ...