Skip to main content

An astronomer's calculator used to perform common calculations, conversions and measurements.

Project description

astrocalc

An astronomer’s calculator used to perform common calculations, conversions and measurements..

Usage

astrocalc [-c] coordflip <ra> <dec>
astrocalc sep <ra1> <dec1> <ra2> <dec2>
astrocalc timeflip <datetime>
astrocalc trans <ra> <dec> <north> <east>
astrocalc now mjd
astrocalc dist (-z | -m) <distVal> [--hc=hVal --wm=OmegaMatter --wv=OmegaVacuum]


COMMANDS:
========
    coordflip             flip coordinates between decimal degrees and sexegesimal and vice-versa
    sep                   calculate the separation between two locations in the sky.
    timeflip              flip time between UT and MJD.
    trans                 translate a location across the sky (north and east in arcsec)
    now                   report current time in various formats
    dist                  convert distance between mpc to z

VARIABLES:
==========
    ra, ra1, ra2          right-ascension in deciaml degrees or sexegesimal format
    dec, dec1, dec2       declination in deciaml degrees or sexegesimal format
    datetime              modified julian date (mjd) or universal time (UT). UT can be formated 20150415113334.343 or "20150415 11:33:34.343" (spaces require quotes)
    north, east           vector components in arcsec
    distVal               a distance value in Mpc (-mpc) or redshift (-z)
    hVal                  hubble constant value. Default=70 km/s/Mpc
    OmegaMatter           Omega Matter. Default=0.3
    OmegaVacuum           Omega Vacuum. Default=0.7

-h, --help            show this help message
-m, --mpc             distance in mpc
-z, --redshift        redshift distance
-c, --cartesian       convert to cartesian coordinates

Documentation

Documentation for astrocalc is hosted by Read the Docs (last stable version and latest version).

Installation

The easiest way to install astrocalc us to use pip:

pip install astrocalc

Or you can clone the github repo and install from a local version of the code:

git clone git@github.com:thespacedoctor/astrocalc.git
cd astrocalc
python setup.py install

To upgrade to the latest version of astrocalc use the command:

pip install astrocalc --upgrade

Development

If you want to tinker with the code, then install in development mode. This means you can modify the code from your cloned repo:

git clone git@github.com:thespacedoctor/astrocalc.git
cd astrocalc
python setup.py develop

Pull requests are welcomed!

Issues

Please report any issues here.

License

Copyright (c) 2016 David Young

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astrocalc-0.2.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astrocalc-0.2-py2.7.egg (70.0 kB view details)

Uploaded Egg

File details

Details for the file astrocalc-0.2.tar.gz.

File metadata

  • Download URL: astrocalc-0.2.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for astrocalc-0.2.tar.gz
Algorithm Hash digest
SHA256 e15f61430c1f882856c5e9c5972cbf1c298187592def486b572097003acb8877
MD5 5f0e6d4f04d2f0acb552c79838acae53
BLAKE2b-256 0b8c66ca4542944d646e4c1e508b6b18d30316f53cffe9f52fa81e21d91efc8e

See more details on using hashes here.

File details

Details for the file astrocalc-0.2-py2.7.egg.

File metadata

  • Download URL: astrocalc-0.2-py2.7.egg
  • Upload date:
  • Size: 70.0 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/36.4.0 requests-toolbelt/0.8.0 tqdm/4.14.0 CPython/2.7.13

File hashes

Hashes for astrocalc-0.2-py2.7.egg
Algorithm Hash digest
SHA256 38b84ac2c9da0ae9a600eeba5093a67983249351c594f9eb7bd35d5b0010e0f3
MD5 8ae73c6b67d8179e31a6aa0cea680b49
BLAKE2b-256 5181d6da6b817fa0c83716fbf7204af4e9edd21fbf71689825a417f0151cd240

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page