cschreib / fastpp

C++ version of the SED fitting code FAST (Kriek et al. 2009); it's faster, uses less memory, and has more features.
MIT License
27 stars 4 forks source link

Failed fit comparisons between fastpp FAST #10

Closed themiyan closed 5 years ago

themiyan commented 5 years ago

There are several galaxies in fastpp which fail to give a reasonably good SED fit to the data. A couple of examples shown below: sed_xi_ion_912 sed_xi_ion_5576

Fitting them using similar parameters in FAST (IDL): sed_xi_ion_912 sed_xi_ion_5576

Any idea what would cause these discrepancies?

input/output files can be found here: https://www.dropbox.com/sh/otrjvvtfs9k87b4/AABF4qR6cqhFj2y_rq9wJ0UBa?dl=0

cschreib commented 5 years ago

Could you give me the IDs of these sources so I can look them up in the catalog and dig into this?

Otherwise, it seems the first galaxy has some fluxes that are zero, around lambda=4000A. You might want to check these, make sure that they are correctly flagged in the input catalog with either a negative error, or written as "NaN". Note that FAST will automatically discard all the fluxes with value equal to -99, regardless of the uncertainty. But FAST++ will not, because -99 could in principle be a valid flux measurement.

themiyan commented 5 years ago

I've added a file called failed to the dropbox link with the IDs of the fails. You can check the SEDs in the folder FASTPP_SEDs_bc03 I re-ran the catalogue using nan for the -99s. The new outputs are in the zf_cosmos_zspec_fastpp folder.

cschreib commented 5 years ago

Thanks. I identified the issue, and (again) this is caused by BEST_FROM_SIM=1. In the output SED file, the code was picking the model with the smallest chi2 on the true photometry, but it was taking the normalization factor from the models in the MC simulations. This is now fixed in the master branch. Incidentally, when setting BEST_FROM_SIM=1, the code will now output the "median model" of the simulations, instead of the one with the smallest chi2 on the original photometry. If you don't want that, then set BEST_FROM_SIM=0.

If you still see problematic SEDs after this fix, please re-open this issue.

NB: To be honest, even though I thought at the time it was a good idea to add this option to the code, now I'm no longer sure. I think there are better ways to reach the same goals. If you tell me why you want to use this option, perhaps I can suggest improvements.

themiyan commented 5 years ago

great. thanks. This seems to have fixed the issue.

For BEST_FROM_SIM one would naively expect this to be closer to the truth value. Anyways I'll stick with not using this option then.