API Reference

swxsoc Package

Functions

print_config(config)

Print the current configuration options.

swxsoc.swxdata Module

Container class for Measurement Data.

Classes

SWXData(timeseries[, support, spectra, meta])

A generic object for loading, storing, and manipulating space weather time series data.

swxsoc.util Package

Functions

create_annotation(start_time, text, tags[, ...])

Creates a new annotation for a specified event or time period, with optional filtering by dashboard and panel names.

create_science_filename(instrument, time, ...)

Return a compliant filename.

get_dashboard_id(dashboard_name[, ...])

Retrieves the dashboard UID by its name.

get_panel_id(dashboard_id, panel_name[, ...])

Retrieves the panel ID by dashboard UID and panel name.

parse_science_filename(filepath)

Parses a science filename into its constituent properties.

query_annotations(start_time[, end_time, ...])

Queries annotations within a specific timeframe with optional filters for tags, dashboard, and panel names.

record_timeseries(ts[, ts_name, instrument_name])

Record a timeseries of measurements to AWS Timestream for viewing on a dashboard like Grafana.

remove_annotation_by_id(annotation_id[, ...])

Deletes an annotation by its ID.

warn_deprecated(msg[, stacklevel])

Raise a SWXDeprecationWarning.

warn_user(msg[, stacklevel])

Raise a SWXUserWarning.

Classes

Descriptor(value)

Attribute to specify the data type for the search.

DevelopmentBucket(value)

Attribute for specifying whether to search in the DevelopmentBucket for testing purposes.

Instrument(value)

Attribute for specifying the instrument for the search.

Level(value)

Attribute for specifying the data level for the search.

SWXDeprecationWarning

A warning class to indicate a deprecated feature.

SWXPendingDeprecationWarning

A warning class to indicate a soon-to-be deprecated feature.

SWXSOCClient()

Client for searching for SWXSOC data on AWS.

SWXUserWarning

The primary warning class for SWxSOC.

SWXWarning

The base warning class from which all SWX warnings should inherit.

SearchTime(start[, end, near])

Attribute for specifying the time range for the search.

swxsoc.util.config Module

This module provides configuration file functionality.

This code is based on that provided by SunPy see

licenses/SUNPY.rst

Functions

load_config()

Load and read the configuration file.

copy_default_config([overwrite])

Copy the default configuration file to the user's configuration directory.

print_config(config)

Print the current configuration options.

swxsoc.util.const Module

Various constants defined in cdf.h and used in spacepy.pycdf. Most constants referred to in the CDF manuals are provided by this module.

This code is based on that provided by SpacePy see

licenses/SPACEPY.rst

swxsoc.util.exceptions Module

This module provides errors/exceptions and warnings of general use.

Exceptions that are specific to a given package should not be here, but rather in the particular package.

This code is based on that provided by SunPy see

licenses/SUNPY.rst

Functions

warn_user(msg[, stacklevel])

Raise a SWXUserWarning.

warn_deprecated(msg[, stacklevel])

Raise a SWXDeprecationWarning.

Classes

SWXWarning

The base warning class from which all SWX warnings should inherit.

SWXUserWarning

The primary warning class for SWxSOC.

SWXDeprecationWarning

A warning class to indicate a deprecated feature.

SWXPendingDeprecationWarning

A warning class to indicate a soon-to-be deprecated feature.

swxsoc.util.io Module

Classes

SWXIOHandler()

Abstract base class for handling input/output operations of heliophysics data.

CDFHandler()

A concrete implementation of SWXIOHandler for handling heliophysics data in CDF format.

swxsoc.util.logger Module

This code is based on that provided by SunPy and AstroPy see

licenses/SUNPY.rst and licenses/ASTROPY.rst

Functions

_init_log([config])

Initializes the log.

_config_to_loggerConf(config)

Translates a user-provided YAML config dictionary to astropy.logger.LoggerConf.

Classes

MyLogger(name[, level])

This class is used to set up logging.

swxsoc.util.schema Module

This module provides schema metadata derivations.

This code is based on that provided by SpacePy see

licenses/SPACEPY.rst

Classes

SWXSchema([global_schema_layers, ...])

Class representing a schema for data requirements and formatting.

swxsoc.util.util Module

This module provides general utility functions.

Functions

create_science_filename(instrument, time, ...)

Return a compliant filename.

parse_science_filename(filepath)

Parses a science filename into its constituent properties.

record_timeseries(ts[, ts_name, instrument_name])

Record a timeseries of measurements to AWS Timestream for viewing on a dashboard like Grafana.

get_dashboard_id(dashboard_name[, ...])

Retrieves the dashboard UID by its name.

get_panel_id(dashboard_id, panel_name[, ...])

Retrieves the panel ID by dashboard UID and panel name.

query_annotations(start_time[, end_time, ...])

Queries annotations within a specific timeframe with optional filters for tags, dashboard, and panel names.

create_annotation(start_time, text, tags[, ...])

Creates a new annotation for a specified event or time period, with optional filtering by dashboard and panel names.

remove_annotation_by_id(annotation_id[, ...])

Deletes an annotation by its ID.

_record_dimension_timestream(dimensions[, ...])

Record a single measurement to an AWS timestream for viewing on a dashboard such as Grafana.

Classes

SWXSOCClient()

Client for searching for SWXSOC data on AWS.

SearchTime(start[, end, near])

Attribute for specifying the time range for the search.

Level(value)

Attribute for specifying the data level for the search.

Instrument(value)

Attribute for specifying the instrument for the search.

Descriptor(value)

Attribute to specify the data type for the search.

DevelopmentBucket(value)

Attribute for specifying whether to search in the DevelopmentBucket for testing purposes.

swxsoc.util.validation Module

Functions

validate(file_path[, schema])

Validate a data file such as a CDF.

Classes

SWXDataValidator([schema])

Abstract base class for heliophysics data validators.

CDFValidator([schema])

Validator for CDF files.