CosmoPhotoz - GLM PhotoZ estimation
Homepage: GitHub Repository
CosmoPhotoz is a package that determines photometric redshifts from galaxies utilising their magnitudes. The method utilises Generalized Linear Models which reproduce the physical aspects of the output distribution. The rest of the methodology and testing of the technique is described in the associated Astronomy and Computing publication (link TBC).
Features
Principle Component Anylsis and decomposition of input photometric catalogue
Generalized Linear Model family and link choice
Seaborn publication quality plots
Get it now
The package can be installed using the PyPI and pip.
$ pip install -U CosmoPhotoz
Or if the tarball or repository is downloaded, distutils can be
$ python setup.py install
Examples
Run from the command line.
$ run_glm.py --dataset sample.csv --num_components 3 --training_size 10000 --family Gamma --link log
Or import the library into python.
from CosmoPhotoz.photoz import PhotoSample # import the library
import numpy as np
# Instantiate the class
UserCatalogue = PhotoSample(filename="PHAT0", family="Gamma", link="log")
# Make a training size array to loop through
train_size_arr = np.arange(500,10000,500)
catastrophic_error = []
# Select your number of components
UserCatalogue.num_components = 4
for i in range(len(train_size_arr)):
UserCatalogue.do_PCA()
UserCatalogue.test_size = train_size_arr[i]
UserCatalogue.split_sample(random=True)
UserCatalogue.do_GLM()
catastrophic_error.append(UserCatalogue.catastrophic_error)
min_indx = np.array(catastrophic_error) < 5.937
optimum_train_size = train_size_arr[min_indx]
print optimum_train_size
See more examples within the Documentation.
Documentation
The library documentation can be accessed at Read the Docs
The git repository can be accessed at GitHub
The PyPI package page can be accessed at PyPI
Requirements
Python >= 2.7 or >= 3.3
License
GNU General Public License (GPL>=3)
Metadata
Release files for CosmoPhotoz 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| CosmoPhotoz-0.1.tar.gz | 2.6 MB | Without provenance | Details for CosmoPhotoz-0.1.tar.gz |
Release files / CosmoPhotoz-0.1.tar.gz
| Download URL | CosmoPhotoz-0.1.tar.gz |
|---|---|
| Size | 2.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3e05c858fd68c5e148266a6b6ddd97224fcfdffc34e2535ce09c5cb4bfe6a67
|
|
BLAKE2b-256 checksum How to use checksums |
ab2d8e0fc82b5164c15e49d36257c89e6ad50db4c7f04b4a0742b690860de08d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for CosmoPhotoz 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.