# astronomica
<img src='astronomica.png'></img>
<h6>logo created with kittl.com</h6>
[![ForTheBadge built-with-love](https://forthebadge.com//images/badges/built-with-love.svg)](https://github.com/PyndyalaCoder/)
## Introduction and Purpose
The purpose of astronomica is to provide a set of tools for analyzing, generating, searching and visualizing astronomical data. This library aims to make it easy for astronomers, researchers, and students to explore and understand the universe using Python. By providing a comprehensive set of tools and a user-friendly interface, this library aims to empower astronomers and researchers to gain new insights into the universe and advance our understanding of the cosmos.
### Note of Usage:
<b>Astronomica is 100% free</b>!! It is also <b>driven by the <i>community</i></b>, so we welcome tips, bug fixes, and more methods added by users and the general python & astronomy community. You can also join our reddit community at https://www.reddit.com/r/pythonlibraries/
## Example usage:
For example, use the following piece of information:
- Heliocentric coordinates are coordinates that are measured relative to the center of the Sun, which is the primary source of gravitational attraction in the Solar System. Astronomers need heliocentric coordinates of Mars to study the planet's motion relative to the Sun, as well as to understand the dynamics of the Solar System.
The Helicocentric coordinates of any planet can be computed easily with astronomica -
```python
from astronomica import * # import all the tools offered by astronomica
xmars, ymars, zmars = planet_heliocentric_coordinates('mars') # get the coordinates of mars right now
print(f"The Heliocentric Coordinates of Mars right now are: ({xmars}, {ymars}, {zmars}).")
```
Here is another usage example:
- Astronomers need to know when astronomical night is so they can see the stars the best:
```python
# Import datetime module
import datetime
from astronomica import *
def get_astronomical_night():
# Get the local sunset time as a datetime object
sun = Sun(47.6, -122.2)
sunset_time = sun.get_local_sunset_time(datetime.datetime.now())
print(f"The local sunset time is {sunset_time}")
# Calculate duration of the day in hours and minutes
day_duration = datetime.timedelta(hours=24) - datetime.timedelta(hours=sunset_time.hour, minutes=sunset_time.minute)
day_duration_hours, day_duration_minutes = divmod(day_duration.seconds // 60, 60)
# Calculate the duration of astronomical twilight as a timedelta object
twilight_duration = datetime.timedelta(minutes=day_duration.total_seconds() * 0.2666 / 60)
# Calculate the duration of astronomical night as a timedelta object
night_duration = day_duration - twilight_duration
# Calculate the time of astronomical night as a datetime object
night_time = sunset_time + night_duration
# Format the time of astronomical night as a string in the format "HH:MM"
night_time_str = night_time.strftime("%H:%M")
print(f"The time of astronomical night is {night_time_str}")
get_astronomical_night()
```
## Utilities:
astronomica provides a <b>wide</b> range of functions and tools that extend not only into astronomy, but physics and mathematics as well. Here are some of the things astronomica offers:
- ## Mathematics:
- astronomica provides a wide range of trigonometry functions such as sine, cosine, tangent, arcsine, arccosine, arctangent, and more. It can also calculate a nth root of a number or raise a number to the nth power.
- ## Visualization:
- astronomica provides visualization tools for a growing amount of astronomical data. As of Wednesday April 12th, Astronomica provides visualization for the mean anomaly of all nine planets, and more tools for plotting your own lists.
- ## Time:
- astronomica provides two accurate functions for getting the current date and time as an str. They can be used in advanced calculations, as they are accurate to the second. Astronomica also has functions for getting the current julian date, local sidereal time, and conversions between gregorian and julian calendars.
- ## Astronomy:
- astronomica provides a strong set of methods developed to make astronomy observations easier. It includes a host of general sun calculations, sunrise and set times, heliocentric coordinates (see the example), geocentric coordinates, geocentric latitude and longitude, star calculations (including the ability to map star names to their type), scraping astronomical databases for equatorial coordinates of stars, lunar phase calculation, lunar age and percent of age calculation, and finally, a method for getting the definition of a hard astronomy word.
- ## Physics:
- astronomica currently has one function to get the gravitational force experienced by the earth from another object given its distance in astronomical units (the distance from the sun to earth is around 1 AU), and mass in kilograms.
Raw data
{
"_id": null,
"home_page": "https://github.com/PyndyalaCoder/astronomica",
"name": "astronomica",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Siddhu Pendyala",
"author_email": "elcientifico.pendyala@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7e/1f/f2cd7b957af545990b9521dbd80823c6d0707c6fe13b50314bfc321f2bc4/astronomica-0.0.9.tar.gz",
"platform": null,
"description": "# astronomica\n\n<img src='astronomica.png'></img>\n<h6>logo created with kittl.com</h6>\n\n[![ForTheBadge built-with-love](https://forthebadge.com//images/badges/built-with-love.svg)](https://github.com/PyndyalaCoder/)\n## Introduction and Purpose\nThe purpose of astronomica is to provide a set of tools for analyzing, generating, searching and visualizing astronomical data. This library aims to make it easy for astronomers, researchers, and students to explore and understand the universe using Python. By providing a comprehensive set of tools and a user-friendly interface, this library aims to empower astronomers and researchers to gain new insights into the universe and advance our understanding of the cosmos.\n\n### Note of Usage:\n<b>Astronomica is 100% free</b>!! It is also <b>driven by the <i>community</i></b>, so we welcome tips, bug fixes, and more methods added by users and the general python & astronomy community. You can also join our reddit community at https://www.reddit.com/r/pythonlibraries/ \n\n\n## Example usage:\n\nFor example, use the following piece of information:\n- Heliocentric coordinates are coordinates that are measured relative to the center of the Sun, which is the primary source of gravitational attraction in the Solar System. Astronomers need heliocentric coordinates of Mars to study the planet's motion relative to the Sun, as well as to understand the dynamics of the Solar System.\n\nThe Helicocentric coordinates of any planet can be computed easily with astronomica - \n\n```python\nfrom astronomica import * # import all the tools offered by astronomica\nxmars, ymars, zmars = planet_heliocentric_coordinates('mars') # get the coordinates of mars right now\nprint(f\"The Heliocentric Coordinates of Mars right now are: ({xmars}, {ymars}, {zmars}).\")\n```\n\nHere is another usage example: \n\n- Astronomers need to know when astronomical night is so they can see the stars the best:\n\n```python\n# Import datetime module\nimport datetime\nfrom astronomica import *\n\ndef get_astronomical_night():\n # Get the local sunset time as a datetime object\n sun = Sun(47.6, -122.2)\n sunset_time = sun.get_local_sunset_time(datetime.datetime.now())\n print(f\"The local sunset time is {sunset_time}\")\n\n # Calculate duration of the day in hours and minutes\n day_duration = datetime.timedelta(hours=24) - datetime.timedelta(hours=sunset_time.hour, minutes=sunset_time.minute)\n day_duration_hours, day_duration_minutes = divmod(day_duration.seconds // 60, 60)\n\n # Calculate the duration of astronomical twilight as a timedelta object\n twilight_duration = datetime.timedelta(minutes=day_duration.total_seconds() * 0.2666 / 60)\n\n # Calculate the duration of astronomical night as a timedelta object\n night_duration = day_duration - twilight_duration\n\n # Calculate the time of astronomical night as a datetime object\n night_time = sunset_time + night_duration\n\n # Format the time of astronomical night as a string in the format \"HH:MM\"\n night_time_str = night_time.strftime(\"%H:%M\")\n\n print(f\"The time of astronomical night is {night_time_str}\")\n\nget_astronomical_night()\n```\n\n## Utilities: \nastronomica provides a <b>wide</b> range of functions and tools that extend not only into astronomy, but physics and mathematics as well. Here are some of the things astronomica offers:\n- ## Mathematics:\n - astronomica provides a wide range of trigonometry functions such as sine, cosine, tangent, arcsine, arccosine, arctangent, and more. It can also calculate a nth root of a number or raise a number to the nth power.\n- ## Visualization:\n - astronomica provides visualization tools for a growing amount of astronomical data. As of Wednesday April 12th, Astronomica provides visualization for the mean anomaly of all nine planets, and more tools for plotting your own lists.\n- ## Time:\n - astronomica provides two accurate functions for getting the current date and time as an str. They can be used in advanced calculations, as they are accurate to the second. Astronomica also has functions for getting the current julian date, local sidereal time, and conversions between gregorian and julian calendars.\n- ## Astronomy:\n - astronomica provides a strong set of methods developed to make astronomy observations easier. It includes a host of general sun calculations, sunrise and set times, heliocentric coordinates (see the example), geocentric coordinates, geocentric latitude and longitude, star calculations (including the ability to map star names to their type), scraping astronomical databases for equatorial coordinates of stars, lunar phase calculation, lunar age and percent of age calculation, and finally, a method for getting the definition of a hard astronomy word.\n- ## Physics:\n - astronomica currently has one function to get the gravitational force experienced by the earth from another object given its distance in astronomical units (the distance from the sun to earth is around 1 AU), and mass in kilograms. \n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python library that deals with astronomy and mathematical calculations. It also helps with Julian Dates",
"version": "0.0.9",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d549247dd462928710b72418ada8b6984b83c4b476bc62f4fb67179f7fca9e3b",
"md5": "6ed124eda075f2f22005f0cc763ab359",
"sha256": "3a00c1c3cfa572a12d636587b659097cbc881ecd9c018779aad5d5ed221eb25e"
},
"downloads": -1,
"filename": "astronomica-0.0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6ed124eda075f2f22005f0cc763ab359",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 16753,
"upload_time": "2023-04-22T04:33:00",
"upload_time_iso_8601": "2023-04-22T04:33:00.740342Z",
"url": "https://files.pythonhosted.org/packages/d5/49/247dd462928710b72418ada8b6984b83c4b476bc62f4fb67179f7fca9e3b/astronomica-0.0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7e1ff2cd7b957af545990b9521dbd80823c6d0707c6fe13b50314bfc321f2bc4",
"md5": "27c703f763b93e0895b3053f7b3cb1e9",
"sha256": "e830e75224d4b6b3756fee53bf2911433b2f49cf86db8c459d0ea5bb30807546"
},
"downloads": -1,
"filename": "astronomica-0.0.9.tar.gz",
"has_sig": false,
"md5_digest": "27c703f763b93e0895b3053f7b3cb1e9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18120,
"upload_time": "2023-04-22T04:33:03",
"upload_time_iso_8601": "2023-04-22T04:33:03.231060Z",
"url": "https://files.pythonhosted.org/packages/7e/1f/f2cd7b957af545990b9521dbd80823c6d0707c6fe13b50314bfc321f2bc4/astronomica-0.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-22 04:33:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "PyndyalaCoder",
"github_project": "astronomica",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "astronomica"
}