Commit 36842732 authored by Andrew Strong's avatar Andrew Strong

original README from propagate/c/galplot

parent e4d2222b
GALPLOT README
---------------------------------------------------------------------
This is in progress and does not include all the latest developments.
Many input datasets are required which are not yet provided.
1. GALPLOT is a code for plotting the results of the cosmic ray propagation and diffuse gamma ray production code GALPROP, together with relevant data.
Data include cosmic-ray spectra and ratios, Fermi-LAT gamma rays, and synchrotron surveys.
It can also perform gamma-ray source population synthesis calculations.
So far there is no documentation of the functionality, this will follow if there is sufficient interest.
It should however be sufficiently clear from the comments in the parameter file provided.
2. Installation
The packages required are
The packages cfitsio, CCfits, healpix and gsl (GNU Scientific Library) and CLHEP are required.
These can be obtained from the following URLs
cfitsio: http://heasarc.gsfc.nasa.gov/fitsio/
CCfits: http://heasarc.gsfc.nasa.gov/fitsio/
healpix: http://healpix.jpl.nasa.gov This version requires HEALPix 3.11, also compatible with v2.20a (may need openmp enabled in configure, see below). Replaces previous version which used v2.01.
gsl: http://www.gnu.org/software/gsl/ (not actually used by GALPLOT, but used by GALPROP. Will remove from GALPLOT configuration in future).
CLHEP: http://wwwasd.web.cern.ch/wwwasd/lhc++/clhep
CERN root (5.18.00 or later, has been validated with 5.34.13) from http://root.cern.ch
slalib (sla_c): available from the ISDC http://isdc.unige.ch, under INTEGRAL OSA, directory support-sw/sla_c.
<path for slalib> is assumed to contain lib/libsla_c.a & include/slalib.h:
cp libsla_c.a <path for slalib>/lib , cp *.h <path for slalib>/include
Hint: do NOT use the ISDC Makefile found there. Instead do e.g.
g++ -c *.c
ar -vr libsla_c.a *.o
(the reason is that the slalib routines are in C but need compilation with g++ for compatibility with GALPLOT C++ argument passing.)
Typical installation goes like this:
cd <directory where working copy of galprop and this README file is>
autoreconf -i -v
./configure --with-cfitsio=<path for cfitsio> --with-healpix=<path for healpix> --with-gsl=<path for gsl> --with-rootminuit2=<path for root> --with-slalib=<path for slalib> --prefix=<path for installed executable> CXXFLAGS="-O3 etc"
(incomplete: see below for a complete example)
make
which generates the binary ./source/galplot
optionally:
make install
which puts the binary in <path for installed executable>/bin
If make install is used, galplot has to be run from <path for installed executable>/bin in order to access GCR*.dat (which must be copied there).
To run it to plot galprop output from e.g. ../GALDEF/galdef_54_reltest19
with plotting options specified in ../GALDEF/galplotdef_54_reltest19
These sample files are included in the GALDEF directory in this distribution; they must be copied to ../GALDEF to run galprop and galplot.
------------------------------------------------------
Step-by-step procedure to run GALPLOT test case after installation is completed:
cd <working copy of galplot, where this README is>
mkdir ../GALDEF (if not already existing)
mkdir ../FITS (if not already existing)
cp GALDEF/* ../GALDEF (the sample galdef and galplotdef files)
cp FITS/* ../FITS (the input files required by GALPLOT: not yet implemented)
mkdir plots (if it does not already exist: the output plots go there)
setenv LD_LIBRARY_PATH .... (see example below)
run GALPLOT:
source/galplot 54 reltest19
This assumes GALPROP v54 has already be run in the appropriate place to generate the model files in ../FITS : source/galprop -r reltest19.
cd plots
(then view the *eps plots with gv)
--------------------------------------------------------------
Directory structure can be checked as follows.
An overview of the standard directory structure assumed:
V top level of user's structure
galprop
galprop/source
galprop/GALDEF : sample parameter files to copy to user's GALDEF directory
galprop/FITS : adjunct data files input by galprop, to copy to user's FITS directory
galplot
galplot/source
galplot/GALDEF : sample parameter files to copy to user's GALDEF directory
galplot/FITS : adjunct data files input by galplot, to copy to user's FITS directory (not yet implemented!)
galplot/plots : plots created by galplot go here. This directory must be created by the user.
GALDEF : users parameter files
FITS : users galprop files, input and output
So:
cd galprop
ls ../GALDEF (the user's parameter files)
ls ../FITS (the user's galprop files)
source/galprop -r reltest19 (runs galplot)
cd ..
cd galplot
ls ../GALDEF (shows the user's parameter files)
ls ../FITS (shows the user's galprop files)
ls GCR*dat (cosmic-ray data files: must be here as used in galplotdef)
source/galplot 54 reltest19 (runs galplot on galprop v54 output)
ls plots (shows the galplot-generated plots)
NB galprop ./configure specifies the location of the user's GALDEF and FITS, user-defined.
galplot does not yet do this, it assumes the above fixed scheme.
-------------------------------------------------------------------------
An example working installation at MPE, edit accordingly:
This version:
Operating system: sles11, root 5.34.13 healpix 3.11
This healpix version is specified in acinclude.m4, and a copy of this file is in acinclude.m4_healpix3.11
./configure --with-cfitsio=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/cfitsio/3.26/gcc_sles11_olga2/cfitsio --with-ccfits=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CCfits/gcc_olga2_sles11_cfitsio3.26/usr/local --with-healpix=/afs/ipp-garching.mpg.de/home/a/aws/Healpix/Healpix_3.11/src/cxx/generic_gcc --with-rootminuit2=/afs/ipp-garching.mpg.de/home/a/aws/volume3/root_v5.34.13/root --with-gsl=/afs/ipp-garching.mpg.de/home/a/aws/gsl/gsl-1.10/olga --with-slalib=/afs/ipp/u/aws/propagate/c/sla_c_g++ --with-clhep=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CLHEP/2.0.4.3/installed_here CXXFLAGS=-"DHAVE_ALM_HEALPIX_TOOLS_H -fopenmp -O3"
make
before running do:
setenv LD_LIBRARY_PATH /afs/ipp-garching.mpg.de/home/a/aws/volume3/root_v5.34.13/root/lib:/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CCfits/gcc_olga2_sles11_cfitsio3.26/usr/local/lib:/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CLHEP/2.0.4.3/installed_here/lib
------------------------------------------------------------
Operating system: sles11, root 5.30.02, healpix 3.11
This healpix version is specified in acinclude.m4, and a copy of this file is in acinclude.m4_healpix3.11
./configure --with-cfitsio=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/cfitsio/3.26/gcc_sles11_olga2/cfitsio --with-ccfits=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CCfits/gcc_olga2_sles11_cfitsio3.26/usr/local --with-healpix=/afs/ipp-garching.mpg.de/home/a/aws/Healpix/Healpix_3.11/src/cxx/generic_gcc --with-rootminuit2=/afs/ipp-garching.mpg.de/home/a/aws/volume3/root_5.30.02_sles11/root --with-gsl=/afs/ipp-garching.mpg.de/home/a/aws/gsl/gsl-1.10/olga --with-slalib=/afs/ipp/u/aws/propagate/c/sla_c_g++ --with-clhep=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CLHEP/2.0.4.3/installed_here CXXFLAGS="-DHAVE_ALM_HEALPIX_TOOLS_H -fopenmp -O3"
------------------------------------------------------------
Operating system: sles11, root 5.30.02, healpix 2.20a
cp acinclude.m4_healpix2.20a acinclude.m4
./configure --with-cfitsio=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/cfitsio/3.26/gcc_sles11_olga2/cfitsio --with-ccfits=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CCfits/gcc_olga2_sles11_cfitsio3.26/usr/local --with-healpix=/afs/ipp-garching.mpg.de/home/a/aws/Healpix/Healpix_2.20a_sles11_olga2/Healpix_2.20a/src/cxx/generic_gcc --with-rootminuit2=/afs/ipp-garching.mpg.de/home/a/aws/volume3/root_5.30.02_sles11/root --with-gsl=/afs/ipp-garching.mpg.de/home/a/aws/gsl/gsl-1.10/olga --with-slalib=/afs/ipp/u/aws/propagate/c/sla_c_g++ --with-clhep=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CLHEP/2.0.4.3/installed_here CXXFLAGS="-DHAVE_ALM_HEALPIX_TOOLS_H -fopenmp -O3"
----------------------------------------------------------
(-fopenmp is required if healpix is installed with openmp option)
make
before running do:
setenv LD_LIBRARY_PATH /afs/ipp-garching.mpg.de/home/a/aws/volume3/root_5.30.02_sles11/root/lib:/afs/ipp-garching.mpg.de/home/a/aws/gsl/gsl-1.10/olga/lib:/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CCfits/gcc_olga2_sles11_cfitsio3.26/usr/local/lib:/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CLHEP/2.0.4.3/installed_here/lib
==================================
Previous version:
Operating system: sles11, root 5.30.02, healpix 2.01
./configure --with-cfitsio=/afs/ipp-garching.mpg.de/home/a/aws/Healpix/Healpix_2.01_sles11_olga2/src/cxx/generic_gcc --with-ccfits=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CCfits/gcc_olga2_sles11_cfitsio3.26/usr/local --with-healpix=/afs/ipp-garching.mpg.de/home/a/aws/Healpix/Healpix_2.01_sles11_olga2/src/cxx/generic_gcc --with-rootminuit2=/afs/ipp-garching.mpg.de/home/a/aws/volume3/root_5.30.02_sles11/root --with-gsl=/afs/ipp-garching.mpg.de/home/a/aws/gsl/gsl-1.10/olga --with-slalib=/afs/ipp/u/aws/propagate/c/sla_c_g++ --with-clhep=/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CLHEP/2.0.4.3/installed_here CXXFLAGS=-O3
make
before running do:
setenv LD_LIBRARY_PATH /afs/ipp-garching.mpg.de/home/a/aws/volume3/root_5.30.02_sles11/root/lib:/afs/ipp-garching.mpg.de/home/a/aws/gsl/gsl-1.10/olga/lib:/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CCfits/olga2/usr/local/lib:/afs/ipp-garching.mpg.de/home/a/aws/propagate/c/CLHEP/2.0.4.3/installed_here/lib
------------------------------------------------------------------------
3. Some explanation of how the autotools installation works
The (only) installation files in the repository are these 6:
configure.ac acinclude.m4
./Makefile.am ./Makefile.am.common ./Makefile.am.common-tail ./source/Makefile.am
Then...
configure.ac acinclude.m4 are read by autoreconf to produce the shell script ./config (and various other files)
while
./Makefile.am ./Makefile.am.common ./Makefile.am.common-tail ./source/Makefile.am
are read by ./config to generate
./Makefile.in ./Makefile ./source/Makefile.in ./source/Makefile and other files like ./libtools
>> The actual routines to be processed are specified in ./source/Makefile.am
./Makefile.am just points to source/Makefile.am (it works recursively)
More remarks.
configure.ac just specifies which packages are going to be required
acinclude.m4 describes how to handle the packages, i.e. how ./config should work on its input.
./config allows the user to specify where the packages are installed
source/Makefile.am uses variables generated by ./config with names like @FITSIO_LIBS@
CXXFLAGS allows other compiler options to be specified, apart from those handled by the other parameters.
=====================================================================================================
Acknowledgements.
The gamma-ray part of the software uses some routines from the GARDIAN package developed by G. J'ohannesson,
and described in Ackermann, M. et al. (2012) ApJ, 750, 3. I thank G. J'ohannesson for permission to use these routines.
I thank Johann Cohen-Tanugi for testing the export of this package and many useful suggestions.
===================================================================================================
Documented by AWS
20131216 : r1112: reads Fermi-LAT Science Tools healpix formats.
20131213 : r1109: step-by-step procedure
20131212 : r1108: description of directory structure
20131210 : r1101: note on slalib compilation
20131209 : r1099: no boost-dependence at all. gsl removed from setenv
20140110 : r1120: galplotdef_54_reltest19: better source populations parameters. Added FITS, FITS/GLAST, and 2FGL catalogue in that directory, as used by galplotdef_54_reltest19
20140115 : r1136: two more input Fermi catalogues read, see galplotdef_54_reltest19. Samples provided in FITS/GLAST. Used for N(S) plots.
20140130 : r1151: Skymap.h outputs HEALPix images as a column for each energy, compatible with GALPROP and viewable with Aladin.
Affects source population and solar emission skymaps, which are the only output images from GALPLOT.
20140202 : r1157 Source population skymaps have distinct names including galdef_ID and galplotdef tag.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment