solarwindpy.solar_activity.base.IndicatorExtrema

class IndicatorExtrema(*args, **kwargs)[source]

Bases: Base

Base class for objects describing indicator extrema.

__init__(*args, **kwargs)[source]
property data
property cycle_intervals

pd.Interval for rising and falling edges and full cycle.

property extrema_bands

Bands of time (\(\Delta t\)) about indicator extrema.

Parameters:

dt (str or pandas.Timedelta) – Window half-width used in calculate_extrema_bands().

abstractmethod load_or_set_data()[source]
calculate_intervals()[source]

Compute rising, falling, and full-cycle time intervals.

Notes

The rising edge comes before the falling edge in time, i.e. it’s Min N followed by Max N. Also calculate intervals for a full SSN cycle.

cut_spec_by_interval(epoch, kind=None, tk_cycles=None)[source]

Assign epochs to solar-cycle intervals.

Parameters:
  • epoch (pandas.Series or pandas.DatetimeIndex) – Data to cut.

  • kind (str, optional) –

    If provided, restricts the cut to a subset of interval types.

    Key

    Description

    None

    Cut by all available options.

    ”Cycle”

    Cut by solar cycle

    ”Rise”

    Cut by rising edge

    ”Fall”

    Cut by falling edge

    ”Edges”

    Cut by [β€œFall”, β€œRise”]. Exclusive option.

    Note that "Edges" is exclusive and will specify ["Fall", "Rise"] alone.

  • tk_cycles (list or slice, optional) – If not None, a selector used to choose target solar cycles.

Returns:

Series of pandas.Interval objects labeling each epoch.

Return type:

pandas.Series

calculate_extrema_bands(dt='365d')[source]

Return time windows around indicator extrema.

Parameters:
dtstr or pandas.Timedelta, optional

Half-width of the window around each extremum. Defaults to "365d".

Returns:
pandas.DataFrame

Min and Max intervals for each cycle.

cut_about_extrema_bands(epoch, tk_cycles=None, kind=None)[source]

Bin epochs relative to extrema bands.

Computed with calculate_extrema_bands().

Parameters:
  • epoch (pandas.DatetimeIndex) – Times to classify.

  • tk_cycles (slice, optional) – Subset of cycles to use when cutting.

  • kind ({{"Min", "Max"}}, optional) – Restrict the classification to minima or maxima.

Returns:

A series of intervals and a mapped series of the form "N-Min" or "N-Max".

Return type:

tuple[pandas.Series, pandas.Series]

property logger

logging.Logger attached to the instance.