Name | nadc-datahub JSON |
Version |
0.2.2
JSON |
| download |
home_page | None |
Summary | A Python package for accessing datasets from NADC DataHub |
upload_time | 2025-01-21 06:21:41 |
maintainer | None |
docs_url | None |
author | zhangzhen |
requires_python | >=3.7 |
license | MIT |
keywords |
astronomy
data
nadc
datahub
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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="")`
1. download: `download(datatype, metadatas:Dict)`
1. check authentication: `authorized()`
Here is an example of how to use the EP_TDIC dataset:
## preparation
1. import : `from nadc_datahub import EP_TDIC`
1. set data download strategy: `ep = EP_TDIC.get_entry("csdb")`
1. authenticate: `ep.auth("username", "password")`
1. check for authentication: `ep.authorized()`
1. 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)`
1. Source Level: `ep.get_src_data(output, obs_id, cmos_id, version, src_idx_in_det)`
1. File Level: `ep.get_file(output, obs_id, cmos_id, version)`
Raw data
{
"_id": null,
"home_page": null,
"name": "nadc-datahub",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "astronomy, data, nadc, datahub",
"author": "zhangzhen",
"author_email": "zhangzhen@nao.cas.cn",
"download_url": "https://files.pythonhosted.org/packages/97/9b/a5fc90f94c1449fbcc51a9dab42cd146a21f5c69dc1a8555e5f0c0bb7394/nadc_datahub-0.2.2.tar.gz",
"platform": null,
"description": "# datahub\nAll data can be addressed using *dataset, datatype and metadatas*. \nA dataset is associated with a certain project, such as EP, Sitian.\nDatatype refers to the type of data, such as image, spectrum, light curve, etc. Different dataset may have different datatypes.\nMetadatas are the metadata of the data, such as the observation time, observation id, etc.\n\nFor example, the image observed by the EP WXT CMOS 13 with obsid 13600000582 can be addressed as:\n```\n{\n \"dataset\": \"EP_TDIC\",\n \"datatype\": \"image\",\n \"metadatas\": {\n \"obsid\": 13600000582,\n \"instrument\": \"WXT\"\n \"CMOS\": 13,\n \"version\": \"v1\"\n }\n}\n```\n\n# Example\nFirst of all, install : `pip install nadc-datahub`\nAll datasets are inherited from the base class `DataSet`, which defined the basic interface of all datasets. Includes:\n1. authentication: `auth(username=\"\", password=\"\",token=\"\")`\n1. download: `download(datatype, metadatas:Dict)`\n1. check authentication: `authorized()`\n\nHere is an example of how to use the EP_TDIC dataset:\n\n## preparation\n\n1. import : `from nadc_datahub import EP_TDIC`\n1. set data download strategy: `ep = EP_TDIC.get_entry(\"csdb\")`\n1. authenticate: `ep.auth(\"username\", \"password\")`\n1. check for authentication: `ep.authorized()`\n1. download data: `ep.download(\"/tmp/img.fits\",\"image\", {\"obsid\": 13600000582})`\n\n## Download data\nThree levels of ep data can be downloaded:\n1. CMOS Level\uff1a `ep.get_obs_data(output, obs_id, cmos_id, version, data_level)`\n1. Source Level\uff1a `ep.get_src_data(output, obs_id, cmos_id, version, src_idx_in_det)`\n1. File Level\uff1a `ep.get_file(output, obs_id, cmos_id, version)`\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package for accessing datasets from NADC DataHub",
"version": "0.2.2",
"project_urls": null,
"split_keywords": [
"astronomy",
" data",
" nadc",
" datahub"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a629585013b7e0edd5876338feafb56b81959892c5b15acae3cbb9d1c0cc5c19",
"md5": "910306530303f66791d3c5c79cb1ff86",
"sha256": "ef6b29660ef806923d353468f5d92b23575d600b1eaf3540dd1137ec76fea122"
},
"downloads": -1,
"filename": "nadc_datahub-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "910306530303f66791d3c5c79cb1ff86",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 4792,
"upload_time": "2025-01-21T06:21:38",
"upload_time_iso_8601": "2025-01-21T06:21:38.832564Z",
"url": "https://files.pythonhosted.org/packages/a6/29/585013b7e0edd5876338feafb56b81959892c5b15acae3cbb9d1c0cc5c19/nadc_datahub-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "979ba5fc90f94c1449fbcc51a9dab42cd146a21f5c69dc1a8555e5f0c0bb7394",
"md5": "11f2d04471b96d034f183df327a92ea0",
"sha256": "507c87d3d7181a1caaadeb287b8e1939c6ae2c7062ebabddbf3be2ab402e2595"
},
"downloads": -1,
"filename": "nadc_datahub-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "11f2d04471b96d034f183df327a92ea0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 3745,
"upload_time": "2025-01-21T06:21:41",
"upload_time_iso_8601": "2025-01-21T06:21:41.752871Z",
"url": "https://files.pythonhosted.org/packages/97/9b/a5fc90f94c1449fbcc51a9dab42cd146a21f5c69dc1a8555e5f0c0bb7394/nadc_datahub-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-21 06:21:41",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "nadc-datahub"
}