Synopsis
This library provides a simple python interface to the heliophysics data
and services of
NASA's Coordinated Data Analysis System
(CDAS). This library implements the client side of the
CDAS RESTful web services
and can return data from any of
these datasets in a
SpacePy datamodel,
xarray.Dataset, or
pandas.DataFrame
with all source and
ISTP/SPDF metadata.
Note that this package is included in the
base image, so there is no need to install it there.
Frequently asked questions concerning this library are at
FAQ.
For more general details about the CDAS web services, see
https://berniegsfc.github.io/cdasws/.
Code Example
This package contains example code calling most of the available web services. To run the included example, do the following
python -m cdasws
Also, the following Jupyter notebooks demonstrate different features of the library:
- Data Retrieval (ipynb file) demonstrating use of library with results returned in SpacePy data model, xarray.Dataset, and pandas.DataFrame. Launch on Binder.
- CDAWeb Binning Example (ipynb file) demonstrating use CDAWeb binning. Launch on Binder.
- Magnetic Field Line Conjunction Example (ipynb file) with related data retrieval/plotting using cdasws. Launch on Binder.
And at the bottom of each CDAWeb dataset description is a "Data Access Code Examples" link that contains dataset-specific code utilizing this package to access the data.
Motivation
This library hides the HTTP, JSON/XML, and CDF details of the CDAS web services. A python developer only has to deal with python objects and methods (primarily the SpacePy data model or xarray.Dataset object with full ISTP/SPDF metadata).
Dependencies
The only required dependencies are the following:
If you call the get_data method then one of the following two sets of additional dependencies are required:
- To have get_data return the data in the SpacePy data model.
- SpacePy. Refer to the SpacePy documentation for the details of SpacePy's dependencies.
- To have get_data return the data in an xarray.Dataset or pandas.DataFrame.
If you want to take advantage of HTTP caching, then install the following:
Installation
As noted in the dependencies above, if you intend to call the get_data method, you must install one of the following options.
-
$ pip install -U spacepy -
$ pip install -U cdflib $ pip install -U xarray
Then, to install this package
$ pip install -U cdasws
or to include the optional cache package
$ pip install -U cdasws[cache]
API Reference
Refer to cdasws package API reference
or use the standard python help mechanism.
from cdasws import CdasWs
help(CdasWs)
Tests
The tests directory contains unittest tests.
Contributors
Bernie Harris.
e-mail for support.
License
This code is licensed under the NASA Open Source Agreement (NOSA).
Release files for cdasws 1.8.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cdasws-1.8.18.tar.gz | 44.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cdasws-1.8.18-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 95.2 kB
Release files / cdasws-1.8.18.tar.gz
| Download URL | cdasws-1.8.18.tar.gz |
|---|---|
| Size | 44.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c2afd8f273cdcb0164891c2e15732e8a197095f21fbc01cf134372e4daace5e
|
|
BLAKE2b-256 checksum How to use checksums |
113e9b50ced7407da3ad3698703a4e639bb74188648652483658c22f55829851
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.25
|
Release files / cdasws-1.8.18-py3-none-any.whl
| Download URL | cdasws-1.8.18-py3-none-any.whl |
|---|---|
| Size | 51.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60fb23fb25090924551338447f5075826f3c960b0846479fa6059f02fcd3279f
|
|
BLAKE2b-256 checksum How to use checksums |
afb168c6af91ce9980e4a775ab5fd44f11c55026f8cfb513fd0b6e34cb1d3c0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.25
|