{"id":37075989,"url":"https://github.com/josepenaz/ephs","last_synced_at":"2026-01-14T08:56:35.280Z","repository":{"id":57411992,"uuid":"401871312","full_name":"josepenaz/ephs","owner":"josepenaz","description":"Aleph computes fast and accurate ephemeris of asteroids from MPCORB.DAT and astorb.dat catalogues. It joins the flexibility of astropy and the power of rebound to integrate asteroid's orbits.","archived":false,"fork":false,"pushed_at":"2025-07-07T03:14:31.000Z","size":79,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-30T03:06:43.059Z","etag":null,"topics":["asteroids","astronomy","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/josepenaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-31T23:36:48.000Z","updated_at":"2025-09-25T10:01:44.000Z","dependencies_parsed_at":"2025-07-07T04:22:09.847Z","dependency_job_id":"9261c0c9-ab9e-4a43-b79b-a633b7ceba3c","html_url":"https://github.com/josepenaz/ephs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/josepenaz/ephs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josepenaz%2Fephs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josepenaz%2Fephs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josepenaz%2Fephs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josepenaz%2Fephs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josepenaz","download_url":"https://codeload.github.com/josepenaz/ephs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josepenaz%2Fephs/sbom","scorecard":{"id":533434,"data":{"date":"2025-08-11","repo":{"name":"github.com/josepenaz/ephs","commit":"fd2d2f1a5e8e2a8b83cdb613a5a2ca0bb01687f0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T06:18:04.499Z","repository_id":57411992,"created_at":"2025-08-20T06:18:04.499Z","updated_at":"2025-08-20T06:18:04.499Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asteroids","astronomy","python"],"created_at":"2026-01-14T08:56:34.651Z","updated_at":"2026-01-14T08:56:35.273Z","avatar_url":"https://github.com/josepenaz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aleph\n\nAleph is a fast ephemeris producer joining [`astropy`](https://www.astropy.org/) and [`rebound`](https://rebound.readthedocs.io/en/latest/) with orbital parameters from [MPC](https://minorplanetcenter.net/)'s [MPCORB.DAT](https://minorplanetcenter.net/iau/MPCORB.html) or Lowell's [astorb.dat](https://asteroid.lowell.edu/main/astorb/). It allows you to get multi-epoch ephemeris of any asteroid in the catalogue or single-epoch ephemeris of _all_ asteroids in a given field of view.\n\nYou can choose if ephemeris are calculated using the simple 2-Body equations (fast but not very accurate) or integrating the N-Body problem including the Sun and the planets with their masses and each asteroid as massless particles (much more accurate but more time expensive). To speed up the ephemeris calculation of so many bodies, almost all functions allows parallel integrations.\n\n## Instalation\n\nYou can find Aleph in pip:\n``` {.sourceCode .bash}\npython3 -m pip install astro-aleph\n```\n\nYou can clone (or download) this repository and install it from there:\n``` {.sourceCode .bash}\ngit clone https://github.com/josepenaz/ephs.git\ncd ephs\npython3 setup.py install\n```\nYou can also install it using `pip` from the cloned repository:\n``` {.sourceCode .bash}\ngit clone https://github.com/josepenaz/ephs.git\ncd ephs\npython3 -m pip install --upgrade pip\npython3 -m pip install --upgrade build\npython3 -m build\npython3 -m pip install dist/aleph-X.X.tar.gz\n```\n\n## Getting started - DataBase class\n\nThe most basic class in Aleph is `DataBase.OrbParams` which reads and saves an orbital parameter catalogue. By default, it will try to read [MPCORB.DAT](https://minorplanetcenter.net/iau/MPCORB.html). The first time you start an `OrbParams` object, it will raise an error since the catalogue hasn't been downloaded. To avoid this, you can set `update=True` and it will download the catalogue and save it in the Aleph's directory:\n``` {.sourceCode .python}\nfrom aleph import DataBase\norbs = DataBase.OrbParams(update=True)\n```\nUse `update=True` only when you want to download the catalogue. Once it is download and saved, it will automatically read it each time you initialize an `OrbParams` object. Do not use `update=True` unless you want to download it again.\nIf you want to use another version of MPCORB.DAT, you can give give the path to the file you want to open:\n``` {.sourceCode .python}\norbs = DataBase.OrbParams(filename='path/MPCORB.DAT')\n```\n\n`OrbParams` can also read Lowell's [astorb.dat](https://asteroid.lowell.edu/main/astorb/) by setting `service='Lowell'`. Since FTP access to astorb.dat is not allowed, you must download it manually and specify the path to the file:\n``` {.sourceCode .python}\norbs = DataBase.OrbParams(service='Lowell', filename='path/astorb.dat')\n```\n\nOnce you have loaded the catalogue with `OrbParams` you can access to all asteroid's orbital parameters with the `asts` attribute, which is a list of dictionaries. Each dictionary saves the orbital parameters of each asteroid. For example, you can access to Ceres (the first body of the catalogue):\n``` {.sourceCode .python}\nceres = orbs.asts[0]\n```\nYou also can access to the epochs of the asteroids' mean anomaly with the attribute `dicc_epochs_M`. That atribute is important because it tells you how much the orbits need to be integrated to get the ephemeris (the integration starts at that epoch and ends at the epoch you want the ephemeris to be).\n\n## Getting Ephemeris\n\nTo look for all the asteroids that are visible in a given field of view you first have to create a `Query` instance:\n``` {.sourceCode .python}\nfrom aleph.Query import Query\nq = Query()\n```\nBy default, it will load the MPCORB.DAT database. If you want to load the astorb.dat catalogue, you need to set `service='Lowell'` and provide the catalogue itself with `filename='path/astorb.dat'`:\n``` {.sourceCode .python}\nfrom aleph.Query import Query\nq = Query(service='Lowell', filename='path/astorb.dat')\n```\n### Virtual Observatory: Using the catalogues\nWith the `Query` instance initialized you can _query_ for the ephemeris you want. In the next example, you ask for the asteroids in a field of 0.5 degrees of radius centered in the equatorial coordinates (0.5, 0.5) degrees, observed in July 25th, 2020 at Palomar Observatory. And to speed up things, we tell `Query` to compute the ephemeris in 5 parallel process:\n``` {.sourceCode .python}\nfrom astropy.coordinates import SkyCoord, EarthLocation\nfrom astropy.time import Time\nfrom astropy import units as u\n \npalomar = EarthLocation.of_site('Palomar')\nfield_center = SkyCoord(0.5*u.deg, 0.5*u.deg)\nfield_radius = 0.5*u.deg\nepoch = Time('2020-07-25')\n\nephs = q.query_mixed_cat(field_center, field_radius, epoch=epoch, observer=palomar, njobs=5)\n```\nThe function `query_mixed_cat` starts integrating using the equations of the 2-Body problem, it takes all bodies fallen in a similar but wider area than the field of view and integrates them along with the 8 planets of our Solar System (this integration is performed with the `IAS15` integrator of `rebound`).\n\nYou can use the 2-Body or the N-Body integrations just by using the `query_2b_cat` and `query_nb_cat` functions respectively.\n\n### Creating your own Data Base of integrated orbits\nLets say you need many ephemeris far from the mean anomaly epoch of your database. This means that for every time you run a `q.query_mixed_cat` or a `q.query_nb_cat` all asteroids will be integrated again and again the same period of time till the ephemeris epoch each time you call those methods. So the idea is you integrate all asteroids only once to an epoch close to the epoch you need to query, so every time you make a query the integrations will be much shorter. This can only be done using the astorb.dat catalogue. In the next example you will create the database (which is done just by saving the orbital parameters of the catalogue) and then you will integrate all bodies and save their _states_ (positions and velocities) at a far epoch. Finally, you can compute and save the orbital parameters that corresponds to the states you just compute.\n``` {.sourceCode .python}\nfrom astropy.time import Time\nfrom aleph import DataBase\n\naleph = DataBase.OrbParams(service='Lowell', filename='path/astorb.dat')\naleph.create_states_database() # You can provide 'sqlfile' with\n                               # the name of the file where you\n                               # want to save the database.\n\n# Lets say you want to integrate till two epochs:\ninteg_epochs = Time(['2022-01-02','2022-06-02']).jd # You need to provide the Julian Day\naleph.adding_states_into_db(integ_epochs, njobs=5)  # Remember to provide 'sqlfile' if\n                                                    # you use it before\naleph.adding_params_into_db()    # Again, remember 'sqlfile' if you use it before\n```\nThat process can take a long time, but it will greatly increase the execution time of any ephemeride queried around the integrated epochs.\n\n### Using your own Data Base of integrated orbits\nOnce the database is created, you can query for ephemeris using the `query_2b_db`, `query_nb_db` and `query_mixed_db` functions (that work in the same manner than the functions above). Remember that those functions work only with astorb.dat:\n``` {.sourceCode .python}\nfrom astropy.coordinates import SkyCoord, EarthLocation\nfrom astropy.time import Time\nfrom astropy import units as u\nfrom aleph.Query import Query\n\nq = Query(service='Lowell', filename='path/astorb.dat')\n \npalomar = EarthLocation.of_site('Palomar')\nfield_center = SkyCoord(0.5*u.deg, 0.5*u.deg)\nfield_radius = 0.5*u.deg\nepochs = Time(['2022-01-01','2022-01-02','2022-01-03',\n               '2022-06-01','2022-06-02','2022-06-03'])\n\nall_ephs = []\nfor epoch in epochs:\n    ephs = q.query_mixed_cat(field_center, field_radius, epoch=epoch, observer=palomar, njobs=5)\n    all_ephs.append(ephs)\n```\n\n### Getting multi-epoch ephemeris of a single body\nYou can get ephemeris of a single body at as many epochs you want. This ephemeris are computed integrating the N-Body problem (Sun, planets and the body).\n``` {.sourceCode .python}\nfrom astropy.coordinates import SkyCoord, EarthLocation\nfrom astropy.time import Time\nfrom astropy import units as u\nfrom aleph.Query import Query\n\nq = Query(service='Lowell', filename='path/astorb.dat')\n \npalomar = EarthLocation.of_site('Palomar')\nepochs = Time(['2022-01-01','2022-01-02','2022-01-03',\n               '2022-06-01','2022-06-02','2022-06-03'])\n\nephs = q.asteph(0, epochs=epochs, observer=palomar)\n```\nTo use this function, you need to create an Aleph database (see previous section), although you do not need to integrate all the asteroids to any epoch (running `aleph.create_states_database()` is enough).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosepenaz%2Fephs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosepenaz%2Fephs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosepenaz%2Fephs/lists"}