[go: up one dir, main page]

Skip to content

๐–ฅ” PyPhotometry is a Python package based on a Fortran legacy package that allows you to compute photometric fluxes and magnitudes in various photometric systems. The package provides different magnitude systems

License

Notifications You must be signed in to change notification settings

neutrinomuon/PyPhotometry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PyPhotometry

Fully based on a Fortran legacy package to easily compute the photometric fluxes and magnitudes in different systems

email: antineutrinomuon@gmail.com, jean@astro.up.pt

github repository: PyPhotometry

last stable version: 0.0.9

ยฉ Copyright ยฎ

J.G. - Jean Gomes

DOI





Requirements

The following packages are required to run this project:

  • astropy>=5.0.4
  • matplotlib>=3.7.1
  • setuptools>=61.2.0
  • SQLAlchemy>=1.4.32

and pyphot may be used for comparison and tests:

  • pyphot>=1.4.4

You can install all the required packages by running the following command:

pip install -r requirements.txt

Additionally, you may optionally install pyphot for testing or comparison purposes.

Please note that pyphot is not a mandatory requirement for running this project and is only recommended if you intend to test or compare with it.

RESUME

PyPhotometry is a Python package that builds upon a collection of Fortran 2003+ routines originally developed between 2003 and 2004. These routines are the foundation of the package and can be traced back to that time period. The licensing details for the Fortran routines can be found in the LICENSE.txt file included with the package.

The main purpose of PyPhotometry is to enable the computation of photometric fluxes and magnitudes in various photometric systems. It offers support for multiple magnitude systems, including the VEGA standard, the VEGA system proposed by Bohlin and Gilland in 2004, the AB system, the TG standard system (Thuan & Gunn), the WFPC2 system, the FOCA system at 2000, and also provides an option without any calibration.

It's important to note that PyPhotometry does not include the Pyphot package developed by M. Fouesneau, but it can be used for comparison purposes.

However, it is not mandatory to install Pyphot in order to use PyPhotometry. The PyPhotometry package comes with its own set of accompanying routines that provide the necessary functionality.

Original Fortran 2003+ routines date back to 2003-2004. Read the LICENSE.txt file.

PyPhotometry is a Python package based on a Fortran legacy package that allows you to compute photometric fluxes and magnitudes in various photometric systems. The package provides different magnitude systems, such as VEGA standard, VEGA proposed by Bohlin and Gilland 2004, AB system, TG standard system (Thuan & Gunn), WFPC2 system, FOCA at 2000, and without any calibration.

Pyphot from M. Fouesneau is NOT part of the distribution, but used as a comparison: https://mfouesneau.github.io/pyphot/index.html#package-main-content. If you want to install for comparison then:

pip install pyphot

However, it is not necessary for the usage of this package. This package is meant for a comparison, but PyPhotometry legacy routines are more general. Accompanying there are several other routines.

Now, the package PyPhotometry is in agreement with PEP 8 guidelines:


--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)


Brief Tutorial

A brief tutorial can be found at PyPhotometry Example1.ipynb


INSTALLATION

You can easily install PyPhotometry by using pip - PyPI - The Python Package Index:

pip install PyPhotometry


or by using a generated conda repository https://anaconda.org/neutrinomuon/PyPhotometry:

conda install -c neutrinomuon pyphotometry


OBS.: Linux, OS-X and Windows pre-compilations available in conda.

You can also clone the repository and install by yourself in your machine:

git clone https://github.com/neutrinomuon/PyPhotometry
python setup.py install

METHOD & REFERENCES

Magnitude Systems

The following magnitude systems are supported by PyPhotometry:

  • VEGA standard: Based on the Bessel (2005), Cousins & Jones (1976), and Kitchin (2003) references.
  • VEGA proposed by Bohlin and Gilland 2004;
  • AB standard system: Based on Oke (1974) reference;
  • TG standard system (Thuan & Gunn): Based on Oke & Gunn (1983), Schild (1984), Schneider et al. (1983), Thuan & Gunn (1976), and Wade et al. (1979) references;
  • WFPC2 system: Based on the Stone (1996) reference;
  • FOCA at 2000 system;
  • Without any calibration.
Calibration Stars

PyPhotometry provides calibration stars used in the magnitude systems:

  • VEGA spectrum: Intrinsic Flux - [erg/s/cm2/A].
  • SUN spectrum: Intrinsic Flux - [erg/s/A].
  • F subdwarf: Used to calibrate the Thuan & Gunn system. Only used for backward compatibility.

For more details on the usage and options, please refer to the PyPhotometry GitHub repository.


STRUCTURE

#################################################
workspace
โ”œโ”€โ”€ setup.py
โ”œโ”€โ”€ data
โ”‚   โ”œโ”€โ”€ PLANCK_HFI.217GHz.txt
โ”‚   โ”œโ”€โ”€ PLANCK_LFI.030GHz.txt
โ”‚   โ”œโ”€โ”€ Spitzer_MIPS.160mu.txt
โ”‚   โ”œโ”€โ”€ SDSSu.txt
โ”‚   โ”œโ”€โ”€ SDSSr.txt
โ”‚   โ”œโ”€โ”€ Herschel_Pacs.green.txt
โ”‚   โ”œโ”€โ”€ Herschel_SPIRE.PMW.txt
โ”‚   โ”œโ”€โ”€ WISE1.txt
โ”‚   โ”œโ”€โ”€ ListFilters.txt
โ”‚   โ”œโ”€โ”€ Herschel_SPIRE.PLW.txt
โ”‚   โ”œโ”€โ”€ PLANCK_HFI.545GHz.txt
โ”‚   โ”œโ”€โ”€ Spitzer_MIPS.24mu.txt
โ”‚   โ”œโ”€โ”€ Herschel_SPIRE.PSW.txt
โ”‚   โ”œโ”€โ”€ Spitzer_IRAC.I4.txt
โ”‚   โ”œโ”€โ”€ PLANCK_LFI.070GHz.txt
โ”‚   โ”œโ”€โ”€ Spitzer_IRAC.I3.txt
โ”‚   โ”œโ”€โ”€ templates
โ”‚   โ”‚   โ”œโ”€โ”€ bc2003_hr_m62_chab_ssp_190.spec
โ”‚   โ”‚   โ”œโ”€โ”€ bc2003_hr_m62_salp_ssp_001.spec
โ”‚   โ”‚   โ”œโ”€โ”€ bc2003_hr_m62_chab_ssp_160.spec
โ”‚   โ”‚   โ””โ”€โ”€ bc2003_hr_m62_chab_ssp_001.spec
โ”‚   โ”œโ”€โ”€ SDSSz.txt
โ”‚   โ”œโ”€โ”€ IRAS.12mu.txt
โ”‚   โ”œโ”€โ”€ PLANCK_HFI.100GHz.txt
โ”‚   โ”œโ”€โ”€ Herschel_Pacs.red.txt
โ”‚   โ”œโ”€โ”€ PLANCK_LFI.044GHz.txt
โ”‚   โ”œโ”€โ”€ Herschel_SPIRE.PLW_ext.txt
โ”‚   โ”œโ”€โ”€ IRAS.100mu.txt
โ”‚   โ”œโ”€โ”€ Spitzer_MIPS.70mu.txt
โ”‚   โ”œโ”€โ”€ GalexFUV.txt
โ”‚   โ”œโ”€โ”€ WISE2.txt
โ”‚   โ”œโ”€โ”€ SDSSi.txt
โ”‚   โ”œโ”€โ”€ SDSSg.txt
โ”‚   โ”œโ”€โ”€ IRAS.25mu.txt
โ”‚   โ”œโ”€โ”€ Herschel_SPIRE.PSW_ext.txt
โ”‚   โ”œโ”€โ”€ Herschel_SPIRE.PMW_ext.txt
โ”‚   โ”œโ”€โ”€ PLANCK_HFI.353GHz.txt
โ”‚   โ”œโ”€โ”€ 2MASSKs.txt
โ”‚   โ”œโ”€โ”€ WISE4.txt
โ”‚   โ”œโ”€โ”€ Herschel_Pacs.blue.txt
โ”‚   โ”œโ”€โ”€ PLANCK_HFI.143GHz.txt
โ”‚   โ”œโ”€โ”€ calibration_stars
โ”‚   โ”‚   โ”œโ”€โ”€ bd17d4708_stisnic_001.fits
โ”‚   โ”‚   โ”œโ”€โ”€ Sun.dat
โ”‚   โ”‚   โ”œโ”€โ”€ Sun_LR.dat
โ”‚   โ”‚   โ”œโ”€โ”€ BD+17d4708.dat
โ”‚   โ”‚   โ”œโ”€โ”€ BD+17o4708.dat
โ”‚   โ”‚   โ”œโ”€โ”€ Vega.dat
โ”‚   โ”‚   โ”œโ”€โ”€ Filters_ReadMe.txt
โ”‚   โ”‚   โ”œโ”€โ”€ sun_reference_stis_001.fits
โ”‚   โ”‚   โ”œโ”€โ”€ VegaLR.dat
โ”‚   โ”‚   โ”œโ”€โ”€ kp00_6000.ascii
โ”‚   โ”‚   โ””โ”€โ”€ VegaLR_OLD.dat
โ”‚   โ”œโ”€โ”€ PLANCK_HFI.857GHz.txt
โ”‚   โ”œโ”€โ”€ README.md
โ”‚   โ”œโ”€โ”€ 2MASSH.txt
โ”‚   โ”œโ”€โ”€ IRAS.60mu.txt
โ”‚   โ”œโ”€โ”€ Spitzer_IRAC.I2.txt
โ”‚   โ”œโ”€โ”€ 2MASSJ.txt
โ”‚   โ”œโ”€โ”€ Spitzer_IRAC.I1.txt
โ”‚   โ”œโ”€โ”€ WISE3.txt
โ”‚   โ””โ”€โ”€ GalexNUV.txt
โ”œโ”€โ”€ LICENSE.txt
โ”œโ”€โ”€ Notes.txt
โ”œโ”€โ”€ README_setup.txt
โ”œโ”€โ”€ scripts
โ”‚   โ””โ”€โ”€ update_readme.py
โ”œโ”€โ”€ __pycache__
โ”‚   โ””โ”€โ”€ Filters.cpython-39.pyc
โ”œโ”€โ”€ tutorials
โ”‚   โ”œโ”€โ”€ PyPhotometry - Example 1.ipynb
โ”‚   โ”œโ”€โ”€ .ipynb_checkpoints
โ”‚   โ”‚   โ””โ”€โ”€ PyPhotometry - Example 1-checkpoint.ipynb
โ”‚   โ”œโ”€โ”€ .jupyter_ystore.db
โ”‚   โ””โ”€โ”€ PyPhotometry.png
โ”œโ”€โ”€ .git
โ”‚   โ”œโ”€โ”€ HEAD
โ”‚   โ”œโ”€โ”€ objects
โ”‚   โ”‚   โ”œโ”€โ”€ pack
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ pack-45351592350c6110dc6d5e83234328cfd06b823f.idx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ pack-45351592350c6110dc6d5e83234328cfd06b823f.pack
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ pack-45351592350c6110dc6d5e83234328cfd06b823f.rev
โ”‚   โ”‚   โ””โ”€โ”€ info
โ”‚   โ”œโ”€โ”€ config
โ”‚   โ”œโ”€โ”€ FETCH_HEAD
โ”‚   โ”œโ”€โ”€ info
โ”‚   โ”‚   โ””โ”€โ”€ exclude
โ”‚   โ”œโ”€โ”€ hooks
โ”‚   โ”‚   โ”œโ”€โ”€ push-to-checkout.sample
โ”‚   โ”‚   โ”œโ”€โ”€ prepare-commit-msg.sample
โ”‚   โ”‚   โ”œโ”€โ”€ pre-rebase.sample
โ”‚   โ”‚   โ”œโ”€โ”€ fsmonitor-watchman.sample
โ”‚   โ”‚   โ”œโ”€โ”€ post-update.sample
โ”‚   โ”‚   โ”œโ”€โ”€ pre-push.sample
โ”‚   โ”‚   โ”œโ”€โ”€ pre-commit.sample
โ”‚   โ”‚   โ”œโ”€โ”€ applypatch-msg.sample
โ”‚   โ”‚   โ”œโ”€โ”€ pre-merge-commit.sample
โ”‚   โ”‚   โ”œโ”€โ”€ pre-receive.sample
โ”‚   โ”‚   โ”œโ”€โ”€ pre-applypatch.sample
โ”‚   โ”‚   โ”œโ”€โ”€ commit-msg.sample
โ”‚   โ”‚   โ”œโ”€โ”€ sendemail-validate.sample
โ”‚   โ”‚   โ””โ”€โ”€ update.sample
โ”‚   โ”œโ”€โ”€ shallow
โ”‚   โ”œโ”€โ”€ refs
โ”‚   โ”‚   โ”œโ”€โ”€ heads
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ main
โ”‚   โ”‚   โ”œโ”€โ”€ remotes
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ origin
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ main
โ”‚   โ”‚   โ””โ”€โ”€ tags
โ”‚   โ”œโ”€โ”€ description
โ”‚   โ”œโ”€โ”€ branches
โ”‚   โ”œโ”€โ”€ logs
โ”‚   โ”‚   โ”œโ”€โ”€ HEAD
โ”‚   โ”‚   โ””โ”€โ”€ refs
โ”‚   โ”‚       โ”œโ”€โ”€ heads
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ main
โ”‚   โ”‚       โ””โ”€โ”€ remotes
โ”‚   โ”‚           โ””โ”€โ”€ origin
โ”‚   โ”‚               โ””โ”€โ”€ main
โ”‚   โ””โ”€โ”€ index
โ”œโ”€โ”€ Literature
โ”‚   โ”œโ”€โ”€ Bohlin, Gordon, Tremblay (2014) - Techniques and Review of Absolute Flux Calibration from the Ultraviolet to the Mid-Infrared.pdf
โ”‚   โ””โ”€โ”€ Bohlin and Gilland (2004) - Absolute Flux Distribution of the SDSS Standard BD +17_4708.pdf
โ”œโ”€โ”€ PyPhotometry
โ”‚   โ”œโ”€โ”€ win-arm64
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ osx-64
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ README.txt
โ”‚   โ”œโ”€โ”€ linux-s390x
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ meta.yaml
โ”‚   โ”œโ”€โ”€ linux-armv7l
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ linux-armv6l
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ osx-arm64
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ linux-64
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ linux-ppc64
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ linux-aarch64
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ win-32
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ linux-32
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ”œโ”€โ”€ win-64
โ”‚   โ”‚   โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚   โ”‚   โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”‚   โ””โ”€โ”€ linux-ppc64le
โ”‚       โ”œโ”€โ”€ pyphotometry-0.0.6-py39_0.tar.bz2
โ”‚       โ””โ”€โ”€ pyphotometry-0.0.5-py39_0.tar.bz2
โ”œโ”€โ”€ showdown.min.js
โ”œโ”€โ”€ version.txt
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ figures
โ”‚   โ”œโ”€โ”€ PyPhotometryIcon.png
โ”‚   โ”œโ”€โ”€ logs.jpg
โ”‚   โ”œโ”€โ”€ FigurePyPhotometry.png
โ”‚   โ””โ”€โ”€ PyPhotometry.png
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ fortran
โ”‚   โ”‚   โ”œโ”€โ”€ IntegralALL.f90
โ”‚   โ”‚   โ”œโ”€โ”€ PropFilters.f90
โ”‚   โ”‚   โ”œโ”€โ”€ moddatatype.mod
โ”‚   โ”‚   โ”œโ”€โ”€ makefile
โ”‚   โ”‚   โ”œโ”€โ”€ ReadFilters.f90
โ”‚   โ”‚   โ”œโ”€โ”€ GaussLegendreQuadrature.f90
โ”‚   โ”‚   โ”œโ”€โ”€ PropFilters.compile
โ”‚   โ”‚   โ”œโ”€โ”€ EvalFilters.f90
โ”‚   โ”‚   โ”œโ”€โ”€ EvalFilters.compile
โ”‚   โ”‚   โ”œโ”€โ”€ LINinterpol.f90
โ”‚   โ”‚   โ”œโ”€โ”€ DataTypes.f90
โ”‚   โ”‚   โ””โ”€โ”€ eval.exe
โ”‚   โ””โ”€โ”€ python
โ”‚       โ”œโ”€โ”€ __pycache__
โ”‚       โ”‚   โ””โ”€โ”€ PyPhotometry.cpython-39.pyc
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ photometry.py
โ””โ”€โ”€ .github
    โ””โ”€โ”€ workflows
        โ””โ”€โ”€ update_readme.yml

128 directories, 533 files
#################################################
Generated with tree_colored @ 2023 - ยฉ Jean Gomes
#################################################


PyPhotometry.py is a python wrapper to the library in fortran called PyPhotometry.flib. The fortran directory can be compiled separately for each individual subroutine.


ISSUES AND CONTRIBUTIONS

If you encounter any issues with this project, please feel free to submit an issue on the GitHub repository. We appreciate your feedback and are committed to improving the quality of our codebase.

If you'd like to contribute to this project, we welcome pull requests from the community. Before submitting a pull request, please make sure to fork the repository and create a new branch for your changes. Once your changes are complete, submit a pull request and we'll review your code as soon as possible.

For any questions or concerns about contributing, please contact the project maintainer at antineutrinomuon@gmail.com. Thank you for your interest in contributing to our project!


LOGS

LOGS
05/10/2023J.G. changed some parts of the code to be compatible with Herschel filters. Also, added log dates explicitly in README file.
07/12/2023J.G. changed some parts of the code to extend the calibration stars. Also, many changes in the interpolation scheme. Verification of the SQL tables. Also, added log dates explicitly in README file.

LICENSE

This software is provided "AS IS" (see DISCLAIMER below). Permission to use, for non-commercial purposes is granted. Permission to modify for personal or internal use is granted, provided this copyright and disclaimer are included in ALL copies of the software. All other rights are reserved. In particular, redistribution of the code is not allowed without explicit permission by the author.

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.

About

๐–ฅ” PyPhotometry is a Python package based on a Fortran legacy package that allows you to compute photometric fluxes and magnitudes in various photometric systems. The package provides different magnitude systems

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published