Skip to content

nirinA/kcorrect_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

what is kcorrect_python?

This package provides Python interface to kcorrect C library by M. Blanton et al. and described here:

http://adsabs.harvard.edu/abs/2007AJ....133..734B

requirements

kcorrect

see:

http://howdy.physics.nyu.edu/index.php/Kcorrect

for obtaining kcorrect and how to install it.

This wrapper uses kcorrect version 4.2.

Python and dependencies

This version requires Python 2.7+ and NumPy 1.7+

installation

the usual:

python setup.py build

and (may need root privileges) :

python setup.py install

should build the package and install _kcorret.so and kcorrect/ into the standard site-packages directory.

usage

Note: the environmental variables KCORRECT_DIR and LD_LIBRARY_PATH should be set and point to the location where the kcorrect package is installed, eg:

export KCORRECT_DIR=/usr/local/kcorrect
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$KCORRECT_DIR/lib

test

you can test the package by running:

python test.py

this will procude two files coeffs.dat and *reconstructed_maggies.dat".

Available functions

The following functions are currently available for this version:

o load_templates o load_filters o fit_coeffs_from_file o fit_coeffs o reconstruct_maggies o reconstruct_maggies_from_files o fit_photoz o fit_photoz_from_file o solar_magnitudes o project_filters o fit_nonneg

LICENSE

Public Domain

About

Python interface for Kcorrect library

Resources

License

Stars

Watchers

Forks

Packages

No packages published