{"id":35546737,"url":"https://github.com/behrouzz/hypatie","last_synced_at":"2026-01-04T06:04:31.276Z","repository":{"id":49523850,"uuid":"341755527","full_name":"behrouzz/hypatie","owner":"behrouzz","description":"A python package for astronomical calculations","archived":false,"fork":false,"pushed_at":"2024-08-05T17:12:53.000Z","size":219,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-30T11:41:45.167Z","etag":null,"topics":["astronomy","deep-sky-objects","horizons","simbad","solar-system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/behrouzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-24T02:33:15.000Z","updated_at":"2024-08-05T17:12:56.000Z","dependencies_parsed_at":"2023-02-05T03:15:15.814Z","dependency_job_id":null,"html_url":"https://github.com/behrouzz/hypatie","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/behrouzz/hypatie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behrouzz%2Fhypatie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behrouzz%2Fhypatie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behrouzz%2Fhypatie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behrouzz%2Fhypatie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/behrouzz","download_url":"https://codeload.github.com/behrouzz/hypatie/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behrouzz%2Fhypatie/sbom","scorecard":{"id":230590,"data":{"date":"2025-08-11","repo":{"name":"github.com/behrouzz/hypatie","commit":"290cd851352717ee9d7ac826946fd9344c36b8d7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"Maintained","score":0,"reason":"0 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":"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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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-17T04:46:26.440Z","repository_id":49523850,"created_at":"2025-08-17T04:46:26.440Z","updated_at":"2025-08-17T04:46:26.440Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28198679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-04T02:00:06.065Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["astronomy","deep-sky-objects","horizons","simbad","solar-system"],"created_at":"2026-01-04T06:02:47.111Z","updated_at":"2026-01-04T06:04:31.265Z","avatar_url":"https://github.com/behrouzz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Author:** [Behrouz Safari](https://behrouzz.github.io/)\u003cbr/\u003e\n**License:** [MIT](https://opensource.org/licenses/MIT)\u003cbr/\u003e\n\n# hypatie\n*A python package for astronomical calculations*\n\n\n## Installation\n\nInstall the latest version of *hypatie* from [PyPI](https://pypi.org/project/hypatie/):\n\n    pip install hypatie\n\nRequirements are *numpy*, *pandas* and *matplotlib*.\n\n\n## NASA JPL's Horizons\n\nLet's get the positions of the sun between two times:\n\n```python\nimport hypatie as hp\n\nt1 = '2021-03-20 08:00:00'\nt2 = '2021-03-20 10:00:00'\n```\n\nIf you want the apparent RA and DEC of the Sun with respect to Earth's center (geocentric):\n\n```python\nobs = hp.Observer('sun', t1, t2, step=5)\n```\n\nNow you can access the time intervals with *.time* attribute:\n\n```python\nprint(obs.time)\n\n[datetime.datetime(2021, 3, 20, 8, 0)\n datetime.datetime(2021, 3, 20, 8, 24)\n datetime.datetime(2021, 3, 20, 8, 48)\n datetime.datetime(2021, 3, 20, 9, 12)\n datetime.datetime(2021, 3, 20, 9, 36)\n datetime.datetime(2021, 3, 20, 10, 0)]\n```\n\nTo acces the position you can use *obs.pos*, *obs.ra*, or *obs.dec*:\n\n```python\nprint(obs.pos)\n\n[[ 3.59938235e+02 -2.66803120e-02]\n [ 3.59953431e+02 -2.00920520e-02]\n [ 3.59968627e+02 -1.35038600e-02]\n [ 3.59983823e+02 -6.91573600e-03]\n [ 3.59999018e+02 -3.27680000e-04]\n [ 1.42132560e-02  6.26030600e-03]]\n```\n\nThe first column in the above array is RA and the second column is DEC.\n\nIt is possible to get the apparent RA \u0026 DEC of a targer with respect to a specified location on the surface of a body.\nFor example, if you want to get the apparent RA \u0026 DEC of the Sun for the Eiffel Tower :\n\n```python\nobs = hp.Observer('sun', t1, t2, step=5, center='2.2945,48.8584,300@399')\n```\n\nNote that 2.2945 is the longtitude, 48.8584 is the latitude and 300 (meters) is the elevation of the Eiffel Tower.\nWe have specified '@399' at the end which means that this coordinates is situated on the Earth (399 is the Earth's code).                                                                                           \n\nYou can request the cartesian positions (x,y,z) of a target with *Vector* class.\n\n```python\nvec = hp.Vector('sun', t1, t2, step=5)\n```\n\nAs with the *Observer* class, there are two attributes *.time* and *.pos* for *Vector* class.\nNote that when creating a Vector class, you have *.x*, *.y* and *.z* attributes instead of *.ra* and *.dec*.\n\nFor both *Vector* and *Observer* classes you can pass a single time to get position/state of a body at a single time:\n```python\nvec = hp.Vector('sun', t1)\n```\n\nBoth *Vector* and *Observer* classes have *.plot()* method.\n```python\n# plot polar coordinates\nobs.plot()\n# plot cartesian coordinates\nvec.plot()\n```\n\n## Example: animating James Webb Space Telescope\n\nIn addition to *.plot()* method of *Vector* and *Observer* classes, there's a *play()* function that you can pass it a list of Vector objects as well as some other lists as shown in the example below:\n\n```python\nimport hypatie as hp\nimport matplotlib.pyplot as plt\n\nt1 = '2018-10-01 14:18:00'\nt2 = '2024-12-31 12:18:00'\n\n# get positions with respect to the barycenter of earth-moon\nearth = hp.Vector('399', t1, t2, center='500@3', step=1000)\nmoon = hp.Vector('301', t1, t2, center='500@3', step=1000)\njwst = hp.Vector('-170', t1, t2, center='500@3', step=1000)\n\nbodies = [earth, moon, jwst]\nnames = ['Earth', 'Moon', 'James Webb']\ncolors = ['b','g','r']\nsizes = [20, 8, 3]\n\n# play the animation\nanim = hp.play(bodies, names, colors, sizes)\nplt.show()\n```\n\n## Transformations\n\nThere are several functions in *hypatie.transform* module. As an example, let's use the *to_tete* function which transforms the GCRS coordinates to True Equator True Equinox (of date):\n\n```python\nfrom hypatie.transform import to_tete\nimport numpy as np\nfrom datetime import datetime\n\nt = datetime(2022, 3, 18)\n\n# GCRS coordinates\npos = np.array([0.73859258, 0.13935437, 0.65959182])\n\n# True Equator and True equinox of t\npos_tete = to_tete(pos, t)\n\nprint(pos_tete)\n#[0.73649269 0.14295327 0.66116782]\n```\n\n## Deep sky\n\nYou can download data from astronomical catalogues:\n```python\nfrom hypatie.catalogues import Catalogue\n\ncat = Catalogue('gaia3')\ndata, meta = cat.download()\n```\n\nor, plot the star chart for your location:\n```python\nfrom hypatie.plots import star_chart\n\nfig, ax = star_chart(lon=2.2945, lat=48.8584)\nplt.show()\n```\n\nor, use a virtual telescope:\n```python\nfrom hypatie.plots import Telescope\n\ntarget = (10.6847,41.2687) # az,alt of a point in the sky\nparis = (2.2945, 48.8584)  # location of observer\n\n# get image with 3 degrees field of view\ntel = Telescope(target_loc=target, obs_loc=paris, fov=3)\ntel.show()\n```\n\n## Explore proper motion\n\nLet's create a chart showing the proper motion of stars near the Sgr A* (Milky Way's central supermassive black hole). The coordinates of the black hole are given and shown with the red '+' in the chart.\n\n```python\nfrom hypatie.plots import explore_pm\nimport matplotlib.pyplot as plt\n\nra = 266.41681662499997\ndec = -29.00782497222222\n\ndf, fig, ax = explore_pm(ra, dec, r=0.001, otype='star')\nplt.show()\n```\n\n![alt text](https://raw.githubusercontent.com/behrouzz/astronomy/main/images/sgr_A_pm.png)\n\nSee more examples at [astrodatascience.net](https://astrodatascience.net/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehrouzz%2Fhypatie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbehrouzz%2Fhypatie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehrouzz%2Fhypatie/lists"}