Gary's C++ and Python utility routines
Miscellaneous classes and functions of wide utility. Python routines include some specifications of the DECam focal plane properties.
- A C++ compiler that is compliant with C++-11 standards.
- FFTW Fourier transform library, if you want to use the
fft
class in C++. - yaml-cpp YAML-format reader by Jay Bedel, if you want to build the
Lookup1d
andPoly2d
classes. As of this writing (Mar 2017), the releases all depend on Boost but the master branch does not, so I use the master branch. - A linear algebra library, either
- TMV by Mike Jarvis, -OR-
- Eigen.
- Either of these can make good use of the Intel Math Kernel Library
- The Python libraries assume that astropy is available, and the routines to acquire Gaia data make use of astroquery.
You of course need to install the external libraries TMV or Eigen, and (optionally) MKL. And the FFTW and yaml-cpp libraries, should you want to use the utilities that depend on them. The Makefile requires these environment variables to be set:
CXX
: path to the C++-11-compliant compiler/linker.CXXFLAGS
: options given to the compiler/linker. Be sure to specify C++-11 (or higher) compliance if it's not the default, and an optimizer (the linear algebra libraries rely heavily on compile-time optimization).FFTW_DIR
: (optional) path to root of the FFTW installation, should have/include
and/lib
subdirectories.YAML_DIR
: (optional) path to root of the yaml-cpp installationTMV_DIR
: path to root of the TMV installation- -OR-
EIGEN_DIR
: path to root of Eigen installation. This is header-only library; there should be a${EIGEN_DIR}/Eigen
subdirectory where the headers are found. If bothTMV_DIR
andEIGEN_DIR
are given, TMV will be used.
MKL_DIR
: Path to the MKL. This is optional, and should be given if you want to use Eigen with MKL. TMV usage of MKL will have been determined when you built it.
Once these are all set you should be able to just run make
to build the C++ programs. The few undocumented test routines are built by make tests
.
Either python setup.py install
or just make python
will install the Python package gbutil
(which include that subpackage decam
).
See the individual utilities' codes for documentation on what they do.