FlareCollection

class vspec_vsm.FlareCollection(flares: List[StellarFlare] | StellarFlare)

Bases: object

This class stores a series of flares and does math to turn them into lightcurves.

Parameters:

flares (list of StellarFlare or StellarFlare) – List of flares.

flares

List of flares.

Type:

list of StellarFlare

peaks

Peak times for the flares as a numpy array.

Type:

numpy.ndarray

fwhms

Full width at half maximum for the flares as a numpy array.

Type:

numpy.ndarray

Methods

get_flare_integral_in_timeperiod(tstart, tfinish)

Calculate the integrated time-area for each visible flare in a timeperiod.

get_flares_in_timeperiod(tstart, tfinish)

Generate a mask and select flares without casting to np.ndarray (use a list comprehension instead).

get_visible_flares_in_timeperiod(tstart, tfinish)

Get visible flares in a given time period on a given hemisphere.

index()

Get peak times and fwhms for flares as arrays.

mask(tstart, tfinish)

Create a boolean mask to indicate which flares are visible within a certain time period.

Methods Summary

get_flare_integral_in_timeperiod(tstart, tfinish)

Calculate the integrated time-area for each visible flare in a timeperiod.

get_flares_in_timeperiod(tstart, tfinish)

Generate a mask and select flares without casting to np.ndarray (use a list comprehension instead).

get_visible_flares_in_timeperiod(tstart, tfinish)

Get visible flares in a given time period on a given hemisphere.

index()

Get peak times and fwhms for flares as arrays.

mask(tstart, tfinish)

Create a boolean mask to indicate which flares are visible within a certain time period.

Methods Documentation

get_flare_integral_in_timeperiod(tstart: astropy.units.Quantity, tfinish: astropy.units.Quantity, sub_obs_coords: dict = None)

Calculate the integrated time-area for each visible flare in a timeperiod.

Parameters:
Returns:

flare_timeareas – List of dictionaries containing flare temperatures and integrated time-areas. In the format [{‘Teff’:9000*u.K,’timearea’=3000*u.Unit(‘km2 hr)},…]

Return type:

list of dict

get_flares_in_timeperiod(tstart: astropy.units.Quantity, tfinish: astropy.units.Quantity) List[StellarFlare]

Generate a mask and select flares without casting to np.ndarray (use a list comprehension instead).

Parameters:
Returns:

Flares that occur over specified time period.

Return type:

list of StellarFlare

get_visible_flares_in_timeperiod(tstart: astropy.units.Quantity, tfinish: astropy.units.Quantity, sub_obs_coords: dict = None) List[StellarFlare]

Get visible flares in a given time period on a given hemisphere.

Parameters:
Returns:

A list of flares that occur and are visible to the observer.

Return type:

list of StellarFlare

index()

Get peak times and fwhms for flares as arrays.

Return type:

None

mask(tstart: astropy.units.Quantity, tfinish: astropy.units.Quantity)

Create a boolean mask to indicate which flares are visible within a certain time period.

Parameters:
Returns:

Boolean array of visible flares.

Return type:

np.array