exojax.postproc packageο
Submodulesο
exojax.postproc.limb_darkening moduleο
Limb darkening functions.
- exojax.postproc.limb_darkening.ld_kipping(q1, q2)ο
Uninformative prior conversion of the limb darkening by Kipping (arxiv:1308.0009)
- Parameters:
q1 β U(0,1)
q2 β U(0,1)
- Returns:
quadratic LD coefficient u1 u2: quadratic LD coefficient u2
- Return type:
u1
exojax.postproc.response moduleο
Response
input nus/wav should be spaced evenly on a log scale (ESLOG).
response is a response operation for the wavenumber grid spaced evenly on a log scale.
- exojax.postproc.response.ipgauss(spectrum, varr_kernel, beta)ο
Apply the Gaussian IP response to a spectrum F.
- Parameters:
spectrum β original spectrum (F0)
varr_kernel β velocity array for the rotational kernel
beta β STD of a Gaussian broadening (IP+microturbulence)
- Returns:
response-applied spectrum (F)
- exojax.postproc.response.ipgauss_ola(folded_spectrum, varr_kernel, beta)ο
Apply the Gaussian IP response to a spectrum F using OLA.
- Parameters:
folded_spectrum β original spectrum (F0) folded to (ndiv, div_length) form
varr_kernel β velocity array for the rotational kernel
beta β STD of a Gaussian broadening (IP+microturbulence)
- Returns:
response-applied spectrum (F)
- exojax.postproc.response.ipgauss_ola_sampling(nusd, nus, folded_spectrum, beta, RV, varr_kernel)ο
Apply the Gaussian IP response using OLA + sampling to a spectrum F.
- Parameters:
nusd β sampling wavenumber
nus β input wavenumber, evenly log-spaced
folded_spectrum β original spectrum (F0) folded to (ndiv, div_length) form
beta β STD of a Gaussian broadening (IP+microturbulence)
RV β radial velocity (km/s)
varr_kernel β velocity array for the rotational kernel
- Returns:
response-applied spectrum (F)
- exojax.postproc.response.ipgauss_sampling(nusd, nus, spectrum, beta, RV, varr_kernel)ο
Apply the Gaussian IP response + sampling to a spectrum F.
- Parameters:
nusd β sampling wavenumber
nus β input wavenumber, evenly log-spaced
spectrum β original spectrum (F0)
beta β STD of a Gaussian broadening (IP+microturbulence)
RV β radial velocity (km/s)
varr_kernel β velocity array for the rotational kernel
- Returns:
response-applied spectrum (F)
- exojax.postproc.response.ipgauss_variable_sampling(nusd, nus, spectrum, beta_variable, RV)ο
Apply the variable Gaussian IP response + sampling to a spectrum F.
Notes
STD is a function of nusd
- Parameters:
nusd β sampling wavenumber
nus β input wavenumber, evenly log-spaced
spectrum β original spectrum (F0)
beta_variable (1D array) β STD of a Gaussian broadening, shape=(len(nusd),)
RV β radial velocity (km/s)
- Returns:
response-applied spectrum (F)
- exojax.postproc.response.sampling(nusd, nus, F, RV)ο
Sampling w/ RV.
- Parameters:
nusd β sampling wavenumber
nus β input wavenumber
F β input spectrum
RV β radial velocity (km/s)
- Returns:
sampled spectrum
exojax.postproc.specop moduleο
Spectral Operators (Sop)
The role of SOP is to apply various operators (essentially convolution) to a single spectrum, such as spin rotation, gaussian IP, RV shift etc. There are several convolution methods: - βexojax.signal.convolveβ: regular FFT-based convolution - βexojax.signal.olaβ: Overlap-and-Add based convolution
- class exojax.postproc.specop.SopCommonConv(nu_grid, vrmax, convolution_method)ο
Bases:
object
Common Spectral Operator for convloution type operators
- check_ola_reducible(spectrum)ο
- generate_vrarray()ο
- class exojax.postproc.specop.SopInstProfile(nu_grid, vrmax=100.0, convolution_method='exojax.signal.convolve')ο
Bases:
SopCommonConv
Spectral operator on Instrumental profile and sampling
- ipgauss(spectrum, standard_deviation)ο
Gaussian Instrumental Profile
- Parameters:
spectrum (nd array) β 1D spectrum
standard_deviation (float) β standard deviation of Gaussian in km/s
- Raises:
ValueError β _description_
- Returns:
IP applied spectrum
- Return type:
array
- sampling(spectrum, radial_velocity, nu_grid_sampling)ο
sampling to instrumental wavenumber grid (not necessary ESLOG nor ESLIN)
- Parameters:
spectrum (nd array) β 1D spectrum
radial_velocity (float) β radial velocity in km/s
nu_grid_sampling (array) β instrumental wavenumber grid
- Returns:
inst sampled spectrum
- Return type:
array
- class exojax.postproc.specop.SopPhoto(filter_id, filter_bank='svo', path='.database/filter', download=True, up_resolution_factor=32.0, factor=1e+20)ο
Bases:
object
Spectral Operator for photometry
- apparent_magnitude(flux)ο
computes apparent magnitude
- Parameters:
flux (array) β flux in the unit of erg/s/cm2/cm-1, the same dimension as self.transmission_filter
- Returns:
apparent magnitude
- Return type:
float
- computes_interpolated_transmission_filter(xsmode='premodit')ο
computes
- Parameters:
xsmode (str, optional) β xsmode for wavenumber_grid. Defaults to βpremoditβ.
- download_filter()ο
downloads the filter
- Raises:
ValueError β No filter bank
- download_filter_svo()ο
downloads the filter from SVO
- load_filter()ο
loads the filter from the saved dataset
- Raises:
ValueError β datasets not found
- save_filter()ο
save the filter dataset
- class exojax.postproc.specop.SopRotation(nu_grid, vsini_max=100.0, convolution_method='exojax.signal.convolve')ο
Bases:
SopCommonConv
Spectral operator on rotation
- rigid_rotation(spectrum, vsini, u1, u2)ο
apply a rigid rotation
- Parameters:
spectrum (nd array) β 1D spectrum
vsini (float) β V sini in km/s
u1 (float) β Limb darkening parameter u1
u2 (float) β Limb darkening parameter u2
- Raises:
ValueError β _description_
- Returns:
rotationally broaden spectrum
- Return type:
nd array
exojax.postproc.spin_rotation moduleο
- exojax.postproc.spin_rotation.convolve_rigid_rotation(F0, vr_array, vsini, u1=0.0, u2=0.0)ο
Apply the Rotation response to a spectrum F (No OLA and No cuDNN).
- Parameters:
F0 β original spectrum (F0)
vr_array β fix-sized vr array for kernel, see utils.dvgrid_rigid_rotation
vsini β V sini for rotation (km/s)
RV β radial velocity
u1 β Limb-darkening coefficient 1
u2 β Limb-darkening coefficient 2
- Returns:
response-applied spectrum (F)
- exojax.postproc.spin_rotation.convolve_rigid_rotation_ola(folded_F0, vr_array, vsini, u1=0.0, u2=0.0)ο
Apply the Rotation response to a spectrum F (No OLA and No cuDNN).
- Parameters:
folded_F0 β original spectrum (F0) folded to (ndiv, div_length) form
vr_array β fix-sized vr array for kernel, see utils.dvgrid_rigid_rotation
vsini β V sini for rotation (km/s)
RV β radial velocity
u1 β Limb-darkening coefficient 1
u2 β Limb-darkening coefficient 2
- Returns:
response-applied spectrum (F)
- exojax.postproc.spin_rotation.rotkernel_jvp(primals, tangents)ο