Commit f2b4c14e7f6efd31d0595b775423a5882ad0c752
Exists in
master
trying to fix conflicts
Showing
1 changed file
with
7 additions
and
31 deletions
Show diff stats
src/idl/dustem_read_fits_table.pro
... | ... | @@ -210,11 +210,13 @@ ENDELSE |
210 | 210 | used_model=strtrim(sxpar(main_header,'MODEL'),2) |
211 | 211 | used_pol=long(strtrim(sxpar(main_header,'POL'),2)) |
212 | 212 | used_version=strtrim(sxpar(main_header,'WRAP_V'),2) |
213 | + | |
213 | 214 | IF used_model NE 'DEFAULT' THEN BEGIN |
214 | - dustem_init,model=used_model,pol=used_pol | |
215 | + dustem_init,model=used_model,pol=used_pol | |
215 | 216 | ENDIF ELSE BEGIN |
216 | - dustem_init,model=0 | |
217 | + dustem_init,model=0 | |
217 | 218 | ENDELSE |
219 | + | |
218 | 220 | !dustem_model=used_model |
219 | 221 | IF !dustem_version.version NE used_version THEN BEGIN |
220 | 222 | message,'Caution: fits file was not created with the same Dustemwrap version as your current version',/continue |
... | ... | @@ -238,7 +240,7 @@ FOR i=0L,Nparams-1 DO BEGIN |
238 | 240 | best_parameters[i]=sxpar(main_header,'PARV'+strtrim(i+1,2)) |
239 | 241 | best_parameters_uncertainties[i]=sxpar(main_header,'PARU'+strtrim(i+1,2)) |
240 | 242 | best_parameters_init_values[i]=sxpar(main_header,'PARI'+strtrim(i+1,2)) |
241 | - parameters_func_values[i]=sxpar(main_header,'PARI'+strtrim(i+1,2)) | |
243 | + parameters_func_values[i]=sxpar(main_header,'PARF'+strtrim(i+1,2)) | |
242 | 244 | ENDFOR |
243 | 245 | |
244 | 246 | (*!dustem_fit).PARAM_DESCS=ptr_new(parameters_desc) |
... | ... | @@ -249,8 +251,8 @@ ENDFOR |
249 | 251 | (*!dustem_fit).RCHI2=best_fit_rchi2 |
250 | 252 | (*!dustem_fit).PARAM_FUNC=ptr_new(parameters_func_values) |
251 | 253 | |
252 | - | |
253 | 254 | ;==== This is to create (*!dustem_data).sed in case it does not exist already |
255 | +; it doesn't exist at all times because dustem_init has been run | |
254 | 256 | IF unit_input_emission_sed NE -1 THEN BEGIN |
255 | 257 | Nsed=n_elements(str_input_SED) |
256 | 258 | sed=dustem_initialize_internal_sed(Nsed) |
... | ... | @@ -271,30 +273,6 @@ IF unit_input_extinction_sed NE -1 THEN BEGIN |
271 | 273 | Next=n_elements(str_input_EXT) |
272 | 274 | ext=dustem_initialize_internal_sed(Next) |
273 | 275 | dustem_fillup_systvar_from_fits,*!dustem_data,ext,str_input_EXT,used_pol |
274 | - | |
275 | - ; (*!dustem_data).ext=ptr_new(ext) | |
276 | - | |
277 | - ; (*(*!dustem_data).ext).instru_names=dustem_filter2instru(str_input_EXT.filter) | |
278 | - ; (*(*!dustem_data).ext).filt_names=str_input_EXT.filter | |
279 | - ; (*(*!dustem_data).ext).wav=str_input_EXT.wavelength | |
280 | - ; (*(*!dustem_data).ext).values=str_input_EXT.I | |
281 | - ; (*(*!dustem_data).ext).sigma=la_power(str_input_EXT.varianceII,0.5) | |
282 | - | |
283 | - ; IF used_pol THEN BEGIN | |
284 | - ; ;stop | |
285 | - ; (*!dustem_data).qext=ptr_new(ext) | |
286 | - ; (*!dustem_data).uext=ptr_new(ext) | |
287 | - ; (*(*!dustem_data).qext).instru_names=dustem_filter2instru(str_input_EXT.filter) | |
288 | - ; (*(*!dustem_data).qext).filt_names=str_input_EXT.filter | |
289 | - ; (*(*!dustem_data).qext).wav=str_input_EXT.wavelength | |
290 | - ; (*(*!dustem_data).qext).values=str_input_EXT.Q | |
291 | - ; (*(*!dustem_data).qext).sigma=la_power(str_input_EXT.varianceQQ,0.5) | |
292 | - ; (*(*!dustem_data).uext).instru_names=dustem_filter2instru(str_input_EXT.filter) | |
293 | - ; (*(*!dustem_data).uext).filt_names=str_input_EXT.filter | |
294 | - ; (*(*!dustem_data).uext).wav=str_input_EXT.wavelength | |
295 | - ; (*(*!dustem_data).uext).values=str_input_EXT.U | |
296 | - ; (*(*!dustem_data).uext).sigma=la_power(str_input_EXT.varianceUU,0.5) | |
297 | - ; ENDIF | |
298 | 276 | ENDIF |
299 | 277 | |
300 | 278 | ;=== Below is only to get the same output form as dustem_compute_sed |
... | ... | @@ -308,7 +286,7 @@ ENDELSE |
308 | 286 | dustem_predicted_em=mrdfits(file,unit_dustem_predicted_emission_spectra,header_predicted_emission) |
309 | 287 | dustem_predicted_ext= mrdfits(file,unit_dustem_predicted_extinction_spectra,header_predicted_extinction) |
310 | 288 | |
311 | -dustem_st.sed=dustem_predicted_em | |
289 | +dustem_st.sed=dustem_predicted_em | |
312 | 290 | dustem_st.ext=dustem_predicted_ext |
313 | 291 | |
314 | 292 | IF used_pol THEN BEGIN |
... | ... | @@ -319,8 +297,6 @@ IF used_pol THEN BEGIN |
319 | 297 | dustem_st.polext=toto |
320 | 298 | ENDIF |
321 | 299 | |
322 | -;stop | |
323 | - | |
324 | 300 | the_end: |
325 | 301 | |
326 | 302 | END | ... | ... |