Star#

class fleck.Star(spot_contrast, u_ld, phases=None, n_phases=None, rotation_period=None)[source]#

Bases: object

Object describing properties of a (population of) star(s)

Parameters:
spot_contrastfloat

Contrast of spots (0=perfectly dark, 1=same as photosphere)

u_ldlist

Quadratic limb-darkening parameters

n_phasesint, optional

Number of rotation steps to iterate over

phasesndarray, optional

Rotational phases of the star

rotation_periodQuantity, optional

Rotation period of the star

Methods Summary

light_curve(spot_lons, spot_lats, ...[, ...])

Generate a(n ensemble of) light curve(s).

plot(spot_lons, spot_lats, spot_radii, ...)

Generate a plot of the stellar surface at time.

spherical_to_cartesian(spot_lons, spot_lats, ...)

Convert spot parameter matrices in the original stellar coordinates to rotated and tilted cartesian coordinates.

Methods Documentation

light_curve(spot_lons, spot_lats, spot_radii, inc_stellar, planet=None, times=None, fast=False, time_ref=None, return_spots_occulted=False, transit_model_kwargs={})[source]#

Generate a(n ensemble of) light curve(s).

Light curve output will have shape (n_phases, len(inc_stellar)) or (len(times), len(inc_stellar)).

Parameters:
spot_lonsndarray

Spot longitudes

spot_latsndarray

Spot latitudes

spot_radiindarray

Spot radii

inc_stellarndarray

Stellar inclinations

planetTransitParams, optional

Transiting planet parameters

timesndarray, optional

Times at which to compute the light curve

fastbool, optional

When True, use approximation that spots are fixed on the star during a transit event. When False, account for motion of starspots on stellar surface due to rotation during transit event. Default is False.

time_reffloat, optional

Reference time used as the initial rotational phase of the star, such that the sub-observer point is at zero longitude at time_ref.

return_spots_occultedbool, optional

Return whether or not spots have been occulted.

Returns:
light_curvesndarray

Stellar light curves of shape (n_phases, len(inc_stellar)) or (len(times), len(inc_stellar))

plot(spot_lons, spot_lats, spot_radii, inc_stellar, time=None, planet=None, ax=None, time_ref=0)[source]#

Generate a plot of the stellar surface at time.

Takes the same arguments as light_curve with the exception of the singular time rather than times, plus ax for pre-defined matplotlib axes.

Coordinate frame is the “observer oriented” view defined in Fabrycky & Winn (2009) Figure 1a. The planet transits from left to right across the image. The dashed gray lines represent the upper and lower bounds of the planet’s transit chord.

Parameters:
spot_lonsQuantity

Spot longitudes

spot_latsQuantity

Spot latitudes

spot_radiindarray

Spot radii

inc_stellarQuantity

Stellar inclination

timefloat

Time at which to evaluate the spot parameters

planetTransitParams or list

Planet parameters, or list of planet parameters.

axAxes, optional

Predefined matplotlib axes

time_reffloat

Reference time used as the initial rotational phase of the star, such that the sub-observer point is at zero longitude at time_ref.

Returns:
axAxes

Axis object.

spherical_to_cartesian(spot_lons, spot_lats, inc_stellar, times=None, planet=None, time_ref=None)[source]#

Convert spot parameter matrices in the original stellar coordinates to rotated and tilted cartesian coordinates.

Parameters:
spot_lonsQuantity

Spot longitudes

spot_latsQuantity

Spot latitudes

inc_stellarQuantity

Stellar inclination

timesndarray

Times at which evaluate the stellar rotation

planetTransitParams

Planet parameters

time_reffloat

Reference time used as the initial rotational phase of the star, such that the sub-observer point is at zero longitude at time_ref.

Returns:
tilted_spotsndarray

Rotated and tilted spot positions in cartesian coordinates