-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
executable file
·239 lines (161 loc) · 7.69 KB
/
README
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
cdLet's see now.
APP3-ANALYSIS
The base path where all this code is stored will be referred to as $(APP3-CPP)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%% THIRD PARTY OPEN-SOURCE LIBRARIES %%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The collection of open source librarires used by APP3-ANALYSIS are referred to
as 'cpptools'. Below is the list of such libraries:
- simpleini
- tiff-4.0.0
- gsl-1.15
- cfitsio
- CCFits
These two we want to try out but have not gotten to it yet:
- levmar-2.6
- CLAPACK-3.2.1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%% COMPILING INSTRUCTIONS FOR THIRD PARTY OPEN-SOURCE LIBRARIES %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The open source libraries must be installed in the following path:
$(APP3-CPP)/../cpptools
The git repository for APP3-ANALYSIS provides the compressed source code for
all the cpptools. When building the code for the first time, the user should
first compile the cpptools. To do so create the directory called
$(APP3-CPP)/../cpptools
and inside it untar the files for the open-source libraries that are provided
here, namely run the following commands inside the cpptools directory:
% unzip simpleini-4.15.zip
% tar -zxvf tiff-4.0.0.tar.gz
% tar -zxvf cfitsio3290.tar.gz
% tar -zxvf CCfits-2.4.tar.gz
% tar -zxvf gsl-1.15.tar.gz
Follow the instructions below to compile each of the cpptools:
--- simpleini
There is nothing to compile for this one.
This contains the main functions required to read/write .INI files. To use them
all one needs to do is include the file called "SimpleIni.h", all the function
declarations and definitions are inside this file.
--- tiff-4.0.0
This is the libtiff library version 4.0.0 downloaded from www.libtiff.org.
You need to compile it before you can use it. To do so go inside the
$(APP3-CPP)/../cpptools/tiff-4.0.0 directory and type
% ./configure
% make
WARNING: DO NOT type
% make install
as this will attempt to copy all the libraries and header files into places
where they are accesible to everyone, suchs /usr/lib or /usr/include. It is
best to try to keep everything in this code self-contained.
After compiling, the header files will be accesible in
$(APP3-CPP)/../cpptools/tiff-4.0.0/libtiff/ and the shared library will be accessible at
$(APP3-CPP)/../cpptools/tiff-4.0.0/libtiff/.libs/libtiff.so
--- gsl-1.15
This is the GNU Scientific Library version 1.15. You need to compile it
before you can use it. To do so go inside $(APP3-CPP)/gsl-1.15 and type
% ./configure
% make
WARNING: do NOT type
% make install
as this will attempt to copy all the libraries and header files into places
where they are accesible to everyone, suchs /usr/lib or /usr/include. It is
best to try to keep everything in this code self-contained.
The shared library will be accessible at $(APP3-CPP)/gsl-1.15/.libs/libgsl.so,
and the header files will be accesible at $(APP3-CPP)/gsl-1.15/gsl
--- cfitsio
This is the CFITSIO library for reading and writing files in FITS format. To
compile it go inside $(APP3-CPP)/../cpptools/cfitsio and type
% ./configure
% make
Again, WARNING: do NOT type 'make install'.
--- CCFits
This is the object oriented interface to the cfitsio library. To compile it
you have to compile cfitsio first. Then configure CCFits by going inside
$(APP3-CPP)/../cpptools/CCfits and typing
% ./configure --with-cfitsio-include=$(PATH) --with-cfitsio-libdir=$(PATH)
where $(PATH) is the ABSOLUTE path to your cfitsio library. For instance in my
case I used
% ./configure
--with-cfitsio-include=/home/pd3/cpptools/cfitsio
--with-cfitsio-libdir=/home/pd3/cpptools/cfitsio
After CCFits is configured, then proceed to type
% make
Again, WARNING: do NOT type 'make install'!!
The header files will be located in $(APP3-CPP)/../cpptools/CCfits/ and the
shared library wiLl be in $(APP3-CPP)/../cpptools/CCfits/.libs/libCCfits.so
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% RUN-TIME LOADING OF OPEN-SOURCE LIBRARIES %%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
When compiling code that uses any of the open souce libraries described above,
make sure that the library path is sent to the linker using the -R (rpath)
option. The compiler can send this option to the linker using the -Xlinker
flag. Using this option guarantess that the correct shared library will be
found and used by the executable at run time.
If you are unsure of the location from which an executable is loading it's
shared libraries do
% ldd executable
to find out.
If you are setting up APP3-ANALYSIS continue with the steps below. If you
are havingp problems using any of the cpp tools in your executable then make
sure you explore its library dependencies by using ldd.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% ENTHOUGHT PYTHON DISTRIBUTION %%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
APP3-ANALYSIS uses some features from the enthough python distribution. I
have tried getting them to work from within C++ but I haven't had any success
yet. At the time any use of the EPD is trough system calls. For this to work
make sure that you have an alias to the EPD. For instance in my case my
.bashrc file defines this alias as
alias epd='/lab/software/epd-7.3-2-rh5-x86-6/bin/python'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% APP3-ANALYSIS HELPER OBJECTS %%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The sections below describe the utilities or objects that APP3-ANALYSIS uses
to carry out a great part of it's functionality. The instructions to compile
any of these utilities/objects are as follows:
% cd $(APP3-CPP)
% ./configure
% cd $(APP3-CPP)/utilxx
% make
The configure script is used to modify the Makefiles and set the appropriate
paths for the run time loading of any shared libraries.
If this sounds confusing here is step by step what you have to do to compile
the helper objetcs.
% cd $(APP3-CPP)
% ./configure
% cd qini
% make
% cd ..
% cd utils
% make
% cd ..
% cd funcs
% make
% cd ..
% cd fits
% cd ..
--- qini
Defines a utility 'qini' that can be used to query report lines from the
command line. It also defines functions to be called by other code, it does so
in the file qini_utils.cpp , the headers for this functions are in qini.h. To
use the utils the calling code needs to include the headers and the object
qini_utils.o
After compilation, the utility will be copied to the $(APP3-CPP)/bin/
directory. The qini_utils.o object will be at $(APP3-CPP)/qini .
--- utils
This defines an object that contains utitlities to manipulate data. It is used
to load data from a file into a gsl_matrix data structure, and then to
manipulate this structure in various ways: cropping, finding moments, saving
to TIFF, smoothing, masking, subtracting, etc. It also implements other
helper functions used elsewhere in the analysis of data.
To use it the header utils.h must be included and the object utils.o must be
provided to the linker.
--- funcs
This provides wrappers for the Fermi-Dirac integrals. To use it the header
file funcs.h must be included and the object funcs.o must be provided to the
linker.
--- fits
****NEED TO ADD DESCRIPTION HERE****
--- fourier
WORK IN PROGRESS. Aims to implement fast fourier transforms for smoothing 2D
data.