-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.TXT
132 lines (86 loc) · 3.66 KB
/
README.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Requirements:
Intel CPU with SSE4.2 or higher support.
Compiler with C++11 support and C++11 standard library support.
libcfitsio.a Avalible from http://heasarc.gsfc.nasa.gov/fitsio/
Before installing DEMON, be sure you have the cfitsio library installed from
here: http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html
Also make sure you have CMake installed from here:
http://www.cmake.org/
A step by step installation guide for mac and linux devices will be in section 4
Compiling:
Download and build libcfitsio.a from the above link.
Sections:
1. Using CMake:
2. Using xcode:
3. Multicore Support on Linux:
4. Step-by-step installation on linux and mac devices
5. Notes on github
6. Looking at Data
1. Using CMake:
DEMON requires that the cfitsio library and include paths be set with the
following command.
cmake -DCFITSIO_INC_PATH=/path/to/include -DCFITSIO_LIB_PATH=/path/to/lib
extra build flags maybe included by setting
cmake -DCMAKE_CXX_FLAGS="flags"
A optimized build maybe specifed by
cmake -DCMAKE_BUILD_TYPE=Release
Cmake will generate a make file. The built executable can be found in
build/bin
2. Using xcode:
In the xcode project, click on the Simulation project. In the "Build
Settings" Tab, under the "Search Paths" section add the path to the cfitsio
header files and libcfitsio headers. Under the linking tab check to make sure
"Other Linking Flags" is set to -lcfitsio.
3. Multicore Support on Linux:
For parallel processing support on linux, use the -fopenmp flag,
cmake -DCMAKE_CXX_FLAGS="-fopenmp"
4. Step-by-step installation on linux and mac devices
Install cfitsio, if you use your distribution's software repository,
be sure to keep track of where the library and include paths are located.
Otherwise do the following:
mkdir builds
cd builds
wget ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3360.tar.gz
tar xvzf cfitsio3360.tar.gz
cd cfitsio
./configure
make
cd ..
The FFTAnalysis code requires fftw3 to be installed. This can be done
with the package manager, or it can be done through the command line
as follows:
wget http://www.fftw.org/fftw-3.3.4.tar.gz
tar xvzf fftw-3.3.4.tar.gz
cd fftw-3.3.4
./configure
make
make install
Now, make sure that cmake is installed correctly. More than likely,
you can do this with your package manager, but if you insist on doing this
through the command line, do the following:
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz
tar xvzf cmake-2.8.12.2.tar.gz
cd cmake-2.8.12.2
./bootstrap
make
make install
Now we can start to work with DEMON. If you want to use git, please use:
git clone [email protected]:leios/demonsimulationcode.git
cmake -DCFITSIO_INC_PATH=../cfitsio -DCFITSIO_LIB_PATH=../lib
make
Now DEMON should be on your system, with the executable in the following
directory: ~builds/demonsimulationcode-read-only/build/bin/ . Now we just need
to make this directory callable in any directory on your system.
Do the following:
pwd
Now place a path to that directory in your bashrc file. On Linux:
echo export PATH=$PATH:/home/USER/builds/demonsimulationcode-read-only/build/bin >> ~/.bashrc
On Mac:
echo export PATH=$PATH:/home/USER/builds/demonsimulationcode-read-only/build/bin >> ~/.PROFILE
And there you have it, a full copy of DEMON on your machine!
5. Notes on github
DEMON is now available on github and can be modified with both svn and git.
6. Looking at Data
DEMON data will be stored in a fits file. Please use additional software, such
as astropy.io to use this data. An example of how to use astropy.io can be found
in the example directory.