# petitRADTRANS.nat_cst¶

## Module Contents¶

### Functions¶

 b(T, nu) Returns the Planck function $$B_{\nu}(T)$$ in units of get_PHOENIX_spec(temperature) Returns a matrix where the first column is the wavelength in cm get_PHOENIX_spec_rad(temperature) Returns a matrix where the first column is the wavelength in cm convolve_rebin(input_wavelengths, input_flux, ...) radiosity_erg_hz2radiosity_erg_cm(radiosity_erg_hz, ...) Convert a radiosity from erg.s-1.cm-2.sr-1/Hz to erg.s-1.cm-2.sr-1/cm at a given frequency. # TODO move to physics

### Attributes¶

Returns the Planck function $$B_{\nu}(T)$$ in units of $$\rm erg/s/cm^2/Hz/steradian$$.

Args:
T (float):

Temperature in K.

nu:

numpy array containing the frequency in Hz.

Returns a matrix where the first column is the wavelength in cm and the second is the stellar flux $$F_\nu$$ in units of $$\rm erg/cm^2/s/Hz$$, at the surface of the star. The spectra are PHOENIX models from (Husser et al. 2013), the spectral grid used here was described in van Boekel et al. (2012).

Args:
temperature (float):

stellar effective temperature in K.

Returns a matrix where the first column is the wavelength in cm and the second is the stellar flux $$F_\nu$$ in units of $$\rm erg/cm^2/s/Hz$$, at the surface of the star. The spectra are PHOENIX models from (Husser et al. 2013), the spectral grid used here was described in van Boekel et al. (2012).

UPDATE: It also returns a float that is the corresponding estimate of the stellar radius.

Args:
temperature (float):

stellar effective temperature in K.

petitRADTRANS.nat_cst.convolve_rebin(input_wavelengths, input_flux, instrument_resolving_power, pixel_sampling, instrument_wavelength_range)

Convert a radiosity from erg.s-1.cm-2.sr-1/Hz to erg.s-1.cm-2.sr-1/cm at a given frequency. # TODO move to physics

Steps:

[cm] = c[cm.s-1] / [Hz] => d[cm]/d[Hz] = d(c / [Hz])/d[Hz] => d[cm]/d[Hz] = c / [Hz]**2 => d[Hz]/d[cm] = [Hz]**2 / c integral of flux must be conserved: radiosity_erg_cm * d[cm] = radiosity_erg_hz * d[Hz] radiosity_erg_cm = radiosity_erg_hz * d[Hz]/d[cm] => radiosity_erg_cm = radiosity_erg_hz * frequency**2 / c

Args:

radiosity_erg_hz: (erg.s-1.cm-2.sr-1/Hz) frequency: (Hz)

Returns:

(erg.s-1.cm-2.sr-1/cm) the radiosity in converted units