cdasws 1.7.41__py3-none-any.whl → 1.7.44__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cdasws/__init__.py +111 -15
- cdasws/__main__.py +16 -5
- cdasws/datarepresentation.py +1 -1
- cdasws/datarequest.py +40 -4
- {cdasws-1.7.41.dist-info → cdasws-1.7.44.dist-info}/METADATA +13 -13
- cdasws-1.7.44.dist-info/RECORD +13 -0
- {cdasws-1.7.41.dist-info → cdasws-1.7.44.dist-info}/WHEEL +1 -1
- cdasws-1.7.41.dist-info/RECORD +0 -13
- {cdasws-1.7.41.dist-info → cdasws-1.7.44.dist-info}/LICENSE +0 -0
- {cdasws-1.7.41.dist-info → cdasws-1.7.44.dist-info}/top_level.txt +0 -0
cdasws/__init__.py
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
#
|
|
25
25
|
# NOSA HEADER END
|
|
26
26
|
#
|
|
27
|
-
# Copyright (c) 2018-
|
|
27
|
+
# Copyright (c) 2018-2024 United States Government as represented by
|
|
28
28
|
# the National Aeronautics and Space Administration. No copyright is
|
|
29
29
|
# claimed in the United States under Title 17, U.S.Code. All Other
|
|
30
30
|
# Rights Reserved.
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
Package for accessing the Coordinate Data Analysis System (CDAS)
|
|
36
36
|
web services <https://cdaweb.gsfc.nasa.gov/WebServices/REST/>.<br>
|
|
37
37
|
|
|
38
|
-
Copyright © 2018-
|
|
38
|
+
Copyright © 2018-2024 United States Government as represented by the
|
|
39
39
|
National Aeronautics and Space Administration. No copyright is claimed in
|
|
40
40
|
the United States under Title 17, U.S.Code. All Other Rights Reserved.
|
|
41
41
|
|
|
@@ -52,6 +52,7 @@ import sys
|
|
|
52
52
|
import os
|
|
53
53
|
import platform
|
|
54
54
|
import logging
|
|
55
|
+
import re
|
|
55
56
|
import urllib.parse
|
|
56
57
|
from urllib.parse import urlparse
|
|
57
58
|
import json
|
|
@@ -78,14 +79,48 @@ except ImportError:
|
|
|
78
79
|
SPDM_AVAILABLE = False
|
|
79
80
|
|
|
80
81
|
try:
|
|
81
|
-
|
|
82
|
+
from cdflib.xarray import cdf_to_xarray
|
|
82
83
|
import xarray as xr
|
|
83
84
|
CDF_XARRAY_AVAILABLE = True
|
|
84
85
|
except ImportError:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
try:
|
|
87
|
+
import cdflib as cdf
|
|
88
|
+
import xarray as xr
|
|
89
|
+
CDF_XARRAY_AVAILABLE = True
|
|
90
|
+
def cdf_to_xarray(filename, to_datetime=False, to_unixtime=False,
|
|
91
|
+
fillval_to_nan=False):
|
|
92
|
+
"""
|
|
93
|
+
Reads a CDF into an xarray.dataset. This function exists
|
|
94
|
+
to provide compatility with cdflib >= 1.0.1 for older
|
|
95
|
+
releases of cdflib.
|
|
96
|
+
|
|
97
|
+
Parameters:
|
|
98
|
+
-----------
|
|
99
|
+
filename
|
|
100
|
+
The path to the CDF file to read.
|
|
101
|
+
to_datetime
|
|
102
|
+
Whether or not to convert CDF_EPOCH/EPOCH_16/TT2000 to
|
|
103
|
+
datetime, or leave them as is.
|
|
104
|
+
to_unixtime
|
|
105
|
+
Whether or not to convert CDF_EPOCH/EPOCH_16/TT2000 to
|
|
106
|
+
unixtime, or leave them as is.
|
|
107
|
+
fillval_to_nan
|
|
108
|
+
If True, any data values that match the FILLVAL
|
|
109
|
+
attribute for a variable will be set to NaN.
|
|
110
|
+
|
|
111
|
+
Returns
|
|
112
|
+
-------
|
|
113
|
+
xarray.dataset
|
|
114
|
+
An XArray Dataset object.
|
|
115
|
+
"""
|
|
116
|
+
return cdf.cdf_to_xarray(filename, to_datetime=to_datetime,
|
|
117
|
+
to_unixtime=to_unixtime,
|
|
118
|
+
fillval_to_nan=fillval_to_nan)
|
|
119
|
+
except ImportError:
|
|
120
|
+
CDF_XARRAY_AVAILABLE = False
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
__version__ = "1.7.44"
|
|
89
124
|
|
|
90
125
|
|
|
91
126
|
#
|
|
@@ -680,6 +715,29 @@ class CdasWs:
|
|
|
680
715
|
# pylint: enable=too-many-branches
|
|
681
716
|
|
|
682
717
|
|
|
718
|
+
@staticmethod
|
|
719
|
+
def get_doi_landing_page_url(
|
|
720
|
+
doi: str
|
|
721
|
+
) -> str:
|
|
722
|
+
"""
|
|
723
|
+
Returns a URL to the given Digital Object Identifier's landing
|
|
724
|
+
page (metadata for the DOI).
|
|
725
|
+
|
|
726
|
+
Parameters
|
|
727
|
+
----------
|
|
728
|
+
doi
|
|
729
|
+
digital object identifier.
|
|
730
|
+
Returns
|
|
731
|
+
-------
|
|
732
|
+
str
|
|
733
|
+
A URL to the DOI's landing page.
|
|
734
|
+
"""
|
|
735
|
+
|
|
736
|
+
if not doi.startswith('http'):
|
|
737
|
+
return 'https://doi.org/' + doi
|
|
738
|
+
return doi
|
|
739
|
+
|
|
740
|
+
|
|
683
741
|
def get_inventory(
|
|
684
742
|
self,
|
|
685
743
|
identifier: str,
|
|
@@ -748,6 +806,40 @@ class CdasWs:
|
|
|
748
806
|
return intervals
|
|
749
807
|
|
|
750
808
|
|
|
809
|
+
def get_example_time_interval(
|
|
810
|
+
self,
|
|
811
|
+
identifier: str,
|
|
812
|
+
) -> TimeInterval:
|
|
813
|
+
"""
|
|
814
|
+
Gets a small example time interval for the specified dataset. The
|
|
815
|
+
interval is near the end of the dataset's data inventory. The
|
|
816
|
+
returned interval is not guaranteed to have non-fill data for any
|
|
817
|
+
specific variable.
|
|
818
|
+
|
|
819
|
+
Parameters
|
|
820
|
+
----------
|
|
821
|
+
identifier
|
|
822
|
+
dataset identifier of data inventory to get.
|
|
823
|
+
Returns
|
|
824
|
+
-------
|
|
825
|
+
timeinterval.TimeInterval
|
|
826
|
+
An small example time interval that is likely, but not
|
|
827
|
+
guaranteed, to have data or None if an interval cannot be
|
|
828
|
+
found.
|
|
829
|
+
"""
|
|
830
|
+
|
|
831
|
+
time_intervals = self.get_inventory(identifier)
|
|
832
|
+
if len(time_intervals) < 1:
|
|
833
|
+
return None
|
|
834
|
+
example_interval = time_intervals[-1]
|
|
835
|
+
if re.search('MMS[1-4]_.+_BRST_.+', identifier):
|
|
836
|
+
time_delta = timedelta(seconds=1)
|
|
837
|
+
else:
|
|
838
|
+
time_delta = timedelta(hours=2)
|
|
839
|
+
example_interval.start = example_interval.end - time_delta
|
|
840
|
+
return example_interval
|
|
841
|
+
|
|
842
|
+
|
|
751
843
|
def get_variables(
|
|
752
844
|
self,
|
|
753
845
|
identifier: str
|
|
@@ -1125,15 +1217,16 @@ class CdasWs:
|
|
|
1125
1217
|
if SPDM_AVAILABLE:
|
|
1126
1218
|
return spdm.fromCDF(filename)
|
|
1127
1219
|
if CDF_XARRAY_AVAILABLE:
|
|
1128
|
-
return
|
|
1220
|
+
return cdf_to_xarray(filename, to_datetime=True,
|
|
1221
|
+
fillval_to_nan=True)
|
|
1129
1222
|
raise ModuleNotFoundError(
|
|
1130
1223
|
'neither the spacepy.datamodel nor the cdflib and '
|
|
1131
1224
|
'xarray modules are installed')
|
|
1132
1225
|
if data_representation is DataRepresentation.SPACEPY:
|
|
1133
1226
|
return spdm.fromCDF(filename)
|
|
1134
1227
|
if data_representation is DataRepresentation.XARRAY:
|
|
1135
|
-
return
|
|
1136
|
-
|
|
1228
|
+
return cdf_to_xarray(filename, to_datetime=True,
|
|
1229
|
+
fillval_to_nan=True)
|
|
1137
1230
|
return None
|
|
1138
1231
|
|
|
1139
1232
|
|
|
@@ -1166,7 +1259,9 @@ class CdasWs:
|
|
|
1166
1259
|
dataset
|
|
1167
1260
|
dataset identifier of data to get.
|
|
1168
1261
|
variables
|
|
1169
|
-
array containing names of variables to get.
|
|
1262
|
+
array containing names of variables to get. The value
|
|
1263
|
+
ALL-VARIABLES may be used instead of specifying all the
|
|
1264
|
+
individual variable names.
|
|
1170
1265
|
time0
|
|
1171
1266
|
TimeInterval(s) or start time of data to get.
|
|
1172
1267
|
time1
|
|
@@ -1203,11 +1298,12 @@ class CdasWs:
|
|
|
1203
1298
|
Tuple
|
|
1204
1299
|
[0] contains a dictionary of HTTP and CDAS status information.
|
|
1205
1300
|
When successful, ['http']['status_code'] will be 200.<br>
|
|
1206
|
-
[1] contains the requested data (SpaceData
|
|
1301
|
+
[1] contains the requested data (SpaceData or xarray.Dateset
|
|
1302
|
+
object) or None.
|
|
1207
1303
|
Raises
|
|
1208
1304
|
------
|
|
1209
1305
|
ValueError
|
|
1210
|
-
If no variables are given or if the given start/end datetime
|
|
1306
|
+
If no variables are given or if the given start/end datetime
|
|
1211
1307
|
values are invalid.
|
|
1212
1308
|
"""
|
|
1213
1309
|
# pylint: disable=too-many-locals
|
|
@@ -1742,8 +1838,8 @@ class CdasWs:
|
|
|
1742
1838
|
**keywords
|
|
1743
1839
|
) -> Tuple[int, Dict]:
|
|
1744
1840
|
"""
|
|
1745
|
-
Gets original data files from a dataset. Original data files
|
|
1746
|
-
lack updated meta-data and virtual variable values contained
|
|
1841
|
+
Gets original data files from a dataset. Original data files
|
|
1842
|
+
lack updated meta-data and virtual variable values contained
|
|
1747
1843
|
in files obtained from the `CdasWs.get_data`. Most callers
|
|
1748
1844
|
should probably use `CdasWs.get_data` instead of this function.
|
|
1749
1845
|
|
cdasws/__main__.py
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
#
|
|
25
25
|
# NOSA HEADER END
|
|
26
26
|
#
|
|
27
|
-
# Copyright (c) 2018-
|
|
27
|
+
# Copyright (c) 2018-2023 United States Government as represented by
|
|
28
28
|
# the National Aeronautics and Space Administration. No copyright is
|
|
29
29
|
# claimed in the United States under Title 17, U.S.Code. All Other
|
|
30
30
|
# Rights Reserved.
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
Example Coordinate Data Analysis System (CDAS) web service client.
|
|
35
35
|
Includes example calls to most of the web services.
|
|
36
36
|
|
|
37
|
-
Copyright © 2018-
|
|
37
|
+
Copyright © 2018-2023 United States Government as represented by the
|
|
38
38
|
National Aeronautics and Space Administration. No copyright is claimed in
|
|
39
39
|
the United States under Title 17, U.S.Code. All Other Rights Reserved.
|
|
40
40
|
"""
|
|
@@ -49,7 +49,7 @@ import urllib3
|
|
|
49
49
|
#import matplotlib.pyplot as plt
|
|
50
50
|
from cdasws import CdasWs
|
|
51
51
|
from cdasws.timeinterval import TimeInterval
|
|
52
|
-
from cdasws.datarequest import GraphOptions, ImageFormat, Overplot
|
|
52
|
+
from cdasws.datarequest import GraphOptions, ImageFormat, Overplot, TextFormat
|
|
53
53
|
from cdasws.datarepresentation import DataRepresentation
|
|
54
54
|
|
|
55
55
|
|
|
@@ -155,6 +155,10 @@ def example(
|
|
|
155
155
|
print('Datasets:')
|
|
156
156
|
for dataset in datasets:
|
|
157
157
|
print(' ', dataset['Id'], dataset['Label'])
|
|
158
|
+
#print(' ', json.dumps(dataset, indent=4))
|
|
159
|
+
|
|
160
|
+
print('DOI landing page:',
|
|
161
|
+
cdas.get_doi_landing_page_url('10.48322/e0dc-0h53'))
|
|
158
162
|
|
|
159
163
|
mms_brst_inventory = cdas.get_inventory('MMS1_FPI_BRST_L2_DES-MOMS',
|
|
160
164
|
timeInterval=TimeInterval(
|
|
@@ -169,6 +173,11 @@ def example(
|
|
|
169
173
|
for interval in doi_inventory:
|
|
170
174
|
print(' ' + str(interval))
|
|
171
175
|
|
|
176
|
+
print('AC_H0_MFI example time interval:')
|
|
177
|
+
print(' ', cdas.get_example_time_interval('AC_H0_MFI'))
|
|
178
|
+
print('MMS1_FPI_BRST_L2_DES-MOMS example time interval:')
|
|
179
|
+
print(' ', cdas.get_example_time_interval('MMS1_FPI_BRST_L2_DES-MOMS'))
|
|
180
|
+
|
|
172
181
|
test_ds = 'AC_H1_MFI'
|
|
173
182
|
variables = cdas.get_variables(test_ds)
|
|
174
183
|
if variables is not None:
|
|
@@ -213,7 +222,7 @@ def example(
|
|
|
213
222
|
status, data = \
|
|
214
223
|
cdas.get_data('AC_H1_MFI', ['Magnitude', 'BGSEc'],
|
|
215
224
|
time_intervals,
|
|
216
|
-
dataRepresentation
|
|
225
|
+
dataRepresentation=DataRepresentation.XARRAY)
|
|
217
226
|
|
|
218
227
|
if status['http']['status_code'] == 200:
|
|
219
228
|
print(data)
|
|
@@ -230,10 +239,12 @@ def example(
|
|
|
230
239
|
print('pip install', mod)
|
|
231
240
|
print('-----------------------------------------------------------')
|
|
232
241
|
|
|
242
|
+
|
|
233
243
|
status, result = \
|
|
234
244
|
cdas.get_graph('AC_H1_MFI', ['Magnitude', 'BGSEc'],
|
|
235
245
|
'2009-06-01T00:00:00Z', '2009-06-01T00:10:00Z',
|
|
236
246
|
GraphOptions(coarse_noise_filter=True,
|
|
247
|
+
x_axis_width_factor=4,
|
|
237
248
|
y_axis_height_factor=2,
|
|
238
249
|
combine=True,
|
|
239
250
|
overplot=Overplot.VECTOR_COMPONENTS),
|
|
@@ -277,6 +288,7 @@ def example(
|
|
|
277
288
|
status, result = \
|
|
278
289
|
cdas.get_text('AC_H1_MFI', ['Magnitude', 'BGSEc'],
|
|
279
290
|
'2009-06-01T00:00:00Z', '2009-06-01T00:10:00Z',
|
|
291
|
+
text_format=TextFormat.CSV2
|
|
280
292
|
#binData={
|
|
281
293
|
# 'interval': 60.0,
|
|
282
294
|
# 'interpolateMissingValues': True,
|
|
@@ -289,7 +301,6 @@ def example(
|
|
|
289
301
|
else:
|
|
290
302
|
print('Request failed with status = ', status)
|
|
291
303
|
|
|
292
|
-
|
|
293
304
|
status, result = \
|
|
294
305
|
cdas.get_audio('AC_H1_MFI', ['Magnitude', 'BGSEc'],
|
|
295
306
|
'2009-06-01T00:00:00Z', '2009-06-01T00:10:00Z',
|
cdasws/datarepresentation.py
CHANGED
|
@@ -60,5 +60,5 @@ class DataRepresentation(Enum):
|
|
|
60
60
|
|
|
61
61
|
#DataRepresentationValue = typing.Literal['SpacePyDm', 'CdfLibXArray']
|
|
62
62
|
|
|
63
|
-
#assert set(typing.get_args(DataRespresentationValue)) ==
|
|
63
|
+
#assert set(typing.get_args(DataRespresentationValue)) ==
|
|
64
64
|
# {member.value for member in DataRepresentation}
|
cdasws/datarequest.py
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
#
|
|
25
25
|
# NOSA HEADER END
|
|
26
26
|
#
|
|
27
|
-
# Copyright (c) 2019-
|
|
27
|
+
# Copyright (c) 2019-2023 United States Government as represented by
|
|
28
28
|
# the National Aeronautics and Space Administration. No copyright is
|
|
29
29
|
# claimed in the United States under Title 17, U.S.Code. All Other
|
|
30
30
|
# Rights Reserved.
|
|
@@ -36,7 +36,7 @@ Package defining classes to represent the DataRequestEntity and its
|
|
|
36
36
|
sub-classes from
|
|
37
37
|
<https://cdaweb.gsfc.nasa.gov/WebServices/REST/CDAS.xsd>.<br>
|
|
38
38
|
|
|
39
|
-
Copyright © 2019-
|
|
39
|
+
Copyright © 2019-2023 United States Government as represented by the
|
|
40
40
|
National Aeronautics and Space Administration. No copyright is claimed in
|
|
41
41
|
the United States under Title 17, U.S.Code. All Other Rights Reserved.
|
|
42
42
|
"""
|
|
@@ -44,7 +44,7 @@ the United States under Title 17, U.S.Code. All Other Rights Reserved.
|
|
|
44
44
|
|
|
45
45
|
import enum
|
|
46
46
|
import json
|
|
47
|
-
from typing import
|
|
47
|
+
from typing import List, Union # when python 3.8 , TypedDict
|
|
48
48
|
from abc import ABCMeta, abstractmethod
|
|
49
49
|
from cdasws.timeinterval import TimeInterval
|
|
50
50
|
|
|
@@ -271,6 +271,8 @@ class TextFormat(enum.Enum):
|
|
|
271
271
|
"""
|
|
272
272
|
PLAIN = "Plain"
|
|
273
273
|
CSV = "CSV"
|
|
274
|
+
CSV1 = "CSV1"
|
|
275
|
+
CSV2 = "CSV2"
|
|
274
276
|
|
|
275
277
|
|
|
276
278
|
class TextRequest(DataRequest): # pylint: disable=too-few-public-methods
|
|
@@ -344,6 +346,10 @@ class GraphOptions:
|
|
|
344
346
|
coarse_noise_filter
|
|
345
347
|
Use coarse noise filtering to remove values outside 3 deviations
|
|
346
348
|
from mean of all values in the plotted time interval.
|
|
349
|
+
x_axis_width_factor
|
|
350
|
+
Multiply the X-axis width for time-series and spectrogram by
|
|
351
|
+
the given value. For example, if the standard width is 320
|
|
352
|
+
pixels and factor is 3, then the width of the X-axis will be 960.
|
|
347
353
|
y_axis_height_factor
|
|
348
354
|
Multiply the Y-axis height for time-series and spectrogram by
|
|
349
355
|
the given value. For example, if the standard height is 100
|
|
@@ -374,12 +380,14 @@ class GraphOptions:
|
|
|
374
380
|
"""
|
|
375
381
|
def __init__(self,
|
|
376
382
|
coarse_noise_filter: bool = False,
|
|
377
|
-
|
|
383
|
+
x_axis_width_factor: int = 3,
|
|
384
|
+
y_axis_height_factor: int = 2,
|
|
378
385
|
combine: bool = False,
|
|
379
386
|
overplot: Overplot = Overplot.NONE,
|
|
380
387
|
):
|
|
381
388
|
|
|
382
389
|
self._coarse_noise_filter = coarse_noise_filter
|
|
390
|
+
self._x_axis_width_factor = x_axis_width_factor
|
|
383
391
|
self._y_axis_height_factor = y_axis_height_factor
|
|
384
392
|
self._combine = combine
|
|
385
393
|
self._overplot = overplot
|
|
@@ -411,6 +419,32 @@ class GraphOptions:
|
|
|
411
419
|
self._coarse_noise_filter = value
|
|
412
420
|
|
|
413
421
|
|
|
422
|
+
@property
|
|
423
|
+
def x_axis_width_factor(self) -> int:
|
|
424
|
+
"""
|
|
425
|
+
Gets the x_axis_width_factor value.
|
|
426
|
+
|
|
427
|
+
Returns
|
|
428
|
+
-------
|
|
429
|
+
bool
|
|
430
|
+
x_axis_width_factor value.
|
|
431
|
+
"""
|
|
432
|
+
return self._x_axis_width_factor
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
@x_axis_width_factor.setter
|
|
436
|
+
def x_axis_width_factor(self, value: int):
|
|
437
|
+
"""
|
|
438
|
+
Sets the x_axis_width_factor value.
|
|
439
|
+
|
|
440
|
+
Parameters
|
|
441
|
+
----------
|
|
442
|
+
value
|
|
443
|
+
new x_axis_width_factor value.
|
|
444
|
+
"""
|
|
445
|
+
self._x_axis_width_factor = value
|
|
446
|
+
|
|
447
|
+
|
|
414
448
|
@property
|
|
415
449
|
def y_axis_height_factor(self) -> int:
|
|
416
450
|
"""
|
|
@@ -529,6 +563,8 @@ class GraphRequest(DataRequest): # pylint: disable=too-few-public-methods
|
|
|
529
563
|
self._data_request['GraphRequest']['GraphOptions'] = {}
|
|
530
564
|
if options.combine:
|
|
531
565
|
self._data_request['GraphRequest']['GraphOptions']['Combine'] = {}
|
|
566
|
+
self._data_request['GraphRequest']['GraphOptions']['XAxisWidthFactor'] = \
|
|
567
|
+
options.x_axis_width_factor
|
|
532
568
|
self._data_request['GraphRequest']['GraphOptions']['YAxisHeightFactor'] = \
|
|
533
569
|
options.y_axis_height_factor
|
|
534
570
|
if options.coarse_noise_filter:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cdasws
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.44
|
|
4
4
|
Summary: NASA's Coordinated Data Analysis System Web Service Client Library
|
|
5
5
|
Home-page: https://cdaweb.gsfc.nasa.gov/WebServices/REST
|
|
6
6
|
Author: Bernie Harris
|
|
@@ -31,12 +31,13 @@ Requires-Dist: cdflib (>=0.4.4) ; extra == 'xarray'
|
|
|
31
31
|
|
|
32
32
|
## Synopsis
|
|
33
33
|
|
|
34
|
-
This library provides a simple python interface to the data
|
|
34
|
+
This library provides a simple python interface to the heliophysics data
|
|
35
|
+
and services of
|
|
35
36
|
NASA's [Coordinated Data Analysis System](https://cdaweb.gsfc.nasa.gov/)
|
|
36
37
|
(CDAS). This library implements the client side of the
|
|
37
38
|
[CDAS RESTful web services](https://cdaweb.gsfc.nasa.gov/WebServices/REST/)
|
|
38
39
|
and can return data in the
|
|
39
|
-
[SpacePy data model](https://
|
|
40
|
+
[SpacePy data model](https://spacepy.github.io/datamodel.html) or an
|
|
40
41
|
[xarray.Dataset](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html)
|
|
41
42
|
with all the original
|
|
42
43
|
[ISTP/SPDF metadata](https://spdf.gsfc.nasa.gov/sp_use_of_cdf.html).
|
|
@@ -55,9 +56,9 @@ To run the included example, do the following
|
|
|
55
56
|
---
|
|
56
57
|
Also, the following [Jupyter notebooks](https://jupyter.org/) demonstrate
|
|
57
58
|
different features of the library:
|
|
58
|
-
1. [Basic Example](https://cdaweb.gsfc.nasa.gov/WebServices/REST/jupyter/CdasWsExample.html) ([ipynb file](https://cdaweb.gsfc.nasa.gov/WebServices/REST/jupyter/CdasWsExample.ipynb)) demonstrating use of library with results returned in [SpacePy data model](https://spacepy.github.io/datamodel.html).
|
|
59
|
-
2. [Basic Example](https://cdaweb.gsfc.nasa.gov/WebServices/REST/jupyter/CdasWsExampleXarray.html) ([ipynb file](https://cdaweb.gsfc.nasa.gov/WebServices/REST/jupyter/CdasWsExampleXarray.ipynb)) demonstrating use of library with results returned in an [xarray.Dataset](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html).
|
|
60
|
-
3. [Magnetic Field Line Conjunction Example](https://sscweb.gsfc.nasa.gov/WebServices/REST/jupyter/SscWsConjunctionExample.html) ([ipynb file](https://sscweb.gsfc.nasa.gov/WebServices/REST/jupyter/SscWsConjunctionExample.ipynb)) with related data retrieval/plotting using [cdasws](https://pypi.org/project/cdasws/).
|
|
59
|
+
1. [Basic Example](https://cdaweb.gsfc.nasa.gov/WebServices/REST/jupyter/CdasWsExample.html) ([ipynb file](https://cdaweb.gsfc.nasa.gov/WebServices/REST/jupyter/CdasWsExample.ipynb)) demonstrating use of library with results returned in [SpacePy data model](https://spacepy.github.io/datamodel.html). [Launch on Binder](https://mybinder.org/v2/gh/berniegsfc/cdasws-notebooks/main?labpath=CdasWsExample.ipynb).
|
|
60
|
+
2. [Basic Example](https://cdaweb.gsfc.nasa.gov/WebServices/REST/jupyter/CdasWsExampleXarray.html) ([ipynb file](https://cdaweb.gsfc.nasa.gov/WebServices/REST/jupyter/CdasWsExampleXarray.ipynb)) demonstrating use of library with results returned in an [xarray.Dataset](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html). [Launch on Binder](https://mybinder.org/v2/gh/berniegsfc/cdasws-notebooks/main?labpath=CdasWsExampleXarray.ipynb).
|
|
61
|
+
3. [Magnetic Field Line Conjunction Example](https://sscweb.gsfc.nasa.gov/WebServices/REST/jupyter/SscWsConjunctionExample.html) ([ipynb file](https://sscweb.gsfc.nasa.gov/WebServices/REST/jupyter/SscWsConjunctionExample.ipynb)) with related data retrieval/plotting using [cdasws](https://pypi.org/project/cdasws/). [Launch on Binder](https://mybinder.org/v2/gh/berniegsfc/sscws-notebooks/main?labpath=SscWsConjunctionExample.ipynb).
|
|
61
62
|
---
|
|
62
63
|
And at the bottom of each
|
|
63
64
|
[CDAWeb dataset description](https://cdaweb.gsfc.nasa.gov/misc/Notes.html)
|
|
@@ -77,10 +78,8 @@ The only required dependencies are python-dateutil and requests. If you
|
|
|
77
78
|
call the get_data method then **one** of the following two sets of additional
|
|
78
79
|
dependencies are required:
|
|
79
80
|
1. To have get_data return the data in the SpacePy data model.
|
|
80
|
-
* [SpacePy](https://
|
|
81
|
+
* [SpacePy](https://spacepy.github.io/). Refer to the SpacePy
|
|
81
82
|
documentation for the details of SpacePy's dependencies.
|
|
82
|
-
* [CDF](https://cdf.gsfc.nasa.gov) which is not (at the time of this
|
|
83
|
-
writing) automatically installed with SpacePy.
|
|
84
83
|
2. To have get_data return the data in an xarray dataset.
|
|
85
84
|
* [cdflib](https://pypi.org/project/cdflib/).
|
|
86
85
|
* [xarray](https://pypi.org/project/xarray/).
|
|
@@ -89,12 +88,13 @@ dependencies are required:
|
|
|
89
88
|
|
|
90
89
|
As noted in the dependencies above, if you intend to call the get_data
|
|
91
90
|
method, you must install either
|
|
92
|
-
1. [SpacePy](https://
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
1. [SpacePy](https://spacepy.github.io/) following the
|
|
92
|
+
procedures at the SpacePy web sites).
|
|
93
|
+
2. [cdflib](https://pypi.org/project/cdflib/) and
|
|
94
|
+
[xarray](https://pypi.org/project/xarray/).
|
|
96
95
|
|
|
97
96
|
$ pip install -U cdflib
|
|
97
|
+
$ pip install -U xarray
|
|
98
98
|
|
|
99
99
|
Then, to install this package
|
|
100
100
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
cdasws/__init__.py,sha256=k0NpyW0EJJrdd3KRPaT1ueprVckOGWiDTafTa-bHJ5w,74559
|
|
2
|
+
cdasws/__main__.py,sha256=sgIqwgEaTto8mJggMAq3UppD6vus5DNQ4fWS3mvxvtY,12411
|
|
3
|
+
cdasws/cdasws.py,sha256=755mLWlMFXknNP3f8g_W9An6niAmksqcb1NdgiAybj0,29552
|
|
4
|
+
cdasws/datarepresentation.py,sha256=kKgAKCA4uzGoBQ8r8jbXstBg8SCg_EQtsoGhO8kIpco,2164
|
|
5
|
+
cdasws/datarequest.py,sha256=DutrESTuL9BVoMRymtVuxN4koXeaRxe9cT-jEoDVK8I,21632
|
|
6
|
+
cdasws/timeinterval.py,sha256=d4i2Q8CtbAX0JdTLTCpyw40r16CycrUQACxhUVogu8E,5664
|
|
7
|
+
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
tests/test_cdasws.py,sha256=DsKesU19_9zUIO1a7oyWWtywBGN7gjdQHFLMGUZ4X8c,24395
|
|
9
|
+
cdasws-1.7.44.dist-info/LICENSE,sha256=og42scUY42lPLGBg0wHt6JtrbeInVEr5xojyrguPqrQ,12583
|
|
10
|
+
cdasws-1.7.44.dist-info/METADATA,sha256=omOOl_UfkHCMGwcf8LcqMqGQ6eP502YzNZapOH9ZliI,5695
|
|
11
|
+
cdasws-1.7.44.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
12
|
+
cdasws-1.7.44.dist-info/top_level.txt,sha256=GyIvHk5F6ysnTdDfnQsjZbTBt_EYrKyC0oeiIt9l-AE,7
|
|
13
|
+
cdasws-1.7.44.dist-info/RECORD,,
|
cdasws-1.7.41.dist-info/RECORD
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
cdasws/__init__.py,sha256=ejgDXNebF_gI0i0NV81zk-WW89Y5l0PKqOA5_Hdjx28,71351
|
|
2
|
-
cdasws/__main__.py,sha256=_38i5kIi4I-OWmOkrPVsG5hiOd7fkOR1jvZBJahDgns,11894
|
|
3
|
-
cdasws/cdasws.py,sha256=755mLWlMFXknNP3f8g_W9An6niAmksqcb1NdgiAybj0,29552
|
|
4
|
-
cdasws/datarepresentation.py,sha256=DTUq4vz1QiU6086oW3wQhjN789ZkoxxML08dPZNI9Es,2165
|
|
5
|
-
cdasws/datarequest.py,sha256=unkT-0sSQUhhdeUFqwMbZVdBKo14Qz0iF5Q28aFtRSE,20594
|
|
6
|
-
cdasws/timeinterval.py,sha256=d4i2Q8CtbAX0JdTLTCpyw40r16CycrUQACxhUVogu8E,5664
|
|
7
|
-
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
tests/test_cdasws.py,sha256=DsKesU19_9zUIO1a7oyWWtywBGN7gjdQHFLMGUZ4X8c,24395
|
|
9
|
-
cdasws-1.7.41.dist-info/LICENSE,sha256=og42scUY42lPLGBg0wHt6JtrbeInVEr5xojyrguPqrQ,12583
|
|
10
|
-
cdasws-1.7.41.dist-info/METADATA,sha256=syvACskZM0PGybKu6y_ZRxhnfd3nRrn1XVcWBvYeYGI,5472
|
|
11
|
-
cdasws-1.7.41.dist-info/WHEEL,sha256=U88EhGIw8Sj2_phqajeu_EAi3RAo8-C6zV3REsWbWbs,92
|
|
12
|
-
cdasws-1.7.41.dist-info/top_level.txt,sha256=GyIvHk5F6ysnTdDfnQsjZbTBt_EYrKyC0oeiIt9l-AE,7
|
|
13
|
-
cdasws-1.7.41.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|