Commit 36842732 authored by Andrew Strong's avatar Andrew Strong

original README from propagate/c/galplot

parent e4d2222b
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
healpix: 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: (not actually used by GALPLOT, but used by GALPROP. Will remove from GALPLOT configuration in future).
CERN root (5.18.00 or later, has been validated with 5.34.13) from
slalib (sla_c): available from the ISDC, 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)
which generates the binary ./source/galplot
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)
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/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/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
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/ --with-ccfits=/afs/ --with-healpix=/afs/ --with-rootminuit2=/afs/ --with-gsl=/afs/ --with-slalib=/afs/ipp/u/aws/propagate/c/sla_c_g++ --with-clhep=/afs/ CXXFLAGS=-"DHAVE_ALM_HEALPIX_TOOLS_H -fopenmp -O3"
before running do:
setenv LD_LIBRARY_PATH /afs/
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/ --with-ccfits=/afs/ --with-healpix=/afs/ --with-rootminuit2=/afs/ --with-gsl=/afs/ --with-slalib=/afs/ipp/u/aws/propagate/c/sla_c_g++ --with-clhep=/afs/ 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/ --with-ccfits=/afs/ --with-healpix=/afs/ --with-rootminuit2=/afs/ --with-gsl=/afs/ --with-slalib=/afs/ipp/u/aws/propagate/c/sla_c_g++ --with-clhep=/afs/ CXXFLAGS="-DHAVE_ALM_HEALPIX_TOOLS_H -fopenmp -O3"
(-fopenmp is required if healpix is installed with openmp option)
before running do:
setenv LD_LIBRARY_PATH /afs/
Previous version:
Operating system: sles11, root 5.30.02, healpix 2.01
./configure --with-cfitsio=/afs/ --with-ccfits=/afs/ --with-healpix=/afs/ --with-rootminuit2=/afs/ --with-gsl=/afs/ --with-slalib=/afs/ipp/u/aws/propagate/c/sla_c_g++ --with-clhep=/afs/ CXXFLAGS=-O3
before running do:
setenv LD_LIBRARY_PATH /afs/
3. Some explanation of how the autotools installation works
The (only) installation files in the repository are these 6: acinclude.m4
./ ./ ./ ./source/
Then... acinclude.m4 are read by autoreconf to produce the shell script ./config (and various other files)
./ ./ ./ ./source/
are read by ./config to generate
./ ./Makefile ./source/ ./source/Makefile and other files like ./libtools
>> The actual routines to be processed are specified in ./source/
./ just points to source/ (it works recursively)
More remarks. 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/ 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.
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