Commit ad6312685e801b66bf9a60f5bf378c1c26ec02c0

Authored by Jean-Philippe Bernard
1 parent b4dbd43c
Exists in master

chaaged the plot

Showing 1 changed file with 6 additions and 3 deletions   Show diff stats
src/idl/dustem_brute_force_fit.pro
1   -FUNCTION dustem_brute_force_fit,sed,table_name,filters,normalize=normalize,fact=fact,chi2=chi2,rchi2=rchi2,show_sed=show_sed,nostop=nostop
  1 +FUNCTION dustem_brute_force_fit,sed,table_name,filters,normalize=normalize,fact=fact,chi2=chi2,rchi2=rchi2,best_sed=best_sed,show_sed=show_sed,nostop=nostop
2 2  
3 3 ;+
4 4 ; NAME:
... ... @@ -129,13 +129,16 @@ params=grid_param_values[ind[0],*]
129 129 fact=facts[ind[0]]
130 130 Nfreedom=Nseds-Nparams-1
131 131 rchi2=chi2/Nfreedom
  132 +best_sed=grid_seds[ind[0],*]*fact
132 133  
133 134 IF keyword_set(show_sed) THEN BEGIN
134 135 xtit='Wavelength [mic]'
135 136 ytit='SED (model=red,data=blue)'
136 137 ;should also plot uncertainties
137   - cgplot,sed.wave,sed.stokesI,psym='Filled Circle',color='blue',/ylog,/ysty,xtit=xtit,ytit=ytit,/xlog
138   - cgoplot,sed.wave,grid_seds[ind[0],*]*fact,psym='Filled Square',color='red'
  138 + minv=la_min([sed.stokesI,best_sed])
  139 + maxv=la_max([sed.stokesI,best_sed])
  140 + cgplot,sed.wave,sed.stokesI,psym='Filled Circle',color='blue',/ylog,/ysty,xtit=xtit,ytit=ytit,/xlog,yrange=[minv,maxv]
  141 + cgoplot,sed.wave,best_sed,psym='Filled Square',color='red'
139 142 if not keyword_set(nostop) THEN stop
140 143 ENDIF
141 144  
... ...