pyValEIA.eia.types

Functions to specify the EIA morphology.

Functions

clean_type(state_array)

Simplifies EIA states into 4 base categories and 3 directions.

eia_slope_state(z_lat, lat, dens[, ghost, zero_slope])

Set the EIA state for a set of peaks and troughs in plasma density data.

ghost_check(z_lat_og, lat, tec)

Check for a ghost formation.

single_peak_rules(p1, tec, lat)

Determine if a peak is a peak, flat, or trough.

double_peak_rules(p1a, p2b, tec, lat[, zero_slope])

Determine if something is a saddle, eia, or single peak.

ghost_ns_rules(plats, lat, tec)

Determine if a ghost is symmetric, dominate north, or dominate south.

saddle_ns(p1, p2, tec, lat)

Evaluate whether or not a saddle should be labelled with a direction.

Module Contents

pyValEIA.eia.types.clean_type(state_array)[source]

Simplifies EIA states into 4 base categories and 3 directions.

Parameters:
state_arrayarray-like

Array of strings specifying the EIA state

Returns:
base_typesarray-like

Simplifies EIA type strings into one of: flat, trough, peak, or EIA.

base_dirsarray-like

Simplifies EIA type strings into state directions: north, south, or neither.

Raises:
ValueError

If a base_type value cannot be established for any input value.

See also

eia_slope_state
pyValEIA.eia.types.eia_slope_state(z_lat, lat, dens, ghost=True, zero_slope=0.5)[source]

Set the EIA state for a set of peaks and troughs in plasma density data.

Parameters:
z_latarray-like

Latitude locations of the peaks and troughs (locations with zero-value slopes) in degrees

latarray-like

Latitude locations of the plasma density measurements in degrees

densarray-like

Electron density, ion density, or TEC data at a set of latitudes

ghostbool (kwarg default True)

indicates whether or not ghost type should be included in analysis True (default) include ghost type, False exclude ghost type

zero_slopefloat

Threshold for the zero-slope values (default=0.5)

Returns:
eia_statestr

String specifying the EIA state, one of 21 possible options eia_symmetric

platsarray-like

Latitudes of peaks

p3latsarray-like

Additional peak latitudes, if additional peak(s) are between the EIA double peaks and the type is not ghost; these are likely artifacts

Notes

EIA States | Description ————————|———————– flat_north | A peakless TEC gradient that is higher in north flat_south | A peakless TEC gradient that is higher in south flat | A roughly flat TEC across the equator peak | A single peak within 5 degrees of the equator peak_north | A single peak in the northern hemisphere peak_south | A single peak in the southern hemisphere eia_symmetric | A hemispherically symmetric EIA eia_north | An EIA with a higher peak in the north eia_south | An EIA with a higher peak in the south eia_saddle_peak | An EIA where there is a saddle and a peak eia_saddle_peak_north | An EIA where there is a saddle and a peak, and

the peak is in the North
eia_saddle_peak_south | An EIA where there is a saddle and a peak, and
the peak is in the South

trough | concave like TEC, dip in center eia_ghost_symmetric | Triple peak between +/-15 degrees maglat where

1 peak crosses over 0 maglat
North and South “arms” are symmetric
eia_ghost_north | Triple peak between +/-15 degrees maglat where
1 peak crosses over 0 maglat
North “arm” higher than South “arm” are symmetric
eia_ghost_south | Triple peak between +/-15 degrees maglat where
1 peak crosses over 0 maglat
South “arm” higher than North “arm” are symmetric
eia_ghost_peak_north | One armed ghost where 1 peak crosses 0 maglat
Second peak in north
eia_ghost_peak_south | One armed ghost where 1 peak crosses 0 maglat
Second peak in south
pyValEIA.eia.types.ghost_check(z_lat_og, lat, tec)[source]

Check for a ghost formation.

Parameters:
z_lat_ogint

single index of first maxima

latarray-like

latitude

tecarray-like

tec or ne

Returns:
eia_statestr

string of eia state– options: ‘’ (no ghost), ‘eia_ghost_’ + north or south or symmetric, ‘ghost_peak_’ + north or south

spookybool

if spooky = True, then there is a ghost if spooky = False, then no ghosts

platsarray-like

array of latitudes if ghost is found

Notes

A ghost is formed when the EIA is developing or deteriorating.

pyValEIA.eia.types.single_peak_rules(p1, tec, lat)[source]

Determine if a peak is a peak, flat, or trough.

Parameters:
p1array-like of length 1

index of maxima

latarray-like

latitude

tecarray-like

tec or ne

Returns:
eia_statestr

saddle, peak (north, south, (saddle) peak, (saddle) trough)

platsarray-like

latitude of peak

pyValEIA.eia.types.double_peak_rules(p1a, p2b, tec, lat, zero_slope=0.5)[source]

Determine if something is a saddle, eia, or single peak.

Parameters:
p1aint

single index of first maxima

p2bint

single index of second maxima

latarray-like

latitude

tecarray-like

tec or ne

zero_slopefloat

Threshold for a zero-sloped line (default=0.5)

Returns:
eia_statestr

string of eia state including: ‘eia_north’, ‘eia_south’, ‘eia_symmetric’, ‘eia_saddle_peak’, ‘eia_saddle_peak_north’, ‘eia_saddle_peak_south’, and orientations output by single_peak_rules

pyValEIA.eia.types.ghost_ns_rules(plats, lat, tec)[source]

Determine if a ghost is symmetric, dominate north, or dominate south.

Parameters:
platsarray-like

latitudes of peaks

latarray-like

latitude

tecarray-like

tec or ne

Returns:
eia_nsstr

string of ‘_symmetric’, ‘_south’, or ‘_north’

pyValEIA.eia.types.saddle_ns(p1, p2, tec, lat)[source]

Evaluate whether or not a saddle should be labelled with a direction.

Parameters:
p1int

index of first peak

p2int

index of second peak

latarray-like

latitude

tecarray-like

tec or ne

Returns:
eia_nsstr

direction of saddle ‘_peak’, ‘_peak_north’, ‘_peak_south’