Skip to main content

No project description provided

Project description

AstronomyCalc

License DOI GitHub Repository CI Status PyPI version Read the Docs

This package introduces students to basic astronomical calculations and data analysis methods. More detailed documentation is available on the ReadTheDocs page. Additional Jupyter notebooks, designed to help learners explore concepts by adjusting parameters and observing their effects, will be regularly added to the notebooks folder.

Package details

The package provides tools for calculating and solving the following quantities and equations.

  • Friedmann equation
  • Cosmological distances
    • Comoving distance
    • Proper distance
    • Light-travel distance
    • Luminosity distance
    • Angular diameter distance
  • Age of the universe
  • Cosmological parameter inference
  • Galaxy rotation curves

INSTALLATION

One can install a stable version of this package using pip by running the following command::

pip install AstronomyCalc

This package is being actively under-development, which involves addition of new modules and bug fixes. In order to use the latest version, one can clone this package.

To install the package from source, one should clone this package running the following::

git clone https://github.com/sambit-giri/AstronomyCalc.git

To install the package in the standard location, run the following in the root directory::

python setup.py install

In order to install it in a separate directory::

python setup.py install --home=directory

One can also install the latest version using pip by running the following command::

pip install git+https://github.com/sambit-giri/AstronomyCalc.git

Important Notes

  • Python Version: This package requires Python version 3.8 or higher.
  • Virtual Environment: Using a Python virtual environment is recommended to prevent conflicts with system software. You can create one using Anaconda or venv.
  • The dependencies should be installed automatically during the installation process. The list of required packages can be found in the requirements.txt file present in the root directory.

Tests

For testing, one can use pytest. To run all the test script, run the following::

python -m pytest tests

Jupyter Notebook Usage

The Jupyter notebooks provided in the notebooks folder can be used in the following ways:

Run Online

You can use the notebooks directly on platforms like myBinder or Google Colab, which are set up for each tutorial.

Run Locally

To run the notebooks locally:

  1. Open a terminal in the folder containing the notebooks.
  2. Run the following command:
    jupyter notebook
    

This will launch the notebooks in your web browser.

If you are using Anaconda environments, you need to install the nb_conda package. It can be installed with pip:

pip install nb_conda

For a detailed tutorial on Jupyter Notebooks, refer to this guide.

CONTRIBUTING

If you find any bugs or unexpected behavior in the code, please feel free to open a Github issue. The issue page is also good if you seek help or have suggestions for us. For more details, please see here.

Licensing

This project uses dual licensing:

  • Code: Licensed under MIT License
  • Non-code materials (papers, figures, documentation): Licensed under CC-BY 4.0

Please ensure proper attribution when reusing any materials.

Citation

If you use AstronomyCalc in your research or teaching, please cite:

@article{Giri2025,
  author = {Sambit K. Giri},
  title = {AstronomyCalc: A python toolkit for teaching Astronomical Calculations and Data Analysis methods},
  journal = {Journal of Open Source Education},
  volume = {8},
  issue = {87},
  pages = {261},
  year = {2025},
  doi = {10.21105/jose.00261},
  url = {https://jose.theoj.org/papers/10.21105/jose.00261}
}

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

astronomycalc-1.1.1.tar.gz (10.4 MB view details)

Uploaded Source

Built Distribution

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

AstronomyCalc-1.1.1-py3-none-any.whl (65.1 MB view details)

Uploaded Python 3

File details

Details for the file astronomycalc-1.1.1.tar.gz.

File metadata

  • Download URL: astronomycalc-1.1.1.tar.gz
  • Upload date:
  • Size: 10.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for astronomycalc-1.1.1.tar.gz
Algorithm Hash digest
SHA256 e0eb2370e7402ac176bf9a0f20d31d7e85f0bbebd9c4c50b6d879aadb9f81954
MD5 2eefdc88ad4de7f80d688e9f9b5a935c
BLAKE2b-256 f10da4501c636a13fc6236faa4d05cf6f4396669416f447f06583b1f91a83032

See more details on using hashes here.

File details

Details for the file AstronomyCalc-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: AstronomyCalc-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 65.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for AstronomyCalc-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18453a1ff35a03710f01f88e5555039679d5d770c02edab548b5afbf9c7b1d20
MD5 e46907c1d5321e4946f4b8e20e5a1453
BLAKE2b-256 ae37b4c740e73d495d2e7c1308b74404900adffc3db3fea6908b33778eeccf02

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