elp-mpp02


Nameelp-mpp02 JSON
Version 0.0.4 PyPI version JSON
download
home_page
SummaryAccurate Moon positions using the Lunar solution ELP/MPP02 in Python
upload_time2023-11-05 15:14:02
maintainer
docs_urlNone
author
requires_python
licenseGPLv3+
keywords moon astronomy ephemeris
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ELP_MPP02: accurate Moon positions using the lunar solution ELP/MPP02 in Python #

Compute accurate Moon positions using the semi-analytical lunar solution ELP2000/MPP02 by Chapront & Francou
(2003) in Python.


## Installation ##

This package can be installed using `pip install elp-mpp02`.  You will need to manually download the six data
files `ELP_MAIN/PERT.S1/2/3` from
[ftp://cyrano-se.obspm.fr/pub/2_lunar_solutions/2_elpmpp02](ftp://cyrano-se.obspm.fr/pub/2_lunar_solutions/2_elpmpp02)
and save them in a directory of your choice.


## Using the package ##

You can import the package as follows:
```python
from elp_mpp02 import mpp02 as mpp
```

Then, make sure you define the directory where the data files are located (if not in the current dir). 
For the subdir `data/` of the current directory, do:
```python
mpp.dataDir = 'data'  # Set the dir where the ELP_*.S* data files can be found
```

Choose whether to run the code in LLR (`mode=0`; default) or DE405 (`mode=1`; 'historical') mode, select a
Julian day and compute the Moon position for that instance:
```python
mode = 1  # Historical mode
jd = 2451545
lon,lat,dist = mpp.compute_lbr(jd, mode)  
print('jd =',jd, ':   lon =',lon,'rad,  lat =',lat, 'rad,  dist =',dist,'km.')
```
The result should be
```
jd = 2451545 :   lon = -2.385534575256455 rad,  lat = 0.09024868423130429 rad,  dist = 402448.6385830673 km
```

The ecliptical longitude and latitude are expressed in radians, the distance is in kilometres.  The
coordinates are valid for the mean equinox of J2000.  Note that on the first call, the constants must be
initialised and the data files need to be read, which can take ~10s.  If `mode` is changed between calls, the
data must be reinitialised.


## Author and licence ##

* Author: Marc van der Sluys
* Contact: http://astro.ru.nl/~sluys/
* Website: [Github](https://github.com/MarcvdSluys/ELP-MPP02), [PyPI](https://pypi.org/project/elp_mpp02/)
* Licence: [GPLv3+](https://www.gnu.org/licenses/gpl.html)


## References ##

* [Chapront & Francou (2003)](https://ui.adsabs.harvard.edu/abs/2003A%26A...404..735C/abstract)
* [FTP data files](ftp://cyrano-se.obspm.fr/pub/2_lunar_solutions/2_elpmpp02) — in case [FTP urls don't work in Markdown](https://github.com/gollum/gollum/issues/759): ftp://cyrano-se.obspm.fr/pub/2_lunar_solutions/2_elpmpp02
* This Python code is adapted from the Fortran implementation in [libTheSky](http://libthesky.sourceforge.net/)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "elp-mpp02",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Moon,astronomy,ephemeris",
    "author": "",
    "author_email": "Marc van der Sluys <git@vandersluys.nl>",
    "download_url": "https://files.pythonhosted.org/packages/5e/57/e54fa19bc2ea9051f2ea552bfa1cc26297322982d069c89366f13df0607d/elp_mpp02-0.0.4.tar.gz",
    "platform": null,
    "description": "# ELP_MPP02: accurate Moon positions using the lunar solution ELP/MPP02 in Python #\n\nCompute accurate Moon positions using the semi-analytical lunar solution ELP2000/MPP02 by Chapront & Francou\n(2003) in Python.\n\n\n## Installation ##\n\nThis package can be installed using `pip install elp-mpp02`.  You will need to manually download the six data\nfiles `ELP_MAIN/PERT.S1/2/3` from\n[ftp://cyrano-se.obspm.fr/pub/2_lunar_solutions/2_elpmpp02](ftp://cyrano-se.obspm.fr/pub/2_lunar_solutions/2_elpmpp02)\nand save them in a directory of your choice.\n\n\n## Using the package ##\n\nYou can import the package as follows:\n```python\nfrom elp_mpp02 import mpp02 as mpp\n```\n\nThen, make sure you define the directory where the data files are located (if not in the current dir). \nFor the subdir `data/` of the current directory, do:\n```python\nmpp.dataDir = 'data'  # Set the dir where the ELP_*.S* data files can be found\n```\n\nChoose whether to run the code in LLR (`mode=0`; default) or DE405 (`mode=1`; 'historical') mode, select a\nJulian day and compute the Moon position for that instance:\n```python\nmode = 1  # Historical mode\njd = 2451545\nlon,lat,dist = mpp.compute_lbr(jd, mode)  \nprint('jd =',jd, ':   lon =',lon,'rad,  lat =',lat, 'rad,  dist =',dist,'km.')\n```\nThe result should be\n```\njd = 2451545 :   lon = -2.385534575256455 rad,  lat = 0.09024868423130429 rad,  dist = 402448.6385830673 km\n```\n\nThe ecliptical longitude and latitude are expressed in radians, the distance is in kilometres.  The\ncoordinates are valid for the mean equinox of J2000.  Note that on the first call, the constants must be\ninitialised and the data files need to be read, which can take ~10s.  If `mode` is changed between calls, the\ndata must be reinitialised.\n\n\n## Author and licence ##\n\n* Author: Marc van der Sluys\n* Contact: http://astro.ru.nl/~sluys/\n* Website: [Github](https://github.com/MarcvdSluys/ELP-MPP02), [PyPI](https://pypi.org/project/elp_mpp02/)\n* Licence: [GPLv3+](https://www.gnu.org/licenses/gpl.html)\n\n\n## References ##\n\n* [Chapront & Francou (2003)](https://ui.adsabs.harvard.edu/abs/2003A%26A...404..735C/abstract)\n* [FTP data files](ftp://cyrano-se.obspm.fr/pub/2_lunar_solutions/2_elpmpp02) &mdash; in case [FTP urls don't work in Markdown](https://github.com/gollum/gollum/issues/759): ftp://cyrano-se.obspm.fr/pub/2_lunar_solutions/2_elpmpp02\n* This Python code is adapted from the Fortran implementation in [libTheSky](http://libthesky.sourceforge.net/)\n",
    "bugtrack_url": null,
    "license": "GPLv3+",
    "summary": "Accurate Moon positions using the Lunar solution ELP/MPP02 in Python",
    "version": "0.0.4",
    "project_urls": {
        "GitHub": "https://github.com/MarcvdSluys/ELP-MPP02",
        "ReadTheDocs": "https://readthedocs.org/projects/elp-mpp02/"
    },
    "split_keywords": [
        "moon",
        "astronomy",
        "ephemeris"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c758747c7681f0b9ba48668aa30e9ace7be05278b4c2959bb573298ca6975587",
                "md5": "a9a3803a7ad8fed0e3c588bc6c21cb18",
                "sha256": "1ee0c123f6d0d751aee13ab0b3e54c18f8a7e5b87edf34535fa3ae8364b30ea5"
            },
            "downloads": -1,
            "filename": "elp_mpp02-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a9a3803a7ad8fed0e3c588bc6c21cb18",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 22576,
            "upload_time": "2023-11-05T15:14:01",
            "upload_time_iso_8601": "2023-11-05T15:14:01.027123Z",
            "url": "https://files.pythonhosted.org/packages/c7/58/747c7681f0b9ba48668aa30e9ace7be05278b4c2959bb573298ca6975587/elp_mpp02-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e57e54fa19bc2ea9051f2ea552bfa1cc26297322982d069c89366f13df0607d",
                "md5": "7c88b3a4ccdb312ad2176d63ee10f7a5",
                "sha256": "4e52bb5927d989ef9ec5fa5ac2903642e95cdb89ec9198379026f3c9f6d8668f"
            },
            "downloads": -1,
            "filename": "elp_mpp02-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "7c88b3a4ccdb312ad2176d63ee10f7a5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 23230,
            "upload_time": "2023-11-05T15:14:02",
            "upload_time_iso_8601": "2023-11-05T15:14:02.597850Z",
            "url": "https://files.pythonhosted.org/packages/5e/57/e54fa19bc2ea9051f2ea552bfa1cc26297322982d069c89366f13df0607d/elp_mpp02-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-05 15:14:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MarcvdSluys",
    "github_project": "ELP-MPP02",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "elp-mpp02"
}
        
Elapsed time: 0.91437s