A Python package for accessing datasets from NADC DataHub
Project description
datahub
All data can be addressed using dataset, datatype and metadatas. A dataset is associated with a certain project, such as EP, Sitian. Datatype refers to the type of data, such as image, spectrum, light curve, etc. Different dataset may have different datatypes. Metadatas are the metadata of the data, such as the observation time, observation id, etc.
For example, the image observed by the EP WXT CMOS 13 with obsid 13600000582 can be addressed as:
{
"dataset": "EP_TDIC",
"datatype": "image",
"metadatas": {
"obsid": 13600000582,
"instrument": "WXT"
"CMOS": 13,
"version": "v1"
}
}
Example
First of all, install : pip install nadc-datahub
All datasets are inherited from the base class DataSet, which defined the basic interface of all datasets. Includes:
- authentication:
auth(username="", password="",token="") - download:
download(datatype, metadatas:Dict) - check authentication:
authorized()
Here is an example of how to use the EP_TDIC dataset:
preparation
- import :
from nadc_datahub import EP_TDIC - set data download strategy:
ep = EP_TDIC.get_entry("csdb") - authenticate:
ep.auth("username", "password") - check for authentication:
ep.authorized() - download data:
ep.download("/tmp/img.fits","image", {"obsid": 13600000582})
Download data
Three levels of ep data can be downloaded:
- CMOS Level:
ep.get_obs_data(output, obs_id, cmos_id, version, data_level) - Source Level:
ep.get_src_data(output, obs_id, cmos_id, version, src_idx_in_det) - File Level:
ep.get_file(output, obs_id, cmos_id, version)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nadc_datahub-0.2.8.tar.gz.
File metadata
- Download URL: nadc_datahub-0.2.8.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-60-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9913e4da2a137e96cb8e0b4fa5bd78607684631e837cbad57064d9940bdd074
|
|
| MD5 |
4f1e0f012fb522cc170310ebc6067dec
|
|
| BLAKE2b-256 |
7a89dbfb302539ebfcafa9bb9631933e9833147952e7422341518d45d4bfec87
|
File details
Details for the file nadc_datahub-0.2.8-py3-none-any.whl.
File metadata
- Download URL: nadc_datahub-0.2.8-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-60-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
449306be6cdaf04cf549d0fac4f8a6b362791e37acbf89a110e3932fb376cfb4
|
|
| MD5 |
37e191bde81100466f4f21a888678096
|
|
| BLAKE2b-256 |
2da5069beb02666998164a7ab822d85e055a387f45ef9552de132057f394418b
|