Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esheldon/psfex
python and C codes to interpolate and reconstruct psfex images
https://github.com/esheldon/psfex
Last synced: 11 days ago
JSON representation
python and C codes to interpolate and reconstruct psfex images
- Host: GitHub
- URL: https://github.com/esheldon/psfex
- Owner: esheldon
- License: gpl-3.0
- Created: 2013-04-26T13:50:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-01-21T17:21:24.000Z (almost 5 years ago)
- Last Synced: 2024-10-19T20:38:01.325Z (19 days ago)
- Language: C
- Size: 108 KB
- Stars: 19
- Watchers: 6
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
psfex
=====python and C codes to interpolate and reconstruct psfex images
using the python code
---------------------```python
import psfexrow=514.25
col=610.00
pex = psfex.PSFEx(filename)
image = pex.get_rec(row, column)
```using the C library
-------------------```C
// this version uses the fits reading
#include "psfex.h"
#include "psfex_fits.h"double row=514.25, col=610.;
struct psfex *psfex=psfex_fits_read(fname);
struct psfex_image *im=psfex_rec_image(psfex,row,col);printf("rec[%ld,%ld]: %lf\n", row, col, PSFIM_GET(im, row, col));
im=psfex_image_free(im);
psfex=psfex_free(psfex);
```using the standalone psfex-rec code
----------------------------------This code will write out a fits file with the PSF image in it,
to be read by your favorite code.```bash
psfex-rec psfex_file output_file row col
```The image will be in output_file
installation of python code
----------------------------```bash
git clone https://github.com/esheldon/psfex.gitcd psfex
# to install globally
python setup.py install# to install in a particular place
python setup.py install --prefix=/some/path# if you install in a prefix, make sure you
# add the /some/path/lib/python2.7/site-packages
# directory to your PYTHONPATH (replace python2.7
# with your python version)
```installation of C library and standalone psfex-rec code
------------------------------------------------------```bash
git clone https://github.com/esheldon/psfex.gitcd psfex
# to install globally
make install# to install in a particular place
make install prefix=/some/path# if you install in a prefix, make sure you
# add the /some/path/bin to your PATH.
#
# also /some/path/lib # directory to your LD_LIBRARY_PATH and
# LIBRARY_PATH. Similarly add /some/path/include
# to C_LIBRARY_PATH and CPATH
```dependencies for python library
-------------------------------- numpy
- fitsio - https://github.com/esheldon/fitsiodependencies for C library
-------------------------------- cfitsio