Chromosphere model

class pytransit.ChromosphereModel[source]
set_data(time: Union[numpy.ndarray, List[T]], lcids: Union[numpy.ndarray, List[T], None] = None, pbids: Union[numpy.ndarray, List[T], None] = None, nsamples: Union[numpy.ndarray, List[T], None] = None, exptimes: Union[numpy.ndarray, List[T], None] = None, epids: Union[numpy.ndarray, List[T], None] = None) → None

Set the data for the transit model.

  • time (array-like) – Array of mid-exposure times for which the model will be evaluated.
  • lcids (array-like, optional) – Array of integer light curve indices. Must have the same size as the time array.
  • pbids (array-like, optional) – Array of passband indices, one per light curve. Must satisfy pbids.size == unique(lcids).size.
  • nsamples (int or array-like, optional) – Number of samples per exposure. Can either be an integer, in which case all the light curves will have the same supersampling rate, or an array of integers, in which case each light curve can have a different rate.
  • exptimes (float or array-like, optional) – Exposure times, again either for all the modelled data, or one value per light curve.
  • epids (array-like, optional) – Epoch indices that can be used to link a light curve to a specific zero epoch and period (for TTV calculations).
evaluate_ps(k: float, t0: float, p: float, a: float, i: float, e: float = 0.0, w: float = 0.0) → numpy.ndarray[source]

Evaluate the transit model for a set of scalar parameters.

  • k (array-like) – Radius ratio(s) either as a single float or an 1D array.
  • t0 (float) – Transit center as a float.
  • p (float) – Orbital period as a float.
  • a (float) – Orbital semi-major axis divided by the stellar radius as a float.
  • i (float) – Orbital inclination(s) as a float.
  • e (float, optional) – Orbital eccentricity as a float.
  • w (float, optional) – Argument of periastron as a float.


This version of the evaluate method is optimized for calculating a single transit model (such as when using a local optimizer). If you want to evaluate the model for a large number of parameters simultaneously, use either evaluate or evaluate_pv.

Returns:Modelled flux as a 1D ndarray.
Return type:ndarray
evaluate_pv(pvp: numpy.ndarray) → numpy.ndarray[source]

Evaluate the transit model for a 2D parameter array.

Parameters:pvp – Parameter array with a shape (npv, npar) where npv is the number of parameter vectors, and each row contains a set of parameters [k, t0, p, a, i, e, w]. The radius ratios can also be given per passband, in which case the row should be structured as [k_0, k_1, k_2, …, k_npb, t0, p, a, i, e, w].


This version of the evaluate method is optimized for calculating several models in parallel, such as when using emcee for MCMC sampling.

Returns:Modelled flux either as a 1D or 2D ndarray.
Return type:ndarray