spacepy.pycdf.CDFCopy

class spacepy.pycdf.CDFCopy(cdf)[source]

A dictionary-like copy of all data and attributes in a CDF

Data are VarCopy objects, keyed by variable name. CDF attributes are in attrs. (I.e., data are accessed much like from a CDF).

Do not instantiate this class directly; use copy() on an existing CDF.

Examples

>>> from spacepy import pycdf
>>> with pycdf.CDF('test.cdf') as cdffile:
...     data = cdffile.copy()

Python dictionary containing attributes copied from the CDF.

__init__(cdf)[source]

Copies all data and attributes from a CDF

Parameters:
cdfCDF

CDF to take data from

Methods

Attributes

attrs: collections.abc.Mapping