Skip to main content

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:

  1. authentication: auth(username="", password="",token="")
  2. download: download(datatype, metadatas:Dict)
  3. check authentication: authorized()

Here is an example of how to use the EP_TDIC dataset:

preparation

  1. import : from nadc_datahub import EP_TDIC
  2. set data download strategy: ep = EP_TDIC.get_entry("csdb")
  3. authenticate: ep.auth("username", "password")
  4. check for authentication: ep.authorized()
  5. download data: ep.download("/tmp/img.fits","image", {"obsid": 13600000582})

Download data

Three levels of ep data can be downloaded:

  1. CMOS Level: ep.get_obs_data(output, obs_id, cmos_id, version, data_level)
  2. Source Level: ep.get_src_data(output, obs_id, cmos_id, version, src_idx_in_det)
  3. File Level: ep.get_file(output, obs_id, cmos_id, version)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nadc_datahub-0.2.9.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nadc_datahub-0.2.9-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file nadc_datahub-0.2.9.tar.gz.

File metadata

  • Download URL: nadc_datahub-0.2.9.tar.gz
  • Upload date:
  • Size: 4.5 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

Hashes for nadc_datahub-0.2.9.tar.gz
Algorithm Hash digest
SHA256 9efae1b74d0a64623b8d8f6b3cc92a1c49f83cc1c623babb9c2d684d604004a6
MD5 f088c95b6ac1d90053acb8b8880333e6
BLAKE2b-256 9a8127bd428694e6b6a43a6d1bb844f2b50cca1ca8f9b817b1379ad5817a2359

See more details on using hashes here.

File details

Details for the file nadc_datahub-0.2.9-py3-none-any.whl.

File metadata

  • Download URL: nadc_datahub-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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

Hashes for nadc_datahub-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5894177580fc0393fb6d14bbd758900c1bd0312afacd9a86aa249eaf5d248575
MD5 9ed3b47156a0f96f607aa3d426586a92
BLAKE2b-256 502557c0f253d53ac268a3631794ec188b38d94c31d19e9fcd3dcf92c10bb516

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page