[AstroPy] blackbody_lambda

Rudolf Baer rbaer25 at gmail.com
Fri Sep 10 11:11:01 EDT 2021


Hi Enrique
For bb fitting I am using* lmfit *and  the actual formula
*def bb(x, T, *const)*:*
*    from scipy.constants import h,k,c*
*    x = 1e-6 * x # convert to metres from um*
*    return const*2*h*c**2 / (x**5 * (np.exp(h*c / (x*k*T)) - 1)) *

Depending on you application you may not need the const
With kind regards
Rudolf Baer


On Fri, Sep 10, 2021 at 1:47 PM eperez <eperez at iaa.es> wrote:

>
> I am running Astropy 4.3.1.
>
> I am not able to reproduce these two lines of code, where i am interested
> in the BB in Flux_lambda units:
>
>   from astropy.analytic_functions import blackbody_lambda
>   flux_lam = blackbody_lambda(wv*u.AA, temperature*u.K)
>
> I understand that astropy.analytic_functions is no longer available, but i
> cannot find the equivalent blackbody_lambda in the current:  from
> astropy.modeling.models import BlackBody
>
> Thanks for your help.
> ES.Enrique
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/astropy/attachments/20210910/5e7a497e/attachment.html>


More information about the AstroPy mailing list