Closed bennahugo closed 2 years ago
Case in point is the narrow band subset I'm testing with
I am not totally convinced. I think I put this check in because I don't want things to be assumed. That is how mistakes get made. If users want everything to be flat spectrum, I don't think it is unfair to expect them to put that in the model. I am open to counter-arguments though.
It is not standard though @JSKenyon. Unless you explicitly fit for spis with bdsf the the reference frequency is left to None and the spi column just does not exist for any of the components. Therefore a flat spectrum is implicitly assumed by the model. I agree that if at least one component has an spi either the global frequency or the component frequency must be set.
You already assume spi = 0 if the attribute does not exist so (nu / refnu) ^ (0.0) == 1 so the reference frequency can be set to anything non-zero - I've updated the commit to reflect this
This will likely be addressed/improved when #113 is in place.
Flat spectrum sources (and models) should now be handled correctly.
If the SPI is not present (ie. flat spectrum assumed) the following error is generated:
I think it is much better to assume a constant spectrum than not to allow the user to predict from non-SPI-fitted models