Commit 9cb38725ff7fb3631f596c00151cfbec13561a88

Authored by Ilyes Choubani
1 parent 2df3360b
Exists in master

Fixed tests related to display. Moving on...

Showing 2 changed files with 230 additions and 207 deletions   Show diff stats
src/idl/dustem_plot_mlog.pro
... ... @@ -78,12 +78,12 @@ IF countpos NE 0 THEN BEGIN
78 78 IF not keyword_set(negative_only) THEN BEGIN
79 79 pos=pp[*,0]
80 80 ;if keyword_set(color) then _extrabis.color=color
81   -
  81 + stop
82 82 if keyword_set(overplot) then begin
83 83 FOR k=0L,count_pos_regions-1 DO BEGIN
84 84  
85 85 if keyword_set(rms) then begin ;Should this be combined with the overplot command?
86   - cgerrplot,x[df_pos[k,0]:df_pos[k,1]],y[df_pos[k,0]:df_pos[k,1]]-rms,y[df_pos[k,0]:df_pos[k,1]]+rms,color=color;,_extra=_extra
  86 + cgerrplot,x[df_pos[k,0]:df_pos[k,1]],y[df_pos[k,0]:df_pos[k,1]]-rms[df_pos[k,0]:df_pos[k,1]],y[df_pos[k,0]:df_pos[k,1]]+rms[df_pos[k,0]:df_pos[k,1]],color=color;,_extra=_extra
87 87 endif else cgoplot,x[df_pos[k,0]:df_pos[k,1]],y[df_pos[k,0]:df_pos[k,1]],color=color,_extra=_extra
88 88  
89 89 ENDFOR
... ... @@ -92,7 +92,7 @@ IF countpos NE 0 THEN BEGIN
92 92  
93 93  
94 94 if keyword_set(nodata) then begin
95   - cgplot,x[indpos],y[indpos],pos=pos,xs=1,yr=yr,noerase=1,xcharsize=xcharsize[0],ycharsize=ycharsize[0],/ylog,/nodata,ytickformat='dstmwrp_exp',_extra=_extra
  95 + cgplot,x[indpos],y[indpos],pos=pos,xs=1,yr=yr,noerase=1,xcharsize=xcharsize[0],ycharsize=ycharsize[0],/ylog,/nodata,color=color,ytickformat='dstmwrp_exp',_extra=_extra
96 96 endif else begin
97 97 cgplot,x[indpos],y[indpos],pos=pos,xs=1,yr=yr,noerase=1,xcharsize=xcharsize[0],ycharsize=ycharsize[0],/ylog,color=color,ytickformat='dstmwrp_exp',_extra=_extra
98 98 endelse
... ... @@ -123,7 +123,7 @@ IF countneg NE 0 THEN BEGIN
123 123 FOR k=0L,count_neg_regions-1 DO BEGIN
124 124  
125 125 if keyword_set(rms) then begin ;Should this be combined with the overplot command?
126   - cgerrplot,x[df_neg[k,0]:df_neg[k,1]],-1*y[df_neg[k,0]:df_neg[k,1]]+rms,-1*y[df_neg[k,0]:df_neg[k,1]]-rms,color=color;,ytickformat='(A)'
  126 + cgerrplot,x[df_neg[k,0]:df_neg[k,1]],-1*y[df_neg[k,0]:df_neg[k,1]]-rms[df_neg[k,0]:df_neg[k,1]],-1*y[df_neg[k,0]:df_neg[k,1]]+rms[df_neg[k,0]:df_neg[k,1]],color=color;,ytickformat='(A)'
127 127 ;color by default otherwise it's _extra supercedes. Let's see how this reacts to the plotting of U
128 128 endif else cgoplot,x[df_neg[k,0]:df_neg[k,1]],-1.*y[df_neg[k,0]:df_neg[k,1]],color=color,_extra=_extra
129 129  
... ... @@ -133,9 +133,9 @@ IF countneg NE 0 THEN BEGIN
133 133  
134 134 !dustem_mlog=1
135 135 if keyword_set(nodata) then begin
136   - cgplot,x[indneg],-1.*y[indneg],pos=pos,xs=1,noerase=1,xcharsize=xcharsize[1],ycharsize=ycharsize[1],/ylog,/nodata,yrange=new_yrange,ytickformat='dstmwrp_exp',_extra=_extrabis
  136 + cgplot,x[indneg],-1.*y[indneg],pos=pos,xs=1,noerase=1,xcharsize=xcharsize[1],ycharsize=ycharsize[1],/ylog,color=color,/nodata,yrange=new_yrange,ytickformat='dstmwrp_exp',_extra=_extrabis
137 137 endif else begin
138   - cgplot,x[indneg],-1.*y[indneg],pos=pos,xs=1,noerase=1,xcharsize=xcharsize[1],ycharsize=ycharsize[1],/ylog,yrange=new_yrange,ytickformat='dstmwrp_exp',_extra=_extrabis
  138 + cgplot,x[indneg],-1.*y[indneg],pos=pos,xs=1,noerase=1,xcharsize=xcharsize[1],ycharsize=ycharsize[1],/ylog,color=color,yrange=new_yrange,ytickformat='dstmwrp_exp',_extra=_extrabis
139 139 endelse
140 140 !dustem_mlog=0
141 141 endelse
... ...
src/idl/dustemcgwin_dataset.pro
... ... @@ -563,6 +563,7 @@ if keyword_set(dataset) then begin
563 563  
564 564  
565 565 ;Spectrum points are treated before for plotting reasons.
  566 +
566 567 if ct_spec ne 0 then begin
567 568  
568 569 ;Plotting of spectrum data points (to be fitted)
... ... @@ -602,8 +603,6 @@ if keyword_set(dataset) then begin
602 603 idx_spec_hdn = where(((*!dustem_show.polfrac).filt_names)(idx_rmv_polfrac) EQ 'SPECTRUM',ct_spec_hdn)
603 604 if ct_hdnpts ne 0 then begin ;Hidden data points are present
604 605 ;stop
605   -
606   -
607 606  
608 607 if ct_spec_hdn ne 0 then begin
609 608 ;Plotting of hidden spectrum data points
... ... @@ -807,6 +806,7 @@ if keyword_set(dataset) then begin
807 806 match2,((*!dustem_data.qsed).wav),((*!dustem_show.qsed).wav),fit_sedpts,show_sedpts ;only show_sedpts is needed
808 807 idx_rmv_sed=where(show_sedpts eq -1, ct_hdnpts) ; indices of the points to hide
809 808  
  809 + stop
810 810  
811 811 ;#1) get the plotting keywords (pertaining to each data set) @here when the _extra structure is ready
812 812  
... ... @@ -962,39 +962,47 @@ if keyword_set(dataset) then begin
962 962 ;SADLY I STILL DON'T HAVE A SOLUTION FOR THE PLOTTING OF NULL VALUES.
963 963 ;idx_filt_hdn = where(((*!dustem_show.qsed).filt_names)(idx_rmv_sed) NE 'SPECTRUM',ct_filt_hdn)
964 964 ;idx_spec_hdn = where(((*!dustem_show.qsed).filt_names)(idx_rmv_sed) EQ 'SPECTRUM',ct_spec_hdn)
965   - idx_filt_hdn_pstv = where(((*!dustem_show.qsed).filt_names)(idx_rmv_sed) NE 'SPECTRUM' and ((*!dustem_show.qsed).values)(idx_rmv_sed) gt 0,ct_filt_hdn_pstv)
966   - idx_spec_hdn_pstv = where(((*!dustem_show.qsed).filt_names)(idx_rmv_sed) EQ 'SPECTRUM' and ((*!dustem_show.qsed).values)(idx_rmv_sed) gt 0,ct_spec_hdn_pstv)
967   - idx_filt_hdn_ngtv = where(((*!dustem_show.qsed).filt_names)(idx_rmv_sed) NE 'SPECTRUM' and ((*!dustem_show.qsed).values)(idx_rmv_sed) lt 0,ct_filt_hdn_ngtv)
968   - idx_spec_hdn_ngtv = where(((*!dustem_show.qsed).filt_names)(idx_rmv_sed) EQ 'SPECTRUM' and ((*!dustem_show.qsed).values)(idx_rmv_sed) lt 0,ct_spec_hdn_ngtv)
969   - ;endif
  965 + if ct_hdnpts then begin
  966 + idx_filt_hdn_pstv = where(((*!dustem_show.qsed).filt_names)(idx_rmv_sed) NE 'SPECTRUM' and ((*!dustem_show.qsed).values)(idx_rmv_sed) gt 0,ct_filt_hdn_pstv)
  967 + idx_spec_hdn_pstv = where(((*!dustem_show.qsed).filt_names)(idx_rmv_sed) EQ 'SPECTRUM' and ((*!dustem_show.qsed).values)(idx_rmv_sed) gt 0,ct_spec_hdn_pstv)
  968 + idx_filt_hdn_ngtv = where(((*!dustem_show.qsed).filt_names)(idx_rmv_sed) NE 'SPECTRUM' and ((*!dustem_show.qsed).values)(idx_rmv_sed) lt 0,ct_filt_hdn_ngtv)
  969 + idx_spec_hdn_ngtv = where(((*!dustem_show.qsed).filt_names)(idx_rmv_sed) EQ 'SPECTRUM' and ((*!dustem_show.qsed).values)(idx_rmv_sed) lt 0,ct_spec_hdn_ngtv)
  970 + endif
970 971  
971 972  
972 973 if keyword_set(positive_only) then begin
973 974 ;stop
974 975 if testpstv ne 0 then begin
975 976 ;stop
976   - plotsym, 0
977   - if ct_spec_hdn_pstv ne 0 then begin
978   - xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_spec_hdn_pstv)
979   - yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_spec_hdn_pstv)
980   - rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_spec_hdn_pstv)/2.
981   -
982   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
983   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
984   -
985   - endif
  977 + ;plotsym, 0
986 978  
987   - if ct_filt_hdn_pstv ne 0 then begin
  979 + if ct_hdnpts then begin
988 980  
989   - xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_filt_hdn_pstv)
990   - yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_filt_hdn_pstv)
991   - rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_filt_hdn_pstv)/2.
  981 + if ct_spec_hdn_pstv ne 0 then begin
  982 + xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_spec_hdn_pstv)
  983 + yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_spec_hdn_pstv)
  984 + rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_spec_hdn_pstv)/2.
  985 +
  986 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  987 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
  988 +
  989 + endif
  990 +
  991 + if ct_filt_hdn_pstv ne 0 then begin
  992 +
  993 + xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_filt_hdn_pstv)
  994 + yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_filt_hdn_pstv)
  995 + rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_filt_hdn_pstv)/2.
  996 +
  997 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  998 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
  999 +
  1000 + endif
992 1001  
993   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
994   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
995   -
996 1002 endif
997 1003  
  1004 +
  1005 +
998 1006 if ct_spec ne 0 then begin
999 1007  
1000 1008 rms=3.*((*!dustem_data.qsed).sigma)(idx_spec)/2.
... ... @@ -1014,78 +1022,84 @@ if keyword_set(dataset) then begin
1014 1022 endif
1015 1023 endif else begin
1016 1024  
1017   - if ct_spec_hdn_pstv ne 0 then begin
1018   - xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_spec_hdn_pstv)
1019   - yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_spec_hdn_pstv)
1020   - rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_spec_hdn_pstv)/2.
1021   -
1022   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1023   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1024   -
1025   - endif
  1025 + if ct_hdnpts then begin
1026 1026  
1027   - if ct_filt_hdn_pstv ne 0 then begin
1028   -
1029   - xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_filt_hdn_pstv)
1030   - yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_filt_hdn_pstv)
1031   - rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_filt_hdn_pstv)/2.
  1027 + if ct_spec_hdn_pstv ne 0 then begin
  1028 + xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_spec_hdn_pstv)
  1029 + yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_spec_hdn_pstv)
  1030 + rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_spec_hdn_pstv)/2.
  1031 +
  1032 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1033 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1032 1034  
1033   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1034   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
1035   -
1036   - endif
1037   -
1038   - if ct_spec_hdn_pstv eq 0 and ct_filt_hdn_pstv eq 0 then begin
  1035 + endif
  1036 +
  1037 + if ct_filt_hdn_pstv ne 0 then begin
1039 1038  
1040   - if ct_spec ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_spec),-((*!dustem_data.qsed).values)(idx_spec),ppositions=position,charsize=1.15,/nodata,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1039 + xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_filt_hdn_pstv)
  1040 + yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_filt_hdn_pstv)
  1041 + rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_filt_hdn_pstv)/2.
1041 1042  
  1043 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1044 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
1042 1045  
1043   - if ct_filt ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_filt),-((*!dustem_data.qsed).values)(idx_filt),/nodata,ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1046 + endif
  1047 +
  1048 + if ct_spec_hdn_pstv eq 0 and ct_filt_hdn_pstv eq 0 then begin
1044 1049  
1045   -
1046   - endif
  1050 + if ct_spec ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_spec),-((*!dustem_data.qsed).values)(idx_spec),ppositions=position,charsize=1.15,/nodata,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1051 +
  1052 +
  1053 + if ct_filt ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_filt),-((*!dustem_data.qsed).values)(idx_filt),/nodata,ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1054 +
1047 1055  
  1056 + endif
  1057 + endif ;add condition here for the plotting of empty plots using the lines above if they work.
1048 1058  
1049 1059 endelse
1050 1060  
1051 1061 endif
1052 1062  
1053   - ;STOPPED COPYING FOR PSI_EM
1054 1063  
1055 1064 if keyword_set(negative_only) then begin
1056 1065  
1057 1066 if testngtv ne 0 then begin
1058 1067  
1059   - plotsym, 0
1060   - if ct_spec_hdn_ngtv ne 0 then begin
1061   - xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_spec_hdn_ngtv)
1062   - yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_spec_hdn_ngtv)
1063   - rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_spec_hdn_ngtv)/2.
1064   -
1065   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1066   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
  1068 + ;plotsym, 0
1067 1069  
1068   - endif
  1070 + if ct_hdnpts then begin
1069 1071  
1070   - if ct_filt_hdn_ngtv ne 0 then begin
1071   -
1072   - xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_filt_hdn_ngtv)
1073   - yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_filt_hdn_ngtv)
1074   - rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_filt_hdn_ngtv)/2.
  1072 + if ct_spec_hdn_ngtv ne 0 then begin
  1073 + xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_spec_hdn_ngtv)
  1074 + yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_spec_hdn_ngtv)
  1075 + rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_spec_hdn_ngtv)/2.
  1076 +
  1077 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1078 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1075 1079  
1076   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1077   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
1078   -
  1080 + endif
  1081 +
  1082 + if ct_filt_hdn_ngtv ne 0 then begin
  1083 +
  1084 + xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_filt_hdn_ngtv)
  1085 + yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_filt_hdn_ngtv)
  1086 + rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_filt_hdn_ngtv)/2.
  1087 +
  1088 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1089 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
  1090 +
  1091 + endif
  1092 +
1079 1093 endif
1080 1094  
1081 1095 if ct_spec ne 0 then begin
1082 1096  
1083 1097 rms=3.*((*!dustem_data.qsed).sigma)(idx_spec)/2.
1084 1098 ;dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_spec),-((*!dustem_data.qsed).values)(idx_spec),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,/nodata,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
1085   - if ct_spec_hdn_ngtv ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_spec),((*!dustem_data.qsed).values)(idx_spec),ppositions=position,/overplot,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
  1099 + ; if ct_spec_hdn_ngtv ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_spec),((*!dustem_data.qsed).values)(idx_spec),ppositions=position,/overplot,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
1086 1100 dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_spec),((*!dustem_data.qsed).values)(idx_spec),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
1087   - endelse;,ytickformat='(A1)'
1088   - dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_spec),((*!dustem_data.qsed).values)(idx_spec),ppositions=position,color='Dodger Blue',/negative_only,noerase=1,/overplot,rms=rms,xtit='',charsize=1.15,xtickformat='(A1)',xs=1,psym=16,syms=0.8,xr=xr,/xlog,/ylog,yr=yr,ytickformat='(A1)'
  1101 + ;endelse;,ytickformat='(A1)'
  1102 + dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_spec),((*!dustem_data.qsed).values)(idx_spec),ppositions=position,color='Dodger Blue',/negative_only,noerase=1,/overplot,rms=rms,xtit='',charsize=1.15,xtickformat='(A1)',xs=1,xr=xr,/xlog,/ylog,yr=yr,ytickformat='(A1)';,psym=16,syms=0.8
1089 1103  
1090 1104 endif
1091 1105  
... ... @@ -1093,48 +1107,50 @@ if keyword_set(dataset) then begin
1093 1107  
1094 1108 rms=3.*((*!dustem_data.qsed).sigma)(idx_filt)/2.
1095 1109 ; dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_filt),-1.*((*!dustem_data.qsed).values)(idx_filt),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,/nodata,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
1096   - if ct_filt_hdn_ngtv ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_filt),((*!dustem_data.qsed).values)(idx_filt),ppositions=position,charsize=1.15,color='Dodger Blue',/overplot,psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
  1110 + ;if ct_filt_hdn_ngtv ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_filt),((*!dustem_data.qsed).values)(idx_filt),ppositions=position,charsize=1.15,color='Dodger Blue',/overplot,psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
1097 1111 dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_filt),((*!dustem_data.qsed).values)(idx_filt),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
1098   - endelse ;,ytickformat='(A1)'
  1112 + ;endelse ;,ytickformat='(A1)'
1099 1113  
1100   - dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_filt),((*!dustem_data.qsed).values)(idx_filt),ppositions=position,color='Dodger Blue',/negative_only,noerase=1,/overplot,rms=rms,xtit='',charsize=1.15,xtickformat='(A1)',xs=1,psym=16,syms=0.8,xr=xr,/xlog,/ylog,yr=yr,ytickformat='(A1)'
  1114 + dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_filt),((*!dustem_data.qsed).values)(idx_filt),ppositions=position,color='Dodger Blue',/negative_only,noerase=1,/overplot,rms=rms,xtit='',charsize=1.15,xtickformat='(A1)',xs=1,xr=xr,/xlog,/ylog,yr=yr,ytickformat='(A1)'
1101 1115  
1102 1116 endif
1103 1117  
1104 1118 endif else begin
1105   -
1106   - if ct_spec_hdn_ngtv ne 0 then begin
1107   - xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_spec_hdn_ngtv)
1108   - yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_spec_hdn_ngtv)
1109   - rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_spec_hdn_ngtv)/2.
1110   -
1111   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1112   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1113   -
1114   - endif
1115 1119  
1116   - if ct_filt_hdn_ngtv ne 0 then begin
  1120 + if ct_hdnpts then begin
1117 1121  
1118   - xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_filt_hdn_ngtv)
1119   - yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_filt_hdn_ngtv)
1120   - rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_filt_hdn_ngtv)/2.
  1122 + if ct_spec_hdn_ngtv ne 0 then begin
  1123 + xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_spec_hdn_ngtv)
  1124 + yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_spec_hdn_ngtv)
  1125 + rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_spec_hdn_ngtv)/2.
  1126 +
  1127 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1128 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1121 1129  
1122   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1123   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
1124   -
1125   - endif
1126   -
1127   - if ct_spec_hdn_ngtv eq 0 and ct_filt_hdn_ngtv eq 0 then begin
  1130 + endif
  1131 +
  1132 + if ct_filt_hdn_ngtv ne 0 then begin
1128 1133  
1129   - if ct_spec ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_spec),-((*!dustem_data.qsed).values)(idx_spec),ppositions=position,charsize=1.15,/nodata,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1134 + xx = (((*!dustem_show.qsed).wav)[idx_rmv_sed])(idx_filt_hdn_ngtv)
  1135 + yy = (((*!dustem_show.qsed).values)[idx_rmv_sed])(idx_filt_hdn_ngtv)
  1136 + rms=3.*(((*!dustem_show.qsed).sigma)[idx_rmv_sed])(idx_filt_hdn_ngtv)/2.
1130 1137  
  1138 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1139 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
1131 1140  
1132   - if ct_filt ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_filt),-((*!dustem_data.qsed).values)(idx_filt),/nodata,ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1141 + endif
  1142 +
  1143 + if ct_spec_hdn_ngtv eq 0 and ct_filt_hdn_ngtv eq 0 then begin
1133 1144  
1134   -
1135   - endif
  1145 + if ct_spec ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_spec),-((*!dustem_data.qsed).values)(idx_spec),ppositions=position,charsize=1.15,/nodata,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1146 +
  1147 +
  1148 + if ct_filt ne 0 then dustem_plot_mlog,((*!dustem_data.qsed).wav)(idx_filt),-((*!dustem_data.qsed).values)(idx_filt),/nodata,ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1149 +
1136 1150  
1137   -
  1151 + endif
  1152 +
  1153 + endif
1138 1154 endelse
1139 1155  
1140 1156 endif
... ... @@ -1167,7 +1183,7 @@ if keyword_set(dataset) then begin
1167 1183 match2,((*!dustem_data.used).wav),((*!dustem_show.used).wav),fit_sedpts,show_sedpts ;only show_sedpts is needed
1168 1184 idx_rmv_sed=where(show_sedpts eq -1, ct_hdnpts) ; indices of the points to hide
1169 1185  
1170   -
  1186 + stop
1171 1187 ;#1) get the plotting keywords (pertaining to each data set) @here when the _extra structure is ready
1172 1188  
1173 1189 if keyword_set(nodata) then begin ;when the data is not present
... ... @@ -1322,12 +1338,13 @@ if keyword_set(dataset) then begin
1322 1338 ;SADLY I STILL DON'T HAVE A SOLUTION FOR THE PLOTTING OF NULL VALUES.
1323 1339 ;idx_filt_hdn = where(((*!dustem_show.used).filt_names)(idx_rmv_sed) NE 'SPECTRUM',ct_filt_hdn)
1324 1340 ;idx_spec_hdn = where(((*!dustem_show.used).filt_names)(idx_rmv_sed) EQ 'SPECTRUM',ct_spec_hdn)
1325   - idx_filt_hdn_pstv = where(((*!dustem_show.used).filt_names)(idx_rmv_sed) NE 'SPECTRUM' and ((*!dustem_show.used).values)(idx_rmv_sed) gt 0,ct_filt_hdn_pstv)
1326   - idx_spec_hdn_pstv = where(((*!dustem_show.used).filt_names)(idx_rmv_sed) EQ 'SPECTRUM' and ((*!dustem_show.used).values)(idx_rmv_sed) gt 0,ct_spec_hdn_pstv)
1327   - idx_filt_hdn_ngtv = where(((*!dustem_show.used).filt_names)(idx_rmv_sed) NE 'SPECTRUM' and ((*!dustem_show.used).values)(idx_rmv_sed) lt 0,ct_filt_hdn_ngtv)
1328   - idx_spec_hdn_ngtv = where(((*!dustem_show.used).filt_names)(idx_rmv_sed) EQ 'SPECTRUM' and ((*!dustem_show.used).values)(idx_rmv_sed) lt 0,ct_spec_hdn_ngtv)
1329   - ;endif
1330   -
  1341 + if ct_hdnpts then begin
  1342 + idx_filt_hdn_pstv = where(((*!dustem_show.used).filt_names)(idx_rmv_sed) NE 'SPECTRUM' and ((*!dustem_show.used).values)(idx_rmv_sed) gt 0,ct_filt_hdn_pstv)
  1343 + idx_spec_hdn_pstv = where(((*!dustem_show.used).filt_names)(idx_rmv_sed) EQ 'SPECTRUM' and ((*!dustem_show.used).values)(idx_rmv_sed) gt 0,ct_spec_hdn_pstv)
  1344 + idx_filt_hdn_ngtv = where(((*!dustem_show.used).filt_names)(idx_rmv_sed) NE 'SPECTRUM' and ((*!dustem_show.used).values)(idx_rmv_sed) lt 0,ct_filt_hdn_ngtv)
  1345 + idx_spec_hdn_ngtv = where(((*!dustem_show.used).filt_names)(idx_rmv_sed) EQ 'SPECTRUM' and ((*!dustem_show.used).values)(idx_rmv_sed) lt 0,ct_spec_hdn_ngtv)
  1346 + endif
  1347 + stop
1331 1348  
1332 1349 if keyword_set(positive_only) then begin
1333 1350 ;stop
... ... @@ -1340,9 +1357,9 @@ if keyword_set(dataset) then begin
1340 1357  
1341 1358 rms=3.*((*!dustem_data.used).sigma)(idx_spec)/2.
1342 1359 ;dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),-((*!dustem_data.used).values)(idx_spec),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,/nodata,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
1343   - if ct_spec_hdn_pstv ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),((*!dustem_data.used).values)(idx_spec),ppositions=position,charsize=1.15,/overplot,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
  1360 + ;if ct_spec_hdn_pstv ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),((*!dustem_data.used).values)(idx_spec),ppositions=position,charsize=1.15,/overplot,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
1344 1361 dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),((*!dustem_data.used).values)(idx_spec),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr
1345   - endelse;,ytickformat='(A1)'
  1362 + ;endelse;,ytickformat='(A1)'
1346 1363 dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),((*!dustem_data.used).values)(idx_spec),ppositions=position,color='Dodger Blue',/positive_only,noerase=1,/overplot,rms=rms,xtit='',xtickformat='(A1)',xs=1,xr=xr,/xlog,/ylog,yr=yr,ytickformat='(A1)' ;,charsize=1.15,psym=16,syms=0.8
1347 1364  
1348 1365 endif
... ... @@ -1351,68 +1368,72 @@ if keyword_set(dataset) then begin
1351 1368  
1352 1369 rms=3.*((*!dustem_data.used).sigma)(idx_filt)/2.
1353 1370 ; dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),-1.*((*!dustem_data.used).values)(idx_filt),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,/nodata,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
1354   - if ct_filt_hdn_pstv ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),((*!dustem_data.used).values)(idx_filt),/overplot,ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
  1371 + ;if ct_filt_hdn_pstv ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),((*!dustem_data.used).values)(idx_filt),/overplot,ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
1355 1372 dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),((*!dustem_data.used).values)(idx_filt),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr
1356   - endelse;,ytickformat='(A1)'
  1373 + ;endelse;,ytickformat='(A1)'
1357 1374 dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),((*!dustem_data.used).values)(idx_filt),ppositions=position,color='Dodger Blue',/positive_only,noerase=1,/overplot,rms=rms,xtit='',xtickformat='(A1)',xs=1,xr=xr,/xlog,/ylog,yr=yr,ytickformat='(A1)';,charsize=1.15,psym=16,syms=0.8
1358 1375  
1359 1376 endif
1360 1377  
1361   - if ct_spec_hdn_pstv ne 0 then begin
1362   - xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_spec_hdn_pstv)
1363   - yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_spec_hdn_pstv)
1364   - rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_spec_hdn_pstv)/2.
1365   -
1366   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',/overplot,xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1367   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
  1378 + if ct_hdnpts then begin
1368 1379  
1369   - endif
1370   -
1371   - if ct_filt_hdn_pstv ne 0 then begin
1372   -
1373   - xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_filt_hdn_pstv)
1374   - yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_filt_hdn_pstv)
1375   - rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_filt_hdn_pstv)/2.
  1380 + if ct_spec_hdn_pstv ne 0 then begin
  1381 + ;stop
  1382 + xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_spec_hdn_pstv)
  1383 + yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_spec_hdn_pstv)
  1384 + rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_spec_hdn_pstv)/2.
  1385 +
  1386 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',/overplot,xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1387 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1376 1388  
1377   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,/overplot,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1378   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
1379   -
1380   - endif
1381   -
  1389 + endif
  1390 +
  1391 + if ct_filt_hdn_pstv ne 0 then begin
  1392 + ;stop
  1393 + xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_filt_hdn_pstv)
  1394 + yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_filt_hdn_pstv)
  1395 + rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_filt_hdn_pstv)/2.
  1396 +
  1397 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,/overplot,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1398 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
  1399 +
  1400 + endif
  1401 + endif
1382 1402 endif else begin
1383   -
1384   - if ct_spec_hdn_pstv ne 0 then begin
1385   -
1386   - xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_spec_hdn_pstv)
1387   - yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_spec_hdn_pstv)
1388   - rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_spec_hdn_pstv)/2.
  1403 + ;stop
  1404 + if ct_hdnpts then begin
  1405 + if ct_spec_hdn_pstv ne 0 then begin
1389 1406  
1390   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1391   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1392   -
1393   - endif
1394   -
1395   - if ct_filt_hdn_pstv ne 0 then begin
1396   -
1397   - xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_filt_hdn_pstv)
1398   - yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_filt_hdn_pstv)
1399   - rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_filt_hdn_pstv)/2.
  1407 + xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_spec_hdn_pstv)
  1408 + yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_spec_hdn_pstv)
  1409 + rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_spec_hdn_pstv)/2.
  1410 +
  1411 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1412 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1400 1413  
1401   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1402   - dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
1403   -
1404   - endif
1405   -
1406   - if ct_spec_hdn_pstv eq 0 and ct_filt_hdn_pstv eq 0 then begin
  1414 + endif
  1415 +
  1416 + if ct_filt_hdn_pstv ne 0 then begin
1407 1417  
1408   - if ct_spec ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),-((*!dustem_data.used).values)(idx_spec),ppositions=position,charsize=1.15,/nodata,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1418 + xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_filt_hdn_pstv)
  1419 + yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_filt_hdn_pstv)
  1420 + rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_filt_hdn_pstv)/2.
1409 1421  
  1422 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1423 + dustem_plot_mlog,xx,yy,ppositions=position,/positive_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
  1424 +
  1425 + endif
1410 1426  
1411   - if ct_filt ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),-((*!dustem_data.used).values)(idx_filt),/nodata,ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1427 + if ct_spec_hdn_pstv eq 0 and ct_filt_hdn_pstv eq 0 then begin
  1428 + ; stop
  1429 + if ct_spec ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),-((*!dustem_data.used).values)(idx_spec),ppositions=position,charsize=1.15,/nodata,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1430 +
1412 1431  
1413   -
1414   - endif
  1432 + if ct_filt ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),-((*!dustem_data.used).values)(idx_filt),/nodata,ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/positive_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1433 +
1415 1434  
  1435 + endif
  1436 + endif
1416 1437  
1417 1438 endelse
1418 1439  
... ... @@ -1429,9 +1450,9 @@ if keyword_set(dataset) then begin
1429 1450  
1430 1451 rms=3.*((*!dustem_data.used).sigma)(idx_spec)/2.
1431 1452 ;dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),-((*!dustem_data.used).values)(idx_spec),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,/nodata,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
1432   - if ct_spec_hdn_ngtv ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),((*!dustem_data.used).values)(idx_spec),ppositions=position,/overplot,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
  1453 + ;if ct_spec_hdn_ngtv ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),((*!dustem_data.used).values)(idx_spec),ppositions=position,/overplot,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
1433 1454 dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),((*!dustem_data.used).values)(idx_spec),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
1434   - endelse;,ytickformat='(A1)'
  1455 + ;endelse;,ytickformat='(A1)'
1435 1456 dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),((*!dustem_data.used).values)(idx_spec),ppositions=position,color='Dodger Blue',/negative_only,noerase=1,/overplot,rms=rms,xtit='',charsize=1.15,xtickformat='(A1)',xs=1,psym=16,syms=0.8,xr=xr,/xlog,/ylog,yr=yr,ytickformat='(A1)'
1436 1457  
1437 1458 endif
... ... @@ -1440,72 +1461,74 @@ if keyword_set(dataset) then begin
1440 1461  
1441 1462 rms=3.*((*!dustem_data.used).sigma)(idx_filt)/2.
1442 1463 ; dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),-1.*((*!dustem_data.used).values)(idx_filt),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,/nodata,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
1443   - if ct_filt_hdn_ngtv ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),((*!dustem_data.used).values)(idx_filt),ppositions=position,charsize=1.15,color='Dodger Blue',/overplot,psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
  1464 + ;if ct_filt_hdn_ngtv ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),((*!dustem_data.used).values)(idx_filt),ppositions=position,charsize=1.15,color='Dodger Blue',/overplot,psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr else begin
1444 1465 dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),((*!dustem_data.used).values)(idx_filt),ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
1445   - endelse ;,ytickformat='(A1)'
  1466 + ;endelse ;,ytickformat='(A1)'
1446 1467  
1447 1468 dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),((*!dustem_data.used).values)(idx_filt),ppositions=position,color='Dodger Blue',/negative_only,noerase=1,/overplot,rms=rms,xtit='',charsize=1.15,xtickformat='(A1)',xs=1,psym=16,syms=0.8,xr=xr,/xlog,/ylog,yr=yr,ytickformat='(A1)'
1448 1469  
1449 1470 endif
1450 1471  
  1472 + if ct_hdnpts then begin
1451 1473  
1452   -
1453   - if ct_spec_hdn_ngtv ne 0 then begin
1454   - xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_spec_hdn_ngtv)
1455   - yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_spec_hdn_ngtv)
1456   - rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_spec_hdn_ngtv)/2.
  1474 + if ct_spec_hdn_ngtv ne 0 then begin
  1475 + xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_spec_hdn_ngtv)
  1476 + yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_spec_hdn_ngtv)
  1477 + rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_spec_hdn_ngtv)/2.
  1478 +
  1479 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',/overplot,xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1480 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1457 1481  
1458   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',/overplot,xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1459   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1460   -
1461   - endif
1462   -
1463   - if ct_filt_hdn_ngtv ne 0 then begin
1464   -
1465   - xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_filt_hdn_ngtv)
1466   - yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_filt_hdn_ngtv)
1467   - rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_filt_hdn_ngtv)/2.
  1482 + endif
1468 1483  
1469   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',/overplot,xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1470   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
1471   -
1472   - endif
  1484 + if ct_filt_hdn_ngtv ne 0 then begin
  1485 +
  1486 + xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_filt_hdn_ngtv)
  1487 + yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_filt_hdn_ngtv)
  1488 + rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_filt_hdn_ngtv)/2.
  1489 +
  1490 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',/overplot,xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1491 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
  1492 +
  1493 + endif
1473 1494  
1474   -
  1495 + endif
1475 1496  
1476 1497 endif else begin
1477   -
1478   - if ct_spec_hdn_ngtv ne 0 then begin
1479   - xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_spec_hdn_ngtv)
1480   - yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_spec_hdn_ngtv)
1481   - rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_spec_hdn_ngtv)/2.
1482   -
1483   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1484   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1485 1498  
1486   - endif
  1499 + if ct_hdnpts then begin
1487 1500  
1488   - if ct_filt_hdn_ngtv ne 0 then begin
1489   -
1490   - xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_filt_hdn_ngtv)
1491   - yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_filt_hdn_ngtv)
1492   - rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_filt_hdn_ngtv)/2.
  1501 + if ct_spec_hdn_ngtv ne 0 then begin
  1502 + xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_spec_hdn_ngtv)
  1503 + yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_spec_hdn_ngtv)
  1504 + rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_spec_hdn_ngtv)/2.
  1505 +
  1506 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1507 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,noerase=1,color='Black',/overplot,rms=rms,yr=yr,xtickformat='(A1)',xr=xr,xs=1,/xlog,/ylog;,psym=8,syms=0.8
1493 1508  
1494   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
1495   - dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
1496   -
1497   - endif
1498   -
1499   - if ct_spec_hdn_ngtv eq 0 and ct_filt_hdn_ngtv eq 0 then begin
  1509 + endif
1500 1510  
1501   - if ct_spec ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),-((*!dustem_data.used).values)(idx_spec),ppositions=position,charsize=1.15,/nodata,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1511 + if ct_filt_hdn_ngtv ne 0 then begin
  1512 +
  1513 + xx = (((*!dustem_show.used).wav)[idx_rmv_sed])(idx_filt_hdn_ngtv)
  1514 + yy = (((*!dustem_show.used).values)[idx_rmv_sed])(idx_filt_hdn_ngtv)
  1515 + rms=3.*(((*!dustem_show.used).sigma)[idx_rmv_sed])(idx_filt_hdn_ngtv)/2.
1502 1516  
  1517 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,charsize=1.15,xtickformat='(A1)',xr=xr,color='Black',psym=16,syms=0.8,/xlog,/ylog,yr=yr
  1518 + dustem_plot_mlog,xx,yy,ppositions=position,/negative_only,xs=1,noerase=1,color='Black',/overplot,rms=rms,xr=xr,yr=yr,xtickformat='(A1)',/xlog,/ylog;,psym=8,syms=0.8
  1519 +
  1520 + endif
1503 1521  
1504   - if ct_filt ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),-((*!dustem_data.used).values)(idx_filt),/nodata,ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1522 + if ct_spec_hdn_ngtv eq 0 and ct_filt_hdn_ngtv eq 0 then begin
1505 1523  
1506   -
1507   - endif
  1524 + if ct_spec ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_spec),-((*!dustem_data.used).values)(idx_spec),ppositions=position,charsize=1.15,/nodata,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1525 +
  1526 +
  1527 + if ct_filt ne 0 then dustem_plot_mlog,((*!dustem_data.used).wav)(idx_filt),-((*!dustem_data.used).values)(idx_filt),/nodata,ppositions=position,charsize=1.15,color='Dodger Blue',psym=16,syms=0.8,xs=1,xr=xr,noerase=1,/negative_only,xtickformat='(A1)',xtit='',/xlog,/ylog,yr=yr;,ytickformat='(A1)'
  1528 +
1508 1529  
  1530 + endif
  1531 + endif
1509 1532 ;stop
1510 1533 endelse
1511 1534  
... ...