Last active
July 1, 2022 13:29
-
-
Save jtniehof/fad5948563fddd28c0f56fbee956643c to your computer and use it in GitHub Desktop.
Example of loading CDF file into a SpaceData object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download a file from http://research.ssl.berkeley.edu/data/psp/data/sci/fields/l2/mag_SC_1min/ | |
import spacepy.pycdf | |
with spacepy.pycdf.CDF('psp_fld_l2_mag_SC_1min_20200801_v01.cdf') as f: | |
alldata = f.copy() | |
print(alldata.keys()) | |
print(alldata.attrs) | |
print(alldata['psp_fld_l2_mag_SC_1min'][:5]) | |
print(alldata['psp_fld_l2_mag_SC_1min'].attrs) | |
alldata.tree() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment