-
Notifications
You must be signed in to change notification settings - Fork 31
astropy.modeling.models has no Planck function #170
Comments
There is one. I added it to I hacked together a |
So, should we add it to specviz's list? Or the units dependency may create new issues that we won't be able to deal before the release? |
Look at https://github.com/spacetelescope/pysynphot_DONOTUSE/blob/master/synphot/models.py#L30 and tell me what you think... |
The blackbody_lambda and blackbody_nu models are in fact functions, as suggested by the example. Is that right? If so, in order to be usable in specviz, they should instead subclass Fittable1DModel In that case, they can be used as the core of a model class that we will have to develop ourselves. |
A basic custom one should be straightforward from astropy.modeling.models import custom_model
from astropy.units import Quantity
from astropy.analytic_functions import blackbody_lambda
@custom_model
def blackbody(wavelength, temperature):
wavelength = Quantity(wavelength, "Angstrom")
temperature = Quantity(temperature, "K")
return blackbody_lambda(wavelength, temperature).value |
If you can make it work, go for it. The only thing that stopped me was lack of unit support in |
Implemented Blackbody model. Hence, this ticket can be closed. |
@ibusko Where is this model implemented? I do not see it in the latest code. What am I doing wrong? |
That seems to me a pretty basic model for spectra fitting. Should we formally post a request in astropy? Or develop our own?
The text was updated successfully, but these errors were encountered: