Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Update cdfpeek for cdflib
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Sep 13, 2018
1 parent 1fed466 commit a695f0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ New features
Bug fixes
^^^^^^^^^
- The accidentally removed Ulysses spice kernel has returned. :issue:`582`
- `heliopy.data.helper.cdfpeek` has been updated to work with cdflib, and now
prints all CDF file information.

Version 0.6.0
-------------
Expand Down
8 changes: 7 additions & 1 deletion heliopy/data/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ def cdfpeek(cdf_loc):
Local location of the cdf file.
"""
import cdflib
cdf_loc = os.path.expanduser(cdf_loc)
cdf = cdflib.CDF(cdf_loc)
print(cdf)
info = cdf.cdf_info()
for key in info:
print('=' * len(key))
print(key)
print('=' * len(key))
print(info[key])


def listdata(probes=None):
Expand Down

0 comments on commit a695f0c

Please sign in to comment.