Star¶
-
class
mrspoc.
Star
(spots=None, u1=0.4987, u2=0.1772, r=1, radius_threshold=0.1, inclination=None)[source] [edit on github]¶ Bases:
object
Object defining a star.
Parameters: u1 : float (optional)
Quadratic limb-darkening parameter, linear term
u2 : float (optional)
Quadratic limb-darkening parameter, quadratic term
r : float (optional)
Stellar radius (default is unity)
radius_threshold : float (optional)
If all spots are smaller than this radius, use the analytic solution to compute the stellar centroid, otherwise use the numerical solution.
spots : list (optional)
List of spots on this star.
inclination :
Quantity
Stellar inclination. Default is 90 deg.
Attributes Summary
center_of_light
Compute the center-of-light or centroid for this star, given its spots, and limb-darkening. inclination
Methods Summary
derotate
()limb_darkening
(r)Compute the intensity at radius r
for quadratic limb-darkening law with parametersStar.u1, Star.u2
.limb_darkening_normed
(r)Compute the normalized intensity at radius r
for quadratic limb-darkening law with parametersStar.u1, Star.u2
.plot
([n, ax, col, col_exaggerate])Plot a 2D projected schematic of the star and its spots. rotate
(angle)Rotate the star, by moving the spots. Attributes Documentation
-
center_of_light
¶ Compute the center-of-light or centroid for this star, given its spots, and limb-darkening.
Returns: x_centroid : float
Photocenter in the x dimension, in units of stellar radii
y_centroid : float
Photocenter in the y dimension, in units of stellar radii
-
inclination
¶
Methods Documentation
-
derotate
()[source] [edit on github]¶
-
limb_darkening
(r)[source] [edit on github]¶ Compute the intensity at radius
r
for quadratic limb-darkening law with parametersStar.u1, Star.u2
.Parameters: r : float or
ndarray
Stellar surface position in radial coords on (0, 1)
Returns: intensity : float
Intensity in un-normalized units
-
limb_darkening_normed
(r)[source] [edit on github]¶ Compute the normalized intensity at radius
r
for quadratic limb-darkening law with parametersStar.u1, Star.u2
.Parameters: r : float or
ndarray
Stellar surface position in radial coords on (0, 1)
Returns: intensity : float
Intensity relative to the intensity at the center of the disk.
-
plot
(n=3000, ax=None, col=True, col_exaggerate=1)[source] [edit on github]¶ Plot a 2D projected schematic of the star and its spots.
Parameters: ax :
Axes
Axis object to draw the plot on
col : bool (optional)
Show the center of light with a red “x” if
True
col_exaggerate : float (optional)
Exaggerate the center-of-light coordinate by this factor
n : int
Number of pixels per side in the image.
Returns: ax :
Axes
Matplotlib axis object, with the new plot on it.
-
rotate
(angle)[source] [edit on github]¶ Rotate the star, by moving the spots.
Parameters: angle : Quantity
-