Use a custom throughput

In this tutorial we take a look at how to use a custom throughput if you cannot find the mode you are looking for in supported instruments.

Let us mock up some throughput data.

[1]:
import numpy as np


wvs = np.linspace(10000., 20000., 100)
throughput = np.exp(-0.5 * ((wvs - 15000.) / 5000.)**2)

With this data in hand, you can run the code as follows.

[2]:
import os
from exotic_ld import StellarLimbDarkening


sld = StellarLimbDarkening(M_H=0.01, Teff=5512, logg=4.47,
                           ld_model="mps1",
                           ld_data_path="exotic_ld_data")
cs = sld.compute_4_parameter_non_linear_ld_coeffs(wavelength_range=[13000., 17000.],
                                                  mode="custom",
                                                  custom_wavelengths=wvs,
                                                  custom_throughput=throughput)
print(cs)
(0.6196927861080398, 0.1956224528931391, -0.4096670803299519, 0.1603758009182527)