exoctk.limb_darkening package

Submodules

exoctk.limb_darkening.limb_darkening_fit module

A module to calculate limb darkening coefficients from a grid of model spectra

class exoctk.limb_darkening.limb_darkening_fit.LDC(model_grid='ACES')[source]

Bases: object

A class to hold all the LDCs you want to run

Initialize an LDC object

Parameters:
model_grid: exoctk.modelgrid.ModelGrid

The grid of synthetic spectra from which the coefficients will be calculated

static bootstrap_errors(mu_vals, func, coeffs, errors, n_samples=1000)[source]

Bootstrapping LDC errors

Parameters:
mu_vals: sequence

The mu values

func: callable

The LD profile function

coeffs: sequence

The coefficients

errors: sequence

The errors on each coeff

n_samples: int

The number of samples

Returns:
tuple

The lower and upper errors

calculate(Teff, logg, FeH, profile, mu_min=0.05, ld_min=0.01, bandpass=None, name=None, color=None, interp=False, **kwargs)[source]

Calculates the limb darkening coefficients for a given synthetic spectrum. If the model grid does not contain a spectrum of the given parameters, the grid is interpolated to those parameters.

Reference for limb-darkening laws: http://www.astro.ex.ac.uk/people/sing/David_Sing/Limb_Darkening.html

Parameters:
Teff: int

The effective temperature of the model

logg: float

The logarithm of the surface gravity

FeH: float

The logarithm of the metallicity

profile: str

The name of the limb darkening profile function to use, including ‘linear’, ‘quadratic’, ‘square-root’, ‘logarithmic’, ‘exponential’, and ‘4-parameter’

mu_min: float

The minimum mu value to consider

ld_min: float

The minimum limb darkening value to consider

bandpass: svo_filters.svo.Filter() (optional)

The photometric filter through which the limb darkening is to be calculated

name: str (optional)

A name for the calculation

color: str (optional)

A color for the plotted result

interp: bool

Interpolate spectra to given model parameters

get_model(teff, logg, feh, interp=False)[source]

Method to grab cached model or fetch new one

Parameters:
teff: float

The effective temperature of the desired model

logg: float

The log surface gravity of the desired model

feh: float

The metallicity of the desired model

interp: bool

Interpolate the model spectra to the given parameters

Returns:
dict

The stellar intensity model

plot(fig=None, show=False, **kwargs)[source]

Plot the LDCs

Parameters:
fig: matplotlib.pyplot.figure, bokeh.plotting.figure (optional)

An existing figure to plot on

show: bool

Show the figure

plot_tabs(show=False, **kwargs)[source]

Plot the LDCs in a tabbed figure

Parameters:
fig: matplotlib.pyplot.figure, bokeh.plotting.figure (optional)

An existing figure to plot on

show: bool

Show the figure

save(filepath)[source]

Save the LDC results to file

Parameters:
filepath: str

The complete filepath to save the results to

spam(planet_name=None, planet_data=None, profiles=['quadratic'], **kwargs)[source]

Calculates SPAM coefficients by transforming non-linear coefficients

Parameters:
planet_name: string

The name of the input planet (e.g., ‘WASP-19b’); this will be used to query the planet properties from MAST.

planet_data: dict

Dictionary containing the planet properties. Must include ‘transit_duration’, ‘orbital_period’ (days), ‘Rp/Rs’, ‘a/Rs’, ‘inclination’ (degrees), ‘eccentricity’ and ‘omega’ (degrees)

profiles: sequence

The profiles to calculate, [‘quadratic’, ‘logarithmic’, ‘square-root’]

exoctk.limb_darkening.limb_darkening_fit.ld_profile(name='quadratic', latex=False)[source]

Define the function to fit the limb darkening profile

Reference:

https://www.cfa.harvard.edu/~lkreidberg/batman/ tutorial.html#limb-darkening-options

Parameters:
name: str

The name of the limb darkening profile function to use, including ‘linear’, ‘quadratic’, ‘square-root’, ‘logarithmic’, ‘exponential’, ‘3-parameter’, and ‘4-parameter’

latex: bool

Return the function as a LaTeX formatted string

Returns:
function, str

The corresponding function for the given profile

Module contents

Package to generate limb darkening coefficients from a grid of model spectra