Open tdiazsantos opened 1 year ago
In CAFE/opt_parfiles/default_opts.cafe you can specify the reference wavelengths for each component. It would be easy to add a check that all of those wavelengths are in-bounds, but if they're not we need to decide how to specify an alternative. Ideally I think we want to specify a wavelength where we expect the component to be the main (or at least a major) contributor to the SED. For PAHs this probably means a list of possible reference wavelengths corresponding to strong PAH features that it can go through and check.
Right now the code cannot handle the scaling of PAHs when the spectrum is not continuous. That is, if the spectrum goes from 2 to 20 micron, for example, but the module that includes the 6.22um PAH is not there, the scaling will fail because it will try to calculate a scaling nevertheless since 6.22 is between 2 and 20.
This should be easy to do just by checking if the value of the spectrum is a NaN at the position where the PAH should be.