Skip to main content

A tool for computing photometry from spectra

Project description

https://img.shields.io/pypi/v/pyphot.svg https://zenodo.org/badge/70060728.svg https://static.pepy.tech/badge/pyphot https://static.pepy.tech/badge/pyphot/month

This is a set of tools to compute synthetic photometry in a simple way, ideal to integrate in larger projects.

full documentation at: http://mfouesneau.github.io/pyphot/

The inputs are photonic or energetic response functions for the desired photometric bands and stellar spectra. The modules are flexible to handle units in the wavelength definition through a simplified version of pint (link) and astropy.units

Filters are represented individually by a Filter object. Collections of filters are handled with a Library. We provide an internal library that contains a signitificant amount of common filters.

Each filter is minimally defined by a wavelength and throughput. Many properties such as central of pivot wavelength are computed internally. When units are provided for the wavelength, zero points in multiple units are also accessible (AB, Vega magnitude, Jy, erg/s/cm2/AA). The default detector type is assumed to be photonic, but energetic detectors are also handled for the computations.

https://mybinder.org/badge.svg https://img.shields.io/badge/render%20on-nbviewer-orange.svg

What’s new?

  • [June 26, 2024] Dropping support for Python <= 3.8 (due to HDF5 modules). Minor updates for Scipy 1.14.0 and Numpy 2.0

  • [November 22, 2021] new filters, SVO interface, automated tests and documentation.

  • [November 6, 2019] astropy version available in beta (from pyphot import astropy as pyphot)

  • [April 29, 2019] sandbox contains fully unit aware passbands and lick indices libraries

  • [April 15, 2019] merged UncertainFilter to main, sandbox contains passbands accounting for spectrum units

  • [March 4, 2019] added flux calculations in photon/s/cm2

  • [March 4, 2019] added many properties per filter (lphot, lmin, lmax)

  • [June 12, 2018] adding Sun reference spectra (see :class:Sun)

  • [Apr. 26, 2018] includes Gaia nominal, DR2 and revised DR2 passbands

Installation

Before installation, make sure you have HDF5 version 1.8.4 or above (this is required for pytables, see details at: https://github.com/PyTables/PyTables).

For OSX:

brew install hdf5

For Debian-based distributions:

sudo apt-get install libhdf5-serial-dev
  • Installation from PyPI

pip install pyphot
  • Manual installation

download the repository and run the setup

python setup.py install

Contributors

Author:

Morgan Fouesneau

Direct contributions to the code base:

  • Tim Morton (@timothydmorton)

  • Ariane Lancon (@lancon)

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

pyphot-1.4.7.tar.gz (15.0 MB view details)

Uploaded Source

Built Distribution

pyphot-1.4.7-py3-none-any.whl (15.1 MB view details)

Uploaded Python 3

File details

Details for the file pyphot-1.4.7.tar.gz.

File metadata

  • Download URL: pyphot-1.4.7.tar.gz
  • Upload date:
  • Size: 15.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for pyphot-1.4.7.tar.gz
Algorithm Hash digest
SHA256 001ebeb7741e81bf864b0240ecf32eed9c613e79ab06d2274042d7669f754df6
MD5 08501e5d1b09b84e97ca36013e38bd31
BLAKE2b-256 d682844408cac5b34589baac57e4f20147db15a454c419869f93fd096bc694d0

See more details on using hashes here.

File details

Details for the file pyphot-1.4.7-py3-none-any.whl.

File metadata

  • Download URL: pyphot-1.4.7-py3-none-any.whl
  • Upload date:
  • Size: 15.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for pyphot-1.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 342d92967736d9a434a3b11b1f88811133dc0b0b08a8ea7525f33bc9cd75b5ce
MD5 5174a172638d6154cc43687460dc87fe
BLAKE2b-256 3a35ce0cd8cded5b771821ae58d1d2b72f3f1511d61282cb28d3c35d1d51f85e

See more details on using hashes here.

Supported by

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