pyValEIA.plots.mad_diagnostic_plots

Functions for plotting Madrigal TEC data and evaluating EIA detection.

Functions

madrigal_model_world_maps(stime, mad_dc, mod_map)

Plot world maps for both model data and Madrigal TEC.

mad_model_single_plot(mad_dc, mod_dc, lon_start, ...)

Create one Madrigal TEC vs model data plot.

model_mad_daily_file(start_day, mad_file_dir, ...[, ...])

Create daily files for Madrigal/model and daily plots.

Module Contents

pyValEIA.plots.mad_diagnostic_plots.madrigal_model_world_maps(stime, mad_dc, mod_map)[source]

Plot world maps for both model data and Madrigal TEC.

Parameters:
stimedatetime object

Universal time for the tec data and solar terminator

mad_dcdict

Madrigal data input

mod_mapdict

NIMO data input

Returns:
figfigure

matplotlib figure with 2 panels (Madrigal (top) NIMO (bottom))

pyValEIA.plots.mad_diagnostic_plots.mad_model_single_plot(mad_dc, mod_dc, lon_start, stime, mlat_val, model_name='NIMO', max_nan=20, fosi=14)[source]

Create one Madrigal TEC vs model data plot.

Parameters:
mad_dcdict

dict of Madrigal TEC data

mod_dcdict

dict of model data

lon_startint

starting longitude for plot. i.e. 90

stimedatetime

datetime for plot

mlat_valint

magnetic latitude cutoff

model_namestr

Name of model (default=’NIMO’)

max_nanfloat

Maximum acceptable percent nan values in a pass (default=20)

fosiint

font size (default=14)

Returns:
figmpl.Figure

Fingle figure of madrigal and input model, not automatically saved

pyValEIA.plots.mad_diagnostic_plots.model_mad_daily_file(start_day, mad_file_dir, mod_file_dir, mod_name_format, model_name='NIMO', mod_load_func=io.load.load_nimo, mlat_val=30, lon_start=-90, file_save_dir='', fig_on=True, fig_save_dir='', max_nan=20, mad_filt='barrel_average', mad_interpolate=2, mad_envelope=False, mad_barrel=3, mad_window=3, mod_filt='', mod_interpolate=2, mod_envelope=False, mod_barrel=3, mod_window=3, fosi=15, ne_var='dene', lon_var='lon', lat_var='lat', alt_var='alt', hr_var='hour', min_var='minute', tec_var='tec', hmf2_var='hmf2', nmf2_var='nmf2', mod_cadence=15, max_tdif=20)[source]

Create daily files for Madrigal/model and daily plots.

Parameters:
start_daydatetime

day of desired files

mad_file_dirstr

Madrigal file directory

mod_file_dirstr

NIMO file directory

mod_name_formatstr

prefix of NIMO file including date format before .nc extension, e.g., ‘NIMO_AQ_%Y%j’

model_namestr

Model name (default=’NIMO’)

mod_load_funcfunction

Function for loading model data (default=`io.load.load_nimo`)

mlat_val: int

magnetic latitude cutoff (default=30)

lon_startint

longitude of desired region, e.g., -90 will span -90 to -30 degrees (default=-90)

file_save_dirstr

directory to save file to (default=’’)

fig_on: bool

if True, plot will be made, if False, plot will not be made (default=True)

fig_save_dirstr

directory to save figure (default=’’)

max_nanint or float

Maximum acceptable percent nan values in a pass (default=20)

mad_filtstr

Desired Filter for madrigal data (default=’barrel_average’)

mad_interpolateint

int that determines the number of data points in interpolation new length will be len(density) x interpolate (default=2)

mad_envelopebool

if True, barrel roll will include points inside an envelope, if False, no envelope will be used (default=False)

mad_barrelfloat

latitudinal radius of barrel for madrigal (default=3)

mad_windowfloat

latitudinal width of moving window (default=3)

mod_filtstr

Desired Filter for nimo data (default=’’)

mod_interpolateint

int that determines the number of data points in interpolation new length will be len(density) x interpolate (default=2)

mod_envelopebool

if True, barrel roll will include points inside an envelope, if False, no envelope will be used (default=False)

mod_barrelfloat

latitudinal radius of barrel for swarm (default=3)

mod_windowfloat

latitudinal width of moving window (default=3)

fosiint

fontsize for plot, with title being fosi + 10 (default=15)

ne_varstr

Electron denstiy variable in the model file (default=’dene’)

lon_varstr

Longitude variable in the model file (default=’lon’)

lat_varstr

Latitude variable in the model file (default=’lat’)

alt_varstr

Altitude variable in the model file (default=’alt’)

hr_varstr

Hour of day variable in the model file (default=’hour’)

min_varstr

Minute of hour variable in the model file (default=’minute’)

tec_varstr

TEC variable in the model file (default=’tec’)

hmf2_varstr

hmF2 variable in the model file (default=’hmf2’)

nmf2_varstr

NmF2 variable in the model file (default=’nmf2’)

mod_cadenceint

Time cadence of Model data in minutes (default=15)

max_tdiffloat

Maximum allowed time in minutes between a model and Swarm conjunction (default=20)

Returns:
dfpd.DataFrame

DataFrame with Madrigal and model data for the desired longitude sector

figmpl.Figure

Saved not opened