| Name | iers JSON |
| Version |
1.4.0
JSON |
| download |
| home_page | https://github.com/behrouzz/iers |
| Summary | Retrieve data from International Earth Rotation Srvice (IERS) |
| upload_time | 2024-09-09 00:26:53 |
| maintainer | None |
| docs_url | None |
| author | Behrouz Safari |
| requires_python | >=3.6 |
| license | MIT |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
**Author:** [Behrouz Safari](https://behrouzz.github.io/)<br/>
**License:** [MIT](https://opensource.org/licenses/MIT)<br/>
# iers
*Analysis data of the International Earth Rotation and Reference Systems Service (IERS)*
## Installation
Install the latest version of *iers* from [PyPI](https://pypi.org/project/iers/):
pip install iers
Requirements are *numpy* and *pandas* and will be installed automatically if needed.
## Quick start
Let's get parameters for the *Julian Date* 2460556.5 and print the results.
```python
from iers import EOP
dc = EOP().get_eop(2460556.5)
print(dc)
```
Output:
```
{'px': 0.211611, 'py': 0.44424, 'ut1_utc': 0.0531643, 'dx': 0.349, 'dy': 0.088}
```
## More
Currently, this package can retrieve Earth Orientation Parameters from four files. It should be indicated with *kind* argument of EOP class. The first kind, which is default, gets daily data from 1973-01-02 until a few month after current date. The second kind is daily data from 1962-01-01 until a few days before the current date. The third kind is from 1846 until now, but its is not daily. It is 0.1 year interval (from 1846 from 1889) and 0.05 year interval (from 1890 to now). The fourth kind is longterm historical table from 2000 B.C. until 2015.
You should create an instance of the *EOP* class by passing the kind of table you want to `kind` argument. Then you can get the table with 'table' attribute.
```python
from iers import EOP
eop = EOP(kind=1)
print(eop.table)
```
Output:
```
mjd px_A py_A ut1_utc_A ... py_B ut1_utc_B dx_B dy_B
0 41684.0 0.120733 0.136966 0.808418 ... 0.137 0.8075 -18.637 -3.667
1 41685.0 0.118980 0.135656 0.805616 ... 0.134 0.8044 -18.636 -3.571
2 41686.0 0.117227 0.134348 0.802790 ... 0.131 0.8012 -18.669 -3.621
3 41687.0 0.115473 0.133044 0.799873 ... 0.128 0.7981 -18.751 -3.769
4 41688.0 0.113717 0.131746 0.796814 ... 0.126 0.7949 -18.868 -3.868
... ... ... ... ... ... ... ... ... ...
19236 60920.0 0.179201 0.355850 0.104524 ... NaN NaN NaN NaN
19237 60921.0 0.179305 0.355138 0.105691 ... NaN NaN NaN NaN
19238 60922.0 0.179391 0.354423 0.106704 ... NaN NaN NaN NaN
19239 60923.0 0.179458 0.353706 0.107474 ... NaN NaN NaN NaN
19240 60924.0 0.179507 0.352987 0.107948 ... NaN NaN NaN NaN
[19241 rows x 11 columns]
```
Let's use another *kind*:
```python
from iers import EOP
eop = EOP(kind=2)
print(eop.table)
```
Output:
```
mjd px py ut1_utc lod dx dy
0 37665.0 -0.012700 0.213000 0.032634 0.001723 0.000000 0.000000
1 37666.0 -0.015900 0.214100 0.032055 0.001669 0.000000 0.000000
2 37667.0 -0.019000 0.215200 0.031553 0.001582 0.000000 0.000000
3 37668.0 -0.021999 0.216301 0.031144 0.001496 0.000000 0.000000
4 37669.0 -0.024799 0.217301 0.030815 0.001416 0.000000 0.000000
... ... ... ... ... ... ... ...
22856 60521.0 0.157404 0.478195 0.023001 -0.000948 0.000321 -0.000074
22857 60522.0 0.159281 0.477650 0.024048 -0.001134 0.000357 -0.000077
22858 60523.0 0.161188 0.477331 0.025258 -0.001283 0.000402 -0.000092
22859 60524.0 0.163634 0.476656 0.026573 -0.001325 0.000448 -0.000106
22860 60525.0 0.166545 0.476250 0.027893 -0.001291 0.000413 -0.000105
```
You can get the available parameters for a desired moment by passing the time as *datetime* or *Julian Date* or *string* to the `.get_eop()` method. If the *kind* is 1, it will use bulletin *B* if there is available data, otherwise uses bulletin *A*. You can check which bulletin has been used for interpolation with `bulletin` attribute.
```python
from iers import EOP
eop = EOP(kind=1)
dc = eop.get_eop('2024-05-02 21:37:50')
print(dc)
print('Bulletin used:', eop.bulletin)
```
Output:
```
{'px': 0.0069811804398159285, 'py': 0.40801708148148286, 'ut1_utc': -0.01803119438657428, 'dx': 0.2808885416666599, 'dy': -0.16251909722223354}
Bulletin used: B
```
The files will be downloaded automatically and saved in *Documents* folder of user, so the next time you do not need to download the file again. Any file that is older than 7 days, will be downloaded automatically. By the way, if you want newer versions of a file, you can use the `.download()` method to download it again.
```python
from iers import EOP
eop = EOP(kind=1)
eop.download()
```
## Leap Seconds
To get leap seconds for a given time, pass the time as *datetime* or *Julian Date* or *string* to the `leap_seconds` function.
```python
from iers import leap_seconds
r = leap_seconds('2012-01-15 15:40:33')
print(r)
```
Output:
```
34
```
See more at [https://behrouzz.github.io/astrodatascience/](https://behrouzz.github.io/astrodatascience/)
Raw data
{
"_id": null,
"home_page": "https://github.com/behrouzz/iers",
"name": "iers",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Behrouz Safari",
"author_email": "behrouz.safari@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/36/2b/dbda3a4cb56fe1c1f85b47230a593eea6c3b27c08ebcb22e086c5ee43345/iers-1.4.0.tar.gz",
"platform": null,
"description": "**Author:** [Behrouz Safari](https://behrouzz.github.io/)<br/>\r\n**License:** [MIT](https://opensource.org/licenses/MIT)<br/>\r\n\r\n# iers\r\n*Analysis data of the International Earth Rotation and Reference Systems Service (IERS)*\r\n\r\n\r\n## Installation\r\n\r\nInstall the latest version of *iers* from [PyPI](https://pypi.org/project/iers/):\r\n\r\n pip install iers\r\n\r\nRequirements are *numpy* and *pandas* and will be installed automatically if needed.\r\n\r\n\r\n## Quick start\r\n\r\nLet's get parameters for the *Julian Date* 2460556.5 and print the results.\r\n\r\n```python\r\nfrom iers import EOP\r\ndc = EOP().get_eop(2460556.5)\r\nprint(dc)\r\n```\r\n\r\nOutput:\r\n\r\n```\r\n{'px': 0.211611, 'py': 0.44424, 'ut1_utc': 0.0531643, 'dx': 0.349, 'dy': 0.088}\r\n```\r\n\r\n## More\r\n\r\nCurrently, this package can retrieve Earth Orientation Parameters from four files. It should be indicated with *kind* argument of EOP class. The first kind, which is default, gets daily data from 1973-01-02 until a few month after current date. The second kind is daily data from 1962-01-01 until a few days before the current date. The third kind is from 1846 until now, but its is not daily. It is 0.1 year interval (from 1846 from 1889) and 0.05 year interval (from 1890 to now). The fourth kind is longterm historical table from 2000 B.C. until 2015.\r\n\r\nYou should create an instance of the *EOP* class by passing the kind of table you want to `kind` argument. Then you can get the table with 'table' attribute.\r\n\r\n```python\r\nfrom iers import EOP\r\n\r\neop = EOP(kind=1)\r\nprint(eop.table)\r\n```\r\n\r\nOutput:\r\n\r\n```\r\n mjd px_A py_A ut1_utc_A ... py_B ut1_utc_B dx_B dy_B\r\n0 41684.0 0.120733 0.136966 0.808418 ... 0.137 0.8075 -18.637 -3.667\r\n1 41685.0 0.118980 0.135656 0.805616 ... 0.134 0.8044 -18.636 -3.571\r\n2 41686.0 0.117227 0.134348 0.802790 ... 0.131 0.8012 -18.669 -3.621\r\n3 41687.0 0.115473 0.133044 0.799873 ... 0.128 0.7981 -18.751 -3.769\r\n4 41688.0 0.113717 0.131746 0.796814 ... 0.126 0.7949 -18.868 -3.868\r\n... ... ... ... ... ... ... ... ... ...\r\n19236 60920.0 0.179201 0.355850 0.104524 ... NaN NaN NaN NaN\r\n19237 60921.0 0.179305 0.355138 0.105691 ... NaN NaN NaN NaN\r\n19238 60922.0 0.179391 0.354423 0.106704 ... NaN NaN NaN NaN\r\n19239 60923.0 0.179458 0.353706 0.107474 ... NaN NaN NaN NaN\r\n19240 60924.0 0.179507 0.352987 0.107948 ... NaN NaN NaN NaN\r\n\r\n[19241 rows x 11 columns]\r\n```\r\n\r\nLet's use another *kind*:\r\n\r\n\r\n```python\r\nfrom iers import EOP\r\n\r\neop = EOP(kind=2)\r\nprint(eop.table)\r\n```\r\n\r\nOutput:\r\n\r\n```\r\n mjd px py ut1_utc lod dx dy\r\n0 37665.0 -0.012700 0.213000 0.032634 0.001723 0.000000 0.000000\r\n1 37666.0 -0.015900 0.214100 0.032055 0.001669 0.000000 0.000000\r\n2 37667.0 -0.019000 0.215200 0.031553 0.001582 0.000000 0.000000\r\n3 37668.0 -0.021999 0.216301 0.031144 0.001496 0.000000 0.000000\r\n4 37669.0 -0.024799 0.217301 0.030815 0.001416 0.000000 0.000000\r\n... ... ... ... ... ... ... ...\r\n22856 60521.0 0.157404 0.478195 0.023001 -0.000948 0.000321 -0.000074\r\n22857 60522.0 0.159281 0.477650 0.024048 -0.001134 0.000357 -0.000077\r\n22858 60523.0 0.161188 0.477331 0.025258 -0.001283 0.000402 -0.000092\r\n22859 60524.0 0.163634 0.476656 0.026573 -0.001325 0.000448 -0.000106\r\n22860 60525.0 0.166545 0.476250 0.027893 -0.001291 0.000413 -0.000105\r\n```\r\n\r\nYou can get the available parameters for a desired moment by passing the time as *datetime* or *Julian Date* or *string* to the `.get_eop()` method. If the *kind* is 1, it will use bulletin *B* if there is available data, otherwise uses bulletin *A*. You can check which bulletin has been used for interpolation with `bulletin` attribute.\r\n\r\n```python\r\nfrom iers import EOP\r\n\r\neop = EOP(kind=1)\r\n\r\ndc = eop.get_eop('2024-05-02 21:37:50')\r\n\r\nprint(dc)\r\nprint('Bulletin used:', eop.bulletin)\r\n```\r\n\r\nOutput:\r\n\r\n```\r\n{'px': 0.0069811804398159285, 'py': 0.40801708148148286, 'ut1_utc': -0.01803119438657428, 'dx': 0.2808885416666599, 'dy': -0.16251909722223354}\r\nBulletin used: B\r\n```\r\n\r\nThe files will be downloaded automatically and saved in *Documents* folder of user, so the next time you do not need to download the file again. Any file that is older than 7 days, will be downloaded automatically. By the way, if you want newer versions of a file, you can use the `.download()` method to download it again.\r\n\r\n```python\r\nfrom iers import EOP\r\n\r\neop = EOP(kind=1)\r\neop.download()\r\n```\r\n\r\n## Leap Seconds\r\n\r\nTo get leap seconds for a given time, pass the time as *datetime* or *Julian Date* or *string* to the `leap_seconds` function.\r\n\r\n```python\r\nfrom iers import leap_seconds\r\n\r\nr = leap_seconds('2012-01-15 15:40:33')\r\nprint(r)\r\n```\r\n\r\nOutput:\r\n\r\n```\r\n34\r\n```\r\n\r\nSee more at [https://behrouzz.github.io/astrodatascience/](https://behrouzz.github.io/astrodatascience/)\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Retrieve data from International Earth Rotation Srvice (IERS)",
"version": "1.4.0",
"project_urls": {
"Homepage": "https://github.com/behrouzz/iers"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "79ed4f951d8d9c5c49fc494c5d49e6262a2520cfbe28d4203bcdcf9673f2e4d0",
"md5": "e490590de716d19ab3f4a1ecb3107577",
"sha256": "e21417a34519afd172a3a333a63dfe03520d4fec202ec5f157d1b5f8f5ffd5c9"
},
"downloads": -1,
"filename": "iers-1.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e490590de716d19ab3f4a1ecb3107577",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 9283,
"upload_time": "2024-09-09T00:26:52",
"upload_time_iso_8601": "2024-09-09T00:26:52.404865Z",
"url": "https://files.pythonhosted.org/packages/79/ed/4f951d8d9c5c49fc494c5d49e6262a2520cfbe28d4203bcdcf9673f2e4d0/iers-1.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "362bdbda3a4cb56fe1c1f85b47230a593eea6c3b27c08ebcb22e086c5ee43345",
"md5": "4cdd5b73cfe322eee3dd304fffcd20bd",
"sha256": "ea6c7c29fdfe57f2320933ba0aef5e02c5d010e63a60a5592382dc5095d62eff"
},
"downloads": -1,
"filename": "iers-1.4.0.tar.gz",
"has_sig": false,
"md5_digest": "4cdd5b73cfe322eee3dd304fffcd20bd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8782,
"upload_time": "2024-09-09T00:26:53",
"upload_time_iso_8601": "2024-09-09T00:26:53.698182Z",
"url": "https://files.pythonhosted.org/packages/36/2b/dbda3a4cb56fe1c1f85b47230a593eea6c3b27c08ebcb22e086c5ee43345/iers-1.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-09 00:26:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "behrouzz",
"github_project": "iers",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "iers"
}