API Reference¶
swxsoc Package¶
Functions¶
|
Print the current configuration options. |
swxsoc.swxdata Module¶
Container class for Measurement Data.
Classes¶
|
A generic object for loading, storing, and manipulating space weather time series data. |
swxsoc.util Package¶
Functions¶
|
Raise a |
|
Raise a |
|
Return a compliant filename. |
|
Parses a science filename into its constituent properties. |
Classes¶
The base warning class from which all SWX warnings should inherit. |
|
The primary warning class for SWxSOC. |
|
A warning class to indicate a deprecated feature. |
|
A warning class to indicate a soon-to-be deprecated feature. |
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 and read the configuration file. |
|
|
Copy the default configuration file to the user's configuration directory. |
|
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¶
|
Raise a |
|
Raise a |
Classes¶
The base warning class from which all SWX warnings should inherit. |
|
The primary warning class for SWxSOC. |
|
A warning class to indicate a deprecated feature. |
|
A warning class to indicate a soon-to-be deprecated feature. |
swxsoc.io Package¶
Input/output handlers for SWxSOC heliophysics data.
This package provides the abstract SWXIOHandler interface together
with concrete file-format handlers (currently CDFHandler for CDF
files) and shared utilities such as swxsoc.io.fillval for converting
between in-memory NaN/mask representations and on-disk FILLVAL sentinels.
swxsoc.io.base_handler Module¶
Abstract base class for SWxSOC input/output handlers.
Classes¶
Abstract base class for handling input/output operations of heliophysics data. |
swxsoc.io.cdf_handler Module¶
CDF (Common Data Format) implementation of SWXIOHandler.
Handles reading SWxSOC-style CDF files into the SWXData container and writing SWXData instances back out to CDF.
Classes¶
A concrete implementation of SWXIOHandler for handling heliophysics data in CDF format. |
swxsoc.io.fillval Module¶
Helpers for converting between in-memory NaN/mask representations and on-disk CDF FILLVAL sentinels.
This module is intentionally CDF-agnostic; it operates on plain numpy arrays
and scalar FILLVAL values so it can be unit-tested in isolation from
spacepy.pycdf.
Conventions¶
Floats round-trip both
np.nanand a parallel booleanmask.Integers preserve dtype; the FILLVAL sentinel stays in
.dataand the mask marks fill positions.Strings (
S/Udtypes) use the ISTP single-space sentinel (b" "/" "). As a write-time convenience numpy’s coercion ofnp.nanto the literal bytesb"nan"(andb"NaN") is also treated as fill. The reader is strict: only the spec sentinel maps to a mask bit.The ISTP FILLVAL values for specific CDF types (including the Epoch variants) are owned by
swxsoc.io.fillval.get_fillval().
Functions¶
|
Return True if |
|
Return True if |
|
Compute a boolean mask of fill positions in |
|
Return a copy of |
|
For float arrays, return a copy of |
swxsoc.util.logger Module¶
- This code is based on that provided by SunPy and AstroPy see
licenses/SUNPY.rst and licenses/ASTROPY.rst
Functions¶
|
Initializes the log. |
|
Translates a user-provided YAML config dictionary to |
Classes¶
|
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¶
|
Class representing a schema for data requirements and formatting. |
swxsoc.util.util Module¶
This module provides general utility functions.
Functions¶
|
Return a compliant filename. |
|
Parses a science filename into its constituent properties. |
swxsoc.util.grafana Module¶
Grafana annotation and dashboard utility functions.
This module provides functions for interacting with Grafana’s annotation API, including querying, creating, and removing annotations.
Functions¶
|
Retrieves the dashboard UID by its name. |
|
Retrieves the panel ID by dashboard UID and panel name. |
|
Queries annotations within a specific timeframe with optional filters for tags, dashboard, and panel names. |
|
Creates a new annotation for a specified event or time period, with optional filtering by dashboard and panel names. |
|
Deletes an annotation by its ID. |
swxsoc.util.validation Module¶
Functions¶
|
Validate a data file such as a CDF. |
Classes¶
|
Abstract base class for heliophysics data validators. |
|
Validator for CDF files. |
swxsoc.net Package¶
swxsoc.net.attr Module¶
Search attribute classes and walker for the SWXSOC FIDO client.
This module defines custom search attributes used by the SWXSOCClient to query SWXSOC data archives on AWS S3.
Classes¶
|
Attribute for specifying the time range for the search. |
|
Attribute for specifying the data level for the search. |
|
Attribute for specifying the instrument for the search. |
|
Attribute to specify the data type for the search. |
|
Attribute for specifying whether to search in the DevelopmentBucket for testing purposes. |
swxsoc.net.client Module¶
SWXSOC FIDO Client for searching and fetching data from AWS S3.
This module provides the SWXSOCClient class, which implements the sunpy BaseClient interface for querying SWXSOC data archives.
Classes¶
Client for searching for SWXSOC data on AWS. |
swxsoc.db Package¶
swxsoc.db.timeseries Module¶
AWS Timestream recording functions for SWXSOC data.
This module provides functions to record timeseries data and individual measurements to AWS Timestream for viewing on dashboards like Grafana.
Functions¶
|
Record a timeseries of measurements to AWS Timestream for viewing on a dashboard like Grafana. |
|
Record a single measurement to an AWS timestream for viewing on a dashboard such as Grafana. |