OrbitPy


NameOrbitPy JSON
Version 0.0.0 PyPI version JSON
download
home_pagehttps://github.com/PyndyalaCoder/OrbitPy
SummaryA Python library that deals with different fields of science.
upload_time2023-03-20 02:35:03
maintainer
docs_urlNone
authorSiddhu Pendyala
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OrbitPy
OrbitPy is an opensource science library developed for python developers that deals with <b>classical mechanics, celestial mechanics, physics, thermodynamics, and astronomy</b>

## OrbitPy Terms
This is an open-source software that is constantly evolving as it is upgraded by its creators as well as the community. If you have questions about it, please email lunastrohelp@gmail.com. Please view the liscense provided or visit https://opensource.org/license/mit/ for legal permissions.

## Usage Examples

OrbitPy is a versatile and <b>developing</b> library. Here is a simple usage case:

```python
  from OrbitPy import *
  latitude = 47.6 # Bellevue WA latitude
  sunData = getSunData(latitude)
  print(f"The sun's current declination is: {sunData.dec}")
```

This <b>code (On Sun Mar 19 2:08 PM)</b> would have outputted `-1.3112534178591464`

<b>A more advanced usage case:</b>

```python
  from OrbitPy import *
  latitude = 47.6
  longitude = -122.2
  siderealtime = localSiderealTime(longitude)
  now = datetime.datetime.now()
  if siderealtime.hour == now.hour and siderealtime.minute == now.minute and siderealtime.second == now.second:
    print("Sidereal time matches with regular time")
  else:
    print("Sidereal time does not match with regular time")
```

## Methods & Tools

OrbitPy has an <b>extensive</b> array of methods that are updated constantly. The current methods include:

<h3>Astronomy</h3>

- `getMoonPosition(lat, long)` that takes in two parameters that represent latitude and longitude of the user's location respectively. The function then returns an object that contains attributes 'azimuth', 'altitude', 'distance', 'parallacticAngle', and 'phase'.
- `astronomicalRefraction(alt)` that takes in one parameter that represents altitude. It returns refraction
- `sunRA()` that returns the right ascension of the sun.
- `solarHourAngle()` that returns the current solar hour angle
- `azimuth(lat, long)` that returns the azimuth of the sun for the given <b>latitude and longitude</b>
- `altitude(lat, long)` that returns the altitude of the sun for the given <b>latitude and longitude</b>
- `localSiderealTime(long)` that returns the local sidereal time of the given <b>longitude</b>
- `getSunData(lat)` that returns an object that contains attributes "dec" for declination, "hour_angle" for hr angle, "ra" for right ascension, "long_omega" for the longitude of the sun's ascending node, "true_solar_anomaly" for the true solar anomaly, "true_solar_longitude" for the true solar longitude, "geo_anomaly" for the geometric mean anomaly,  "geo_long" for the geometric mean longitude, "dist" for distance to the sun.
- `planetMeanAnomaly(planet)` that returns the mean anomaly of the planet based on an str input that contains the name of the planet
- `planetEquationOfCenter(planet)` that returns the equation of center of the planet based on an str input that contains the name of the planet
- `planetTrueAnomaly(planet)` that returns the planet's true anomaly
- `getLunarPhase(date)` that takes an optional parameter of date (if no date provided, current date is used) and calculates lunar phase
- `get_lunar_age(date)` that takes an optional parameter of date (if no date provided, current date is used) and calculates lunar age
- `get_lunar_age_percent(date)` that takes an optional parameter of date (if no date provided, current date is used) and calculates the percentage of the lunar age 


<h3>Time</h3>

- `localSiderealTime(long)` that returns the local sidereal time of the given <b>longitude</b>
- `daysSinceJ2000()` that returns the days since J2000 epoch
- `juliandate(now)` that takes the parameter of `datetime.datetime.now()` and returns the julian date.
- `astroNorthernSeasonDates(year)` that takes the parameter of the current year and returns the season start dates for the N. Hemisphere
- `astroSouthernSeasonDates(year)` that takes the parameter of the current year and returns the season start dates for the S. Hemisphere

<h3>Thermodynamics</h3>

- `enthalpy(cp, m, delta_t)` : Calculates enthalpy of a substance. <br>
      - param cp: specific heat capacity of the substance <br>
      - param m: mass of the substance <br>
      - param delta_t: change in temperature of the substance <br>
      - return: enthalpy of the substance <br>

- `specificHeat(cp, m)`: Calculates specific heat of a substance. <br>
      - param cp: specific heat capacity of the substance <br>
      - param m: mass of the substance <br>
      - return: specific heat of the substance <br>
      
- `entropy(q, t)`: Calculates entropy of a substance. <br>
      - param q: heat added or removed from the substance <br>
      - param t: temperature of the substance <br>
      - return: entropy of the substance <br>
      
- `internalEnergy(cv, m, delta_t)`: Calculates internal energy of a substance. <br>
      - param cv: specific heat capacity at constant volume of the substance <br>
      - param m: mass of the substance <br>
      - param delta_t: change in temperature of the substance <br>
      - return: internal energy of the substance <br>

- `gibbs_free_energy(h, t, s)`: Calculates Gibbs free energy of a substance. <br>
      - param h: enthalpy of the substance <br>
      - param t: temperature of the substance <br>
      - param s: entropy of the substance <br>
      - return: Gibbs free energy of the substance <br>

- `ideal_gas_law(p, v, n, r=8.314)`: Calculates the ideal gas law for a gas. <br>
      - param p: pressure of the gas <br>
      - param v: volume of the gas <br>
      - param n: number of moles of the gas <br>
      - param r: universal gas constant (default is 8.314 J/(mol*K)) <br>
      - return: temperature of the gas <br>

- `peng_robinson_eos(p, v, n, tc, pc, omega)`: Calculates the Peng-Robinson equation of state for a gas. <br>
      - param p: pressure of the gas <br>
      - param v: volume of the gas <br>
      - param n: number of moles of the gas <br>
      - param tc: critical temperature of the gas <br>
      - param pc: critical pressure of the gas <br>
      - param omega: acentric factor of the gas <br>
      - return: temperature of the gas <br>
      
      
- `heat_flux(delta_T, k, thickness)`: Calculates the heat flux through a material.
      - param delta_T: temperature difference across the material (in K)
      - param k: thermal conductivity of the material (in W/m.K)
      - param thickness: thickness of the material (in m)
      - return: heat flux through the material (in W/m^2)

- `thermal_conductivity(diffusivity, specific_heat, density)`: Calculates the thermal conductivity of a substance.
      - param diffusivity: thermal diffusivity of the material (in m^2/s)
      - param specific_heat: specific heat capacity of the material (in J/kg K)
      - param density: density of the material (in kg/m^3)
      - return: thermal conductivity of the material (in W/m K)

- `calculate_diffusivity(k, rho, cp)`: Calculates the diffusivity of a material in m^2/s given its thermal conductivity (k),
    density (rho), and specific heat capacity (cp).


<h3>Physics</h3
  
  Initialize the <b>`star`</b> class
  
  ```python
      
    from OrbitPy import *
    star = Star(mass, age, distance)
  ```
  
  <b>Setup and get</b> information:
  
  ```python
      calculate_luminosity() # setup the luminosity
      calculate_surface_temperature() # setup the surface temperature
      calculate_radius() # setup the radius
      calculate_core_temperature() # setup the core temp
      calculate_apparent_brightness() # setup the apparent brightness
      calculate_absolute_brightness() # setup the absolute brightness
  ```
  
  <b>After</b> setting the information, you can get the attribute of the object. <br>
  You can get the <b>attribute</b> by calling 'name'.insert_attribute_name_here


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PyndyalaCoder/OrbitPy",
    "name": "OrbitPy",
    "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/9f/16/e4d24c997dc87b788cd086ef672a0bba840c303d23a3bc5ebb9fcc15c296/OrbitPy-0.0.0.tar.gz",
    "platform": null,
    "description": "# OrbitPy\nOrbitPy is an opensource science library developed for python developers that deals with <b>classical mechanics, celestial mechanics, physics, thermodynamics, and astronomy</b>\n\n## OrbitPy Terms\nThis is an open-source software that is constantly evolving as it is upgraded by its creators as well as the community. If you have questions about it, please email lunastrohelp@gmail.com. Please view the liscense provided or visit https://opensource.org/license/mit/ for legal permissions.\n\n## Usage Examples\n\nOrbitPy is a versatile and <b>developing</b> library. Here is a simple usage case:\n\n```python\n  from OrbitPy import *\n  latitude = 47.6 # Bellevue WA latitude\n  sunData = getSunData(latitude)\n  print(f\"The sun's current declination is: {sunData.dec}\")\n```\n\nThis <b>code (On Sun Mar 19 2:08 PM)</b> would have outputted `-1.3112534178591464`\n\n<b>A more advanced usage case:</b>\n\n```python\n  from OrbitPy import *\n  latitude = 47.6\n  longitude = -122.2\n  siderealtime = localSiderealTime(longitude)\n  now = datetime.datetime.now()\n  if siderealtime.hour == now.hour and siderealtime.minute == now.minute and siderealtime.second == now.second:\n    print(\"Sidereal time matches with regular time\")\n  else:\n    print(\"Sidereal time does not match with regular time\")\n```\n\n## Methods & Tools\n\nOrbitPy has an <b>extensive</b> array of methods that are updated constantly. The current methods include:\n\n<h3>Astronomy</h3>\n\n- `getMoonPosition(lat, long)` that takes in two parameters that represent latitude and longitude of the user's location respectively. The function then returns an object that contains attributes 'azimuth', 'altitude', 'distance', 'parallacticAngle', and 'phase'.\n- `astronomicalRefraction(alt)` that takes in one parameter that represents altitude. It returns refraction\n- `sunRA()` that returns the right ascension of the sun.\n- `solarHourAngle()` that returns the current solar hour angle\n- `azimuth(lat, long)` that returns the azimuth of the sun for the given <b>latitude and longitude</b>\n- `altitude(lat, long)` that returns the altitude of the sun for the given <b>latitude and longitude</b>\n- `localSiderealTime(long)` that returns the local sidereal time of the given <b>longitude</b>\n- `getSunData(lat)` that returns an object that contains attributes \"dec\" for declination, \"hour_angle\" for hr angle, \"ra\" for right ascension, \"long_omega\" for the longitude of the sun's ascending node, \"true_solar_anomaly\" for the true solar anomaly, \"true_solar_longitude\" for the true solar longitude, \"geo_anomaly\" for the geometric mean anomaly,  \"geo_long\" for the geometric mean longitude, \"dist\" for distance to the sun.\n- `planetMeanAnomaly(planet)` that returns the mean anomaly of the planet based on an str input that contains the name of the planet\n- `planetEquationOfCenter(planet)` that returns the equation of center of the planet based on an str input that contains the name of the planet\n- `planetTrueAnomaly(planet)` that returns the planet's true anomaly\n- `getLunarPhase(date)` that takes an optional parameter of date (if no date provided, current date is used) and calculates lunar phase\n- `get_lunar_age(date)` that takes an optional parameter of date (if no date provided, current date is used) and calculates lunar age\n- `get_lunar_age_percent(date)` that takes an optional parameter of date (if no date provided, current date is used) and calculates the percentage of the lunar age \n\n\n<h3>Time</h3>\n\n- `localSiderealTime(long)` that returns the local sidereal time of the given <b>longitude</b>\n- `daysSinceJ2000()` that returns the days since J2000 epoch\n- `juliandate(now)` that takes the parameter of `datetime.datetime.now()` and returns the julian date.\n- `astroNorthernSeasonDates(year)` that takes the parameter of the current year and returns the season start dates for the N. Hemisphere\n- `astroSouthernSeasonDates(year)` that takes the parameter of the current year and returns the season start dates for the S. Hemisphere\n\n<h3>Thermodynamics</h3>\n\n- `enthalpy(cp, m, delta_t)` : Calculates enthalpy of a substance. <br>\n      - param cp: specific heat capacity of the substance <br>\n      - param m: mass of the substance <br>\n      - param delta_t: change in temperature of the substance <br>\n      - return: enthalpy of the substance <br>\n\n- `specificHeat(cp, m)`: Calculates specific heat of a substance. <br>\n      - param cp: specific heat capacity of the substance <br>\n      - param m: mass of the substance <br>\n      - return: specific heat of the substance <br>\n      \n- `entropy(q, t)`: Calculates entropy of a substance. <br>\n      - param q: heat added or removed from the substance <br>\n      - param t: temperature of the substance <br>\n      - return: entropy of the substance <br>\n      \n- `internalEnergy(cv, m, delta_t)`: Calculates internal energy of a substance. <br>\n      - param cv: specific heat capacity at constant volume of the substance <br>\n      - param m: mass of the substance <br>\n      - param delta_t: change in temperature of the substance <br>\n      - return: internal energy of the substance <br>\n\n- `gibbs_free_energy(h, t, s)`: Calculates Gibbs free energy of a substance. <br>\n      - param h: enthalpy of the substance <br>\n      - param t: temperature of the substance <br>\n      - param s: entropy of the substance <br>\n      - return: Gibbs free energy of the substance <br>\n\n- `ideal_gas_law(p, v, n, r=8.314)`: Calculates the ideal gas law for a gas. <br>\n      - param p: pressure of the gas <br>\n      - param v: volume of the gas <br>\n      - param n: number of moles of the gas <br>\n      - param r: universal gas constant (default is 8.314 J/(mol*K)) <br>\n      - return: temperature of the gas <br>\n\n- `peng_robinson_eos(p, v, n, tc, pc, omega)`: Calculates the Peng-Robinson equation of state for a gas. <br>\n      - param p: pressure of the gas <br>\n      - param v: volume of the gas <br>\n      - param n: number of moles of the gas <br>\n      - param tc: critical temperature of the gas <br>\n      - param pc: critical pressure of the gas <br>\n      - param omega: acentric factor of the gas <br>\n      - return: temperature of the gas <br>\n      \n      \n- `heat_flux(delta_T, k, thickness)`: Calculates the heat flux through a material.\n      - param delta_T: temperature difference across the material (in K)\n      - param k: thermal conductivity of the material (in W/m.K)\n      - param thickness: thickness of the material (in m)\n      - return: heat flux through the material (in W/m^2)\n\n- `thermal_conductivity(diffusivity, specific_heat, density)`: Calculates the thermal conductivity of a substance.\n      - param diffusivity: thermal diffusivity of the material (in m^2/s)\n      - param specific_heat: specific heat capacity of the material (in J/kg K)\n      - param density: density of the material (in kg/m^3)\n      - return: thermal conductivity of the material (in W/m K)\n\n- `calculate_diffusivity(k, rho, cp)`: Calculates the diffusivity of a material in m^2/s given its thermal conductivity (k),\n    density (rho), and specific heat capacity (cp).\n\n\n<h3>Physics</h3\n  \n  Initialize the <b>`star`</b> class\n  \n  ```python\n      \n    from OrbitPy import *\n    star = Star(mass, age, distance)\n  ```\n  \n  <b>Setup and get</b> information:\n  \n  ```python\n      calculate_luminosity() # setup the luminosity\n      calculate_surface_temperature() # setup the surface temperature\n      calculate_radius() # setup the radius\n      calculate_core_temperature() # setup the core temp\n      calculate_apparent_brightness() # setup the apparent brightness\n      calculate_absolute_brightness() # setup the absolute brightness\n  ```\n  \n  <b>After</b> setting the information, you can get the attribute of the object. <br>\n  You can get the <b>attribute</b> by calling 'name'.insert_attribute_name_here\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python library that deals with different fields of science.",
    "version": "0.0.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9647b0a4154e154a55e1b0d10218a5bb42aec66f865dfd10758144cbd5f79853",
                "md5": "06cafa4829a8ac3f0a5b0c7320ab5b1b",
                "sha256": "6b0c6c5c45cf7d103444a0740c46135dfaf4cb36447d748b3c8fc84faf06d3e0"
            },
            "downloads": -1,
            "filename": "OrbitPy-0.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "06cafa4829a8ac3f0a5b0c7320ab5b1b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12013,
            "upload_time": "2023-03-20T02:35:01",
            "upload_time_iso_8601": "2023-03-20T02:35:01.705451Z",
            "url": "https://files.pythonhosted.org/packages/96/47/b0a4154e154a55e1b0d10218a5bb42aec66f865dfd10758144cbd5f79853/OrbitPy-0.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f16e4d24c997dc87b788cd086ef672a0bba840c303d23a3bc5ebb9fcc15c296",
                "md5": "526c9ff57d69d6fd818ebb3619e808c9",
                "sha256": "9f7cef7ad1044497b042da159f1f1b3f343a2eeb7ae6ccc1487a0c700034877f"
            },
            "downloads": -1,
            "filename": "OrbitPy-0.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "526c9ff57d69d6fd818ebb3619e808c9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11265,
            "upload_time": "2023-03-20T02:35:03",
            "upload_time_iso_8601": "2023-03-20T02:35:03.588576Z",
            "url": "https://files.pythonhosted.org/packages/9f/16/e4d24c997dc87b788cd086ef672a0bba840c303d23a3bc5ebb9fcc15c296/OrbitPy-0.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-20 02:35:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "PyndyalaCoder",
    "github_project": "OrbitPy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "orbitpy"
}
        
Elapsed time: 0.09672s