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:
objectA 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:
lat (astropy.units.Quantity) – Latitude of spot center. North is positive.
lon (astropy.units.Quantity) – Longitude of spot center. East is positive.
Amax (astropy.units.Quantity) – The maximum area a spot reaches before it decays.
A0 (astropy.units.Quantity) – The current spot area.
Teff_umbra (astropy.units.Quantity) – The effective temperature of the spot umbra.
Teff_penumbra (astropy.units.Quantity) – The effective temperature of spot penumbra.
r_A (float) – The ratio of total spot area to umbra area. 5+/-1 according to Solanki [2003].
growing (bool) – Whether or not the spot is growing.
growth_rate (astropy.units.Quantity) – Fractional growth of the spot for a given unit time. From from sunspot literature, can be 0.52/day to 1.83/day [Solanki, 2003]. According to M dwarf literature, can effectively be 0 [Davenport et al., 2015].
decay_rate (astropy.units.Quantity) – The rate at which a spot linearly decays. From sunspot literature, this is 10.89 MSH/day [Solanki, 2003]. According to M dwarf literature, this can be 0 [Davenport et al., 2015].
Nlat (int, default=500) – Number of latitude points.
Nlon (int, default=1000) – Number of longitude points.
gridmaker (CoordinateGrid, default=None) – Coordinate grid object to produce points in the stellar surface. Ideally, this is passed from a container object (such as SpotCollection).
- radius¶
- area_max¶
The maximum area a spot reaches before it decays.
- Type:
- area_current¶
The current area of the spot.
- Type:
- Teff_umbra¶
The effective temperature of the spot umbra.
- Type:
- Teff_penumbra¶
The effective temperature of the spot penumbra.
- Type:
- decay_rate¶
The rate at which a spot linearly decays.
- Type:
- total_area_over_umbra_area¶
The ratio of total spot area to umbra area. 5+/-1 according to Solanki [2003].
- Type:
- growth_rate¶
Fractional growth of the spot for a given unit time.
- Type:
- 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:
radiusRadius
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
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:
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:
-
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:
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: