cdasws 1.7.43__tar.gz → 1.7.44__tar.gz
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-1.7.43 → cdasws-1.7.44}/PKG-INFO +9 -11
- {cdasws-1.7.43 → cdasws-1.7.44}/README.md +8 -10
- {cdasws-1.7.43 → cdasws-1.7.44}/cdasws/__init__.py +33 -7
- {cdasws-1.7.43 → cdasws-1.7.44}/cdasws/__main__.py +9 -6
- {cdasws-1.7.43 → cdasws-1.7.44}/cdasws/datarepresentation.py +1 -1
- {cdasws-1.7.43 → cdasws-1.7.44}/cdasws/datarequest.py +40 -4
- {cdasws-1.7.43 → cdasws-1.7.44}/cdasws.egg-info/PKG-INFO +9 -11
- {cdasws-1.7.43 → cdasws-1.7.44}/setup.py +1 -1
- {cdasws-1.7.43 → cdasws-1.7.44}/cdasws/timeinterval.py +0 -0
- {cdasws-1.7.43 → cdasws-1.7.44}/cdasws.egg-info/SOURCES.txt +0 -0
- {cdasws-1.7.43 → cdasws-1.7.44}/cdasws.egg-info/dependency_links.txt +0 -0
- {cdasws-1.7.43 → cdasws-1.7.44}/cdasws.egg-info/requires.txt +0 -0
- {cdasws-1.7.43 → cdasws-1.7.44}/cdasws.egg-info/top_level.txt +0 -0
- {cdasws-1.7.43 → cdasws-1.7.44}/setup.cfg +0 -0
|
@@ -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
|
|
@@ -9,12 +9,13 @@ License: NOSA
|
|
|
9
9
|
Description:
|
|
10
10
|
## Synopsis
|
|
11
11
|
|
|
12
|
-
This library provides a simple python interface to the data
|
|
12
|
+
This library provides a simple python interface to the heliophysics data
|
|
13
|
+
and services of
|
|
13
14
|
NASA's [Coordinated Data Analysis System](https://cdaweb.gsfc.nasa.gov/)
|
|
14
15
|
(CDAS). This library implements the client side of the
|
|
15
16
|
[CDAS RESTful web services](https://cdaweb.gsfc.nasa.gov/WebServices/REST/)
|
|
16
17
|
and can return data in the
|
|
17
|
-
[SpacePy data model](https://
|
|
18
|
+
[SpacePy data model](https://spacepy.github.io/datamodel.html) or an
|
|
18
19
|
[xarray.Dataset](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html)
|
|
19
20
|
with all the original
|
|
20
21
|
[ISTP/SPDF metadata](https://spdf.gsfc.nasa.gov/sp_use_of_cdf.html).
|
|
@@ -33,7 +34,7 @@ Description:
|
|
|
33
34
|
---
|
|
34
35
|
Also, the following [Jupyter notebooks](https://jupyter.org/) demonstrate
|
|
35
36
|
different features of the library:
|
|
36
|
-
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).
|
|
37
|
+
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).
|
|
37
38
|
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).
|
|
38
39
|
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).
|
|
39
40
|
---
|
|
@@ -55,10 +56,8 @@ Description:
|
|
|
55
56
|
call the get_data method then **one** of the following two sets of additional
|
|
56
57
|
dependencies are required:
|
|
57
58
|
1. To have get_data return the data in the SpacePy data model.
|
|
58
|
-
* [SpacePy](https://
|
|
59
|
+
* [SpacePy](https://spacepy.github.io/). Refer to the SpacePy
|
|
59
60
|
documentation for the details of SpacePy's dependencies.
|
|
60
|
-
* [CDF](https://cdf.gsfc.nasa.gov) which is not (at the time of this
|
|
61
|
-
writing) automatically installed with SpacePy.
|
|
62
61
|
2. To have get_data return the data in an xarray dataset.
|
|
63
62
|
* [cdflib](https://pypi.org/project/cdflib/).
|
|
64
63
|
* [xarray](https://pypi.org/project/xarray/).
|
|
@@ -67,11 +66,10 @@ Description:
|
|
|
67
66
|
|
|
68
67
|
As noted in the dependencies above, if you intend to call the get_data
|
|
69
68
|
method, you must install either
|
|
70
|
-
1. [SpacePy](https://
|
|
71
|
-
|
|
72
|
-
procedures at the SpacePy and CDF web sites).
|
|
69
|
+
1. [SpacePy](https://spacepy.github.io/) following the
|
|
70
|
+
procedures at the SpacePy web sites).
|
|
73
71
|
2. [cdflib](https://pypi.org/project/cdflib/) and
|
|
74
|
-
[xarray](https://pypi.org/project/xarray/)
|
|
72
|
+
[xarray](https://pypi.org/project/xarray/).
|
|
75
73
|
|
|
76
74
|
$ pip install -U cdflib
|
|
77
75
|
$ pip install -U xarray
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
## Synopsis
|
|
3
3
|
|
|
4
|
-
This library provides a simple python interface to the data
|
|
4
|
+
This library provides a simple python interface to the heliophysics data
|
|
5
|
+
and services of
|
|
5
6
|
NASA's [Coordinated Data Analysis System](https://cdaweb.gsfc.nasa.gov/)
|
|
6
7
|
(CDAS). This library implements the client side of the
|
|
7
8
|
[CDAS RESTful web services](https://cdaweb.gsfc.nasa.gov/WebServices/REST/)
|
|
8
9
|
and can return data in the
|
|
9
|
-
[SpacePy data model](https://
|
|
10
|
+
[SpacePy data model](https://spacepy.github.io/datamodel.html) or an
|
|
10
11
|
[xarray.Dataset](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html)
|
|
11
12
|
with all the original
|
|
12
13
|
[ISTP/SPDF metadata](https://spdf.gsfc.nasa.gov/sp_use_of_cdf.html).
|
|
@@ -25,7 +26,7 @@ To run the included example, do the following
|
|
|
25
26
|
---
|
|
26
27
|
Also, the following [Jupyter notebooks](https://jupyter.org/) demonstrate
|
|
27
28
|
different features of the library:
|
|
28
|
-
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).
|
|
29
|
+
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).
|
|
29
30
|
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).
|
|
30
31
|
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).
|
|
31
32
|
---
|
|
@@ -47,10 +48,8 @@ The only required dependencies are python-dateutil and requests. If you
|
|
|
47
48
|
call the get_data method then **one** of the following two sets of additional
|
|
48
49
|
dependencies are required:
|
|
49
50
|
1. To have get_data return the data in the SpacePy data model.
|
|
50
|
-
* [SpacePy](https://
|
|
51
|
+
* [SpacePy](https://spacepy.github.io/). Refer to the SpacePy
|
|
51
52
|
documentation for the details of SpacePy's dependencies.
|
|
52
|
-
* [CDF](https://cdf.gsfc.nasa.gov) which is not (at the time of this
|
|
53
|
-
writing) automatically installed with SpacePy.
|
|
54
53
|
2. To have get_data return the data in an xarray dataset.
|
|
55
54
|
* [cdflib](https://pypi.org/project/cdflib/).
|
|
56
55
|
* [xarray](https://pypi.org/project/xarray/).
|
|
@@ -59,11 +58,10 @@ dependencies are required:
|
|
|
59
58
|
|
|
60
59
|
As noted in the dependencies above, if you intend to call the get_data
|
|
61
60
|
method, you must install either
|
|
62
|
-
1. [SpacePy](https://
|
|
63
|
-
|
|
64
|
-
procedures at the SpacePy and CDF web sites).
|
|
61
|
+
1. [SpacePy](https://spacepy.github.io/) following the
|
|
62
|
+
procedures at the SpacePy web sites).
|
|
65
63
|
2. [cdflib](https://pypi.org/project/cdflib/) and
|
|
66
|
-
[xarray](https://pypi.org/project/xarray/)
|
|
64
|
+
[xarray](https://pypi.org/project/xarray/).
|
|
67
65
|
|
|
68
66
|
$ pip install -U cdflib
|
|
69
67
|
$ pip install -U xarray
|
|
@@ -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
|
|
|
@@ -89,14 +89,38 @@ except ImportError:
|
|
|
89
89
|
CDF_XARRAY_AVAILABLE = True
|
|
90
90
|
def cdf_to_xarray(filename, to_datetime=False, to_unixtime=False,
|
|
91
91
|
fillval_to_nan=False):
|
|
92
|
-
|
|
93
|
-
|
|
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,
|
|
94
118
|
fillval_to_nan=fillval_to_nan)
|
|
95
119
|
except ImportError:
|
|
96
120
|
CDF_XARRAY_AVAILABLE = False
|
|
97
121
|
|
|
98
122
|
|
|
99
|
-
__version__ = "1.7.
|
|
123
|
+
__version__ = "1.7.44"
|
|
100
124
|
|
|
101
125
|
|
|
102
126
|
#
|
|
@@ -1235,7 +1259,9 @@ class CdasWs:
|
|
|
1235
1259
|
dataset
|
|
1236
1260
|
dataset identifier of data to get.
|
|
1237
1261
|
variables
|
|
1238
|
-
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.
|
|
1239
1265
|
time0
|
|
1240
1266
|
TimeInterval(s) or start time of data to get.
|
|
1241
1267
|
time1
|
|
@@ -1272,7 +1298,7 @@ class CdasWs:
|
|
|
1272
1298
|
Tuple
|
|
1273
1299
|
[0] contains a dictionary of HTTP and CDAS status information.
|
|
1274
1300
|
When successful, ['http']['status_code'] will be 200.<br>
|
|
1275
|
-
[1] contains the requested data (SpaceData or xarray.Dateset
|
|
1301
|
+
[1] contains the requested data (SpaceData or xarray.Dateset
|
|
1276
1302
|
object) or None.
|
|
1277
1303
|
Raises
|
|
1278
1304
|
------
|
|
@@ -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,8 +155,9 @@ 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))
|
|
158
159
|
|
|
159
|
-
print('DOI landing page:',
|
|
160
|
+
print('DOI landing page:',
|
|
160
161
|
cdas.get_doi_landing_page_url('10.48322/e0dc-0h53'))
|
|
161
162
|
|
|
162
163
|
mms_brst_inventory = cdas.get_inventory('MMS1_FPI_BRST_L2_DES-MOMS',
|
|
@@ -221,7 +222,7 @@ def example(
|
|
|
221
222
|
status, data = \
|
|
222
223
|
cdas.get_data('AC_H1_MFI', ['Magnitude', 'BGSEc'],
|
|
223
224
|
time_intervals,
|
|
224
|
-
dataRepresentation
|
|
225
|
+
dataRepresentation=DataRepresentation.XARRAY)
|
|
225
226
|
|
|
226
227
|
if status['http']['status_code'] == 200:
|
|
227
228
|
print(data)
|
|
@@ -238,10 +239,12 @@ def example(
|
|
|
238
239
|
print('pip install', mod)
|
|
239
240
|
print('-----------------------------------------------------------')
|
|
240
241
|
|
|
242
|
+
|
|
241
243
|
status, result = \
|
|
242
244
|
cdas.get_graph('AC_H1_MFI', ['Magnitude', 'BGSEc'],
|
|
243
245
|
'2009-06-01T00:00:00Z', '2009-06-01T00:10:00Z',
|
|
244
246
|
GraphOptions(coarse_noise_filter=True,
|
|
247
|
+
x_axis_width_factor=4,
|
|
245
248
|
y_axis_height_factor=2,
|
|
246
249
|
combine=True,
|
|
247
250
|
overplot=Overplot.VECTOR_COMPONENTS),
|
|
@@ -285,6 +288,7 @@ def example(
|
|
|
285
288
|
status, result = \
|
|
286
289
|
cdas.get_text('AC_H1_MFI', ['Magnitude', 'BGSEc'],
|
|
287
290
|
'2009-06-01T00:00:00Z', '2009-06-01T00:10:00Z',
|
|
291
|
+
text_format=TextFormat.CSV2
|
|
288
292
|
#binData={
|
|
289
293
|
# 'interval': 60.0,
|
|
290
294
|
# 'interpolateMissingValues': True,
|
|
@@ -297,7 +301,6 @@ def example(
|
|
|
297
301
|
else:
|
|
298
302
|
print('Request failed with status = ', status)
|
|
299
303
|
|
|
300
|
-
|
|
301
304
|
status, result = \
|
|
302
305
|
cdas.get_audio('AC_H1_MFI', ['Magnitude', 'BGSEc'],
|
|
303
306
|
'2009-06-01T00:00:00Z', '2009-06-01T00:10:00Z',
|
|
@@ -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}
|
|
@@ -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
|
|
@@ -9,12 +9,13 @@ License: NOSA
|
|
|
9
9
|
Description:
|
|
10
10
|
## Synopsis
|
|
11
11
|
|
|
12
|
-
This library provides a simple python interface to the data
|
|
12
|
+
This library provides a simple python interface to the heliophysics data
|
|
13
|
+
and services of
|
|
13
14
|
NASA's [Coordinated Data Analysis System](https://cdaweb.gsfc.nasa.gov/)
|
|
14
15
|
(CDAS). This library implements the client side of the
|
|
15
16
|
[CDAS RESTful web services](https://cdaweb.gsfc.nasa.gov/WebServices/REST/)
|
|
16
17
|
and can return data in the
|
|
17
|
-
[SpacePy data model](https://
|
|
18
|
+
[SpacePy data model](https://spacepy.github.io/datamodel.html) or an
|
|
18
19
|
[xarray.Dataset](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html)
|
|
19
20
|
with all the original
|
|
20
21
|
[ISTP/SPDF metadata](https://spdf.gsfc.nasa.gov/sp_use_of_cdf.html).
|
|
@@ -33,7 +34,7 @@ Description:
|
|
|
33
34
|
---
|
|
34
35
|
Also, the following [Jupyter notebooks](https://jupyter.org/) demonstrate
|
|
35
36
|
different features of the library:
|
|
36
|
-
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).
|
|
37
|
+
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).
|
|
37
38
|
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).
|
|
38
39
|
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).
|
|
39
40
|
---
|
|
@@ -55,10 +56,8 @@ Description:
|
|
|
55
56
|
call the get_data method then **one** of the following two sets of additional
|
|
56
57
|
dependencies are required:
|
|
57
58
|
1. To have get_data return the data in the SpacePy data model.
|
|
58
|
-
* [SpacePy](https://
|
|
59
|
+
* [SpacePy](https://spacepy.github.io/). Refer to the SpacePy
|
|
59
60
|
documentation for the details of SpacePy's dependencies.
|
|
60
|
-
* [CDF](https://cdf.gsfc.nasa.gov) which is not (at the time of this
|
|
61
|
-
writing) automatically installed with SpacePy.
|
|
62
61
|
2. To have get_data return the data in an xarray dataset.
|
|
63
62
|
* [cdflib](https://pypi.org/project/cdflib/).
|
|
64
63
|
* [xarray](https://pypi.org/project/xarray/).
|
|
@@ -67,11 +66,10 @@ Description:
|
|
|
67
66
|
|
|
68
67
|
As noted in the dependencies above, if you intend to call the get_data
|
|
69
68
|
method, you must install either
|
|
70
|
-
1. [SpacePy](https://
|
|
71
|
-
|
|
72
|
-
procedures at the SpacePy and CDF web sites).
|
|
69
|
+
1. [SpacePy](https://spacepy.github.io/) following the
|
|
70
|
+
procedures at the SpacePy web sites).
|
|
73
71
|
2. [cdflib](https://pypi.org/project/cdflib/) and
|
|
74
|
-
[xarray](https://pypi.org/project/xarray/)
|
|
72
|
+
[xarray](https://pypi.org/project/xarray/).
|
|
75
73
|
|
|
76
74
|
$ pip install -U cdflib
|
|
77
75
|
$ pip install -U xarray
|
|
@@ -10,7 +10,7 @@ README = (HERE / "README.md").read_text()
|
|
|
10
10
|
# This call to setup() does all the work
|
|
11
11
|
setup(
|
|
12
12
|
name="cdasws",
|
|
13
|
-
version="1.7.
|
|
13
|
+
version="1.7.44",
|
|
14
14
|
description="NASA's Coordinated Data Analysis System Web Service Client Library",
|
|
15
15
|
long_description=README,
|
|
16
16
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|