FaculaGenerator¶
- class vspec_vsm.FaculaGenerator(dist_r_peak: ~astropy.units.quantity.Quantity, dist_r_logsigma: float, depth: ~astropy.units.quantity.Quantity, dist_life_peak: ~astropy.units.quantity.Quantity, dist_life_logsigma: float, floor_teff_slope: ~astropy.units.quantity.Quantity, floor_teff_min_rad: ~astropy.units.quantity.Quantity, floor_teff_base_dteff: ~astropy.units.quantity.Quantity, wall_teff_slope: ~astropy.units.quantity.Quantity, wall_teff_intercept: ~astropy.units.quantity.Quantity, coverage: float, dist: str = 'iso', grid_params: int | ~typing.Tuple[int, int] = (500, 1000), gridmaker: ~vspec_vsm.coordinate_grid.CoordinateGrid = None, rng: ~numpy.random._generator.Generator = Generator(PCG64) at 0x7F5F71E16DC0)¶
Bases:
objectFacula Generator
Class controling the birth rates and properties of new faculae.
- Parameters:
dist_r_peak (astropy.units.Quantity) – The peak of the radius distribution.
dist_r_logsigma (float) – The standard deviation of \(\log{r_0}\)
depth (astropy.units.Quantity) – The depth of the facula depression.
dist_life_peak (astropy.units.Quantity) – The peak of the lifetime distribution.
dist_life_logsigma (float) – The standard deviation of \(\log{\tau}\)
floor_teff_slope (astropy.units.Quantity) – The slope of the radius-Teff relationship
floor_teff_min_rad (astropy.units.Quantity) – The minimum radius at which the floor is visible. Otherwise the facula is a bright point – even near disk center.
floor_teff_base_dteff (astropy.units.Quantity) – The Teff of the floor at the minimum radius.
wall_teff_slope (astropy.units.Quantity) – The slope of the radius-Teff relationship
wall_teff_intercept (astropy.units.Quantity) – The Teff of the wall when \(R = 0\).
coverage (float) – The fraction of the surface covered by faculae in growth-deacay equilibrium.
dist (str) – Type of distribution. Currently only iso is supported.
nlat (int, default=VSPEC.config.nlat) – The number of latitude points on the stellar sufrace.
nlon (int, default=VSPEC.config.nlon) – The number of longitude points on the stellar surface.
gridmaker (CoordinateGrid, default=None) – A CoordinateGrid object to create the stellar sufrace grid.
rng (numpy.random.Generator, default=numpy.random.default_rng()) – The random number generator to use.
- mean_area¶
- dist_r_peak¶
The peak of the radius distribution.
- Type:
- depth¶
The depth of the facula depression.
- Type:
- dist_life_peak¶
The peak of the lifetime distribution.
- Type:
- floor_teff_slope¶
The slope of the radius-Teff relationship
- Type:
- floor_teff_min_rad¶
The minimum radius at which the floor is visible. Otherwise the facula is a bright point – even near disk center.
- Type:
- floor_teff_base_dteff¶
The Teff of the floor at the minimum radius.
- Type:
- wall_teff_slope¶
The slope of the radius-Teff relationship
- Type:
- wall_teff_intercept¶
The Teff of the wall when \(R = 0\).
- Type:
- gridmaker¶
A CoordinateGrid object to create the stellar sufrace grid.
- Type:
CoordinateGrid or None
- rng¶
The random number generator to use.
- Type:
numpy.random.Genrator
- Attributes:
mean_areaThe time-averaged area of a typical facula.
Methods
birth_faculae(time, rad_star)Over a given time duration, compute the number of new faculae to create.
generate_faculae(n_to_generate)Generate a given number of new Faculae
get_coords(n_to_generate)Generate random coordinates for new Faculae to be centered at.
get_n_faculae_expected(time, rad_star)Over a given time duration, compute the number of new faculae to create.
off([grid_params, gridmaker, rng])An instance that does not generate any faculae.
Attributes Summary
The time-averaged area of a typical facula.
Methods Summary
birth_faculae(time, rad_star)Over a given time duration, compute the number of new faculae to create.
generate_faculae(n_to_generate)Generate a given number of new Faculae
get_coords(n_to_generate)Generate random coordinates for new Faculae to be centered at.
get_n_faculae_expected(time, rad_star)Over a given time duration, compute the number of new faculae to create.
off([grid_params, gridmaker, rng])An instance that does not generate any faculae.
Attributes Documentation
- mean_area¶
The time-averaged area of a typical facula.
\[\bar{A} = \frac{ \pi r_0 ^2 (1-e^{-2}) }{2}\]- Type:
Methods Documentation
-
birth_faculae(time:
astropy.units.Quantity, rad_star:astropy.units.Quantity)¶ Over a given time duration, compute the number of new faculae to create. Create new faculae and assign them parameters.
- Parameters:
time (astropy.units.Quantity) – Time over which to create faculae.
rad_star (astropy.units.Quantity) – Radius of the star.
Teff_star (astropy.units.Quantity) – Temperature of the star.
- Returns:
Tuple of new faculae.
- Return type:
- get_coords(n_to_generate: int)¶
Generate random coordinates for new Faculae to be centered at.
- Parameters:
n_to_generate (int) – The number of lat/lon pairs to create.
- Returns:
lats (astropy.units.Quantity) – The latitude coordinates of the new faculae.
lons (astropy.units.Quantity) – The longitude coordinates of the new faculae.
- Raises:
NotimplementedError – If dist is ‘solar’.
ValueError – If dist is not recognized.
-
get_n_faculae_expected(time:
astropy.units.Quantity, rad_star:astropy.units.Quantity) float¶ Over a given time duration, compute the number of new faculae to create.
- Parameters:
time (astropy.units.Quantity) – Time over which to create faculae.
rad_star (astropy.units.Quantity) – Radius of the star.
- Returns:
n_exp – The expected number of faculae to be birthed in the given time.
- Return type:
Notes
\[N_{exp} = \frac{X 4 \pi R_* ^2 t}{2\tau \bar{A}}\]For coverage fraction \(X\), stellar radius \(R_*\), time \(t\), lifetime \(\tau\), and time-averaged area \(\bar{A}\).
- classmethod off(grid_params: int | ~typing.Tuple[int, int] = 1000, gridmaker: ~vspec_vsm.coordinate_grid.CoordinateGrid = None, rng: ~numpy.random._generator.Generator = Generator(PCG64) at 0x7F5F71E16EA0)¶
An instance that does not generate any faculae.
- Parameters:
grid_params (int or tuple) – The number of latitude and longitude points on the stellar surface.
gridmaker (CoordinateGrid) – A CoordinateGrid object to create the stellar surface grid.
rng (numpy.random.generator) – The random number generator to use.