Commit dbf429a67f75a0e409097167c5ec51b80e49fa38

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

improved

Showing 1 changed file with 8 additions and 3 deletions   Show diff stats
src/idl/dustem_brute_force_fit.pro
... ... @@ -110,7 +110,7 @@ ENDIF
110 110 ;TABLE_PMINS DOUBLE = Array[3]
111 111 ;TABLE_PMAXS DOUBLE = Array[3]
112 112  
113   -;stop
  113 +stop
114 114  
115 115 ;=== These are the full arrays needed for calculations
116 116 chi2s=dblarr(Nseds)
... ... @@ -190,11 +190,16 @@ FOR i=0L,Nparams-1 DO BEGIN
190 190 weighted_params[i]=total(reform(1.d0*grid_param_values[*,i])*weights)/tot_weights
191 191 ENDFOR
192 192  
  193 +;stop
193 194 ;==== Check bumping to table edges.
194 195 params_hit=intarr(Nparams)
195 196 FOR i=0L,Nparams-1 DO BEGIN
196   - IF params[i] EQ table_pmins[i] THEN params_hit[i]=-1
197   - IF params[i] EQ table_pmaxs[i] THEN params_hit[i]=1
  197 + diff_min=abs(params[i]-table_pmins[i])/table_pmins[i]*100.
  198 + diff_max=abs(params[i]-table_pmaxs[i])/table_pmaxs[i]*100.
  199 + IF diff_min LE 1. THEN params_hit[i]=-1
  200 + IF diff_max LE 1. THEN params_hit[i]=1
  201 + ;IF params[i] LE table_pmins[i] THEN params_hit[i]=-1
  202 + ;IF params[i] GE table_pmaxs[i] THEN params_hit[i]=1
198 203 ENDFOR
199 204  
200 205 ;==== Compute parameter uncertainties
... ...