StarSpot

class vspec_vsm.StarSpot(lat: ~astropy.units.quantity.Quantity, lon: ~astropy.units.quantity.Quantity, area_max: ~astropy.units.quantity.Quantity, area_current: ~astropy.units.quantity.Quantity, teff_umbra: ~astropy.units.quantity.Quantity, teff_penumbra: ~astropy.units.quantity.Quantity, area_over_umbra_area: float = 5, is_growing: bool = True, growth_rate: ~astropy.units.quantity.Quantity = <Quantity 0.52 1 / d>, decay_rate: ~astropy.units.quantity.Quantity = <Quantity 10.89 msh / d>, grid_params: int | ~typing.Tuple[int, int] = (500, 1000), gridmaker: ~vspec_vsm.coordinate_grid.CoordinateGrid = None)

Bases: object

A Star Spot

Our star spot model is nearly entirely based on observations of the sun. Sun spots can be resolved and are well-studied, whereas spots on other stars (e.g., M dwarfs) can only observed indirectly. We therefore designed our spot model to mimic sun spots but with parameterized values for spot temperature and lifetime that can be matched to observations of other stellar types and ages.

Parameters:
radius
coords

A dictionary containing the latitude and longitude of the spot’s center.

Type:

dict

area_max

The maximum area a spot reaches before it decays.

Type:

astropy.units.Quantity

area_current

The current area of the spot.

Type:

astropy.units.Quantity

Teff_umbra

The effective temperature of the spot umbra.

Type:

astropy.units.Quantity

Teff_penumbra

The effective temperature of the spot penumbra.

Type:

astropy.units.Quantity

decay_rate

The rate at which a spot linearly decays.

Type:

astropy.units.Quantity

total_area_over_umbra_area

The ratio of total spot area to umbra area. 5+/-1 according to Solanki [2003].

Type:

float

is_growing

Whether or not the spot is growing.

Type:

bool

growth_rate

Fractional growth of the spot for a given unit time.

Type:

astropy.units.Quantity

gridmaker

A CoordinateGrid object used to produce points on the stellar surface. If None, a CoordinateGrid object is created with default parameters.

Type:

CoordinateGrid or None

r

An array of points on the stellar surface with their pre-computed distance from the center of the spot.

Type:

np.ndarray

References

Solanki [2003] Davenport et al. [2015]

Attributes:
radius

Radius

Methods

age(time)

Age a spot according to its growth timescale and decay rate

angular_radius(star_rad)

Angular radius

map_pixels(star_rad)

Map latitude and longituide points continaing the umbra and penumbra

set_gridmaker(gridmaker)

Set the gridmaker attribute safely.

surface_fraction(sub_obs_coords, star_rad[, ...])

Determine the surface fraction covered by a spot from a given angle of observation using the orthographic projection.

Attributes Summary

radius

Radius

Methods Summary

age(time)

Age a spot according to its growth timescale and decay rate

angular_radius(star_rad)

Angular radius

map_pixels(star_rad)

Map latitude and longituide points continaing the umbra and penumbra

set_gridmaker(gridmaker)

Set the gridmaker attribute safely.

surface_fraction(sub_obs_coords, star_rad[, ...])

Determine the surface fraction covered by a spot from a given angle of observation using the orthographic projection.

Attributes Documentation

radius

Radius

Get the radius of the spot.

Returns:

The radius of the spot.

Return type:

astropy.units.Quantity

Methods Documentation

age(time: astropy.units.Quantity) None

Age a spot according to its growth timescale and decay rate

Parameters:

time (astropy.units.Quantity) – Length of time to age the spot. For most realistic behavior, time should be << spot lifetime

Notes

This method updates the area_current attribute of the StarSpot object to simulate the growth and decay of a sunspot.

\[\begin{split}A(t) = \left\{ \begin{array}{lr} A_0 e^{(t-t_0)/\tau}, & \text{if } t \leq t_0 \\ A_0 - W(t-t_0), & \text{if } t > t_0 \end{array} \right\}\end{split}\]

If the spot is growing, it calculates the time required to reach the maximum area (time_to_max) using the growth rate (growth_rate) and the maximum area (area_max). If time_to_max is greater than the input time (time), it grows the spot and updates the area_current attribute. If time_to_max is less than or equal to the input time, it sets the is_growing attribute to False and calculates the area that the spot should decay (area_decay). If the decayed area (area_decay) is greater than the maximum area (area_max), the area_current attribute is set to zero. Otherwise, it updates the area_current attribute accordingly.

If the spot is not growing, it calculates the area that the spot should decay (area_decay). If the decayed area (area_decay) is greater than the maximum area (area_max), the area_current attribute is set to zero. Otherwise, it updates the area_current attribute accordingly.

angular_radius(star_rad: astropy.units.Quantity) astropy.units.Quantity

Angular radius

Get the angular radius of the spot on the stellar surface.

Parameters:

star_rad (astropy.units.Quantity) – The radius of the star.

Returns:

The angular radius of the spot.

Return type:

astropy.units.Quantity

map_pixels(star_rad: astropy.units.Quantity) dict

Map latitude and longituide points continaing the umbra and penumbra

Parameters:

star_rad (astropy.units.Quantity) – The radius of the star.

Returns:

Dictionary of points covered by the umbra and penumbra. Keys are the effective temperature (Teff) of each region. Values are numpy boolean arrays.

Return type:

dict

Notes

This function calculates the angular radius of the spot based on the provided star_rad, and uses the total_area_over_umbra_area attribute to determine the size of the spot. Then, it returns a dictionary with two keys, Teff_umbra and Teff_penumbra, whose values are boolean arrays indicating which points are covered by each region.

set_gridmaker(gridmaker: CoordinateGrid)

Set the gridmaker attribute safely.

Parameters:

gridmaker (VSPEC.helpers.CoordinateGrid) – The CoordinateGrid object to set

surface_fraction(sub_obs_coords: dict, star_rad: astropy.units.Quantity, n_points: int = 1001) float

Determine the surface fraction covered by a spot from a given angle of observation using the orthographic projection.

Parameters:
  • sub_obs_coords (dict) – Dictionary giving coordinates of the sub-observation point. This is the point that is at the center of the stellar disk from the view of an observer. Format: {‘lat’: lat, ‘lon’: lon} where lat and lon are astropy.units.Quantity objects.

  • star_rad (astropy.units.Quantity) – Radius of the star.

  • N (int, optional) – Number of points to use in numerical integration. N=1000 is not so different from N=100000.

Returns:

Fraction of observed disk covered by the spot.

Return type:

float