Compilation WMAP-XL (the calibration application) works with SQLite 3 database files. The map-making routines accept and output FITS files. They also use map and mask files which are in Healpix format. The calibration application makes use of a linear regression fitting algorithm from Numerical Recipes 3. The IDL map-making routines then also need IDL Astronomy Library and WMAP Software. In order to compile the minimal (simple) version of the calibration application you will need the following dependencies. SQLite 3 library CFITSIO (FITS handling C library) CCfits (C++ wrapper for CFITSIO) Healpix C++ libraries Numerical Recipes 3 (include files) The calibration application can be compiled in an extended mode which includes non-linear fitting and simple plotting facilities. In order to compile the extended version you will also need. Non-linear fitter (you can choose among several frameworks including Root, LEVMAR and Numerical Recipes 3) MathGL C++ library (plotting facilities) In case you want to extend existing code, you may find useful a suite of testcases shipped together with the code. You will need the gTest (GoogleTest Framework) in order to compile and run the tests. Under Linux you can configure and compile with GCC and the following commands. wmapLX To run the compilation script packaged with the source code execute ./compile.sh <simple|full|tod_to_sql|test-simple|test-full>, where "simple" compiles the minimal version of the application/test unit. "Full" compiles additional non-linear fitting/plotting facilities and is often not necessary. "tod_to_sql" compiles the interface library used by extraction IDL routines. NOTE: In order to compile the minimal (simple) version define a pre-processor symbol "_LX_SIMPLE" prior to compilation. Root ./configure linuxx8664gcc --prefix=/usr/local --enable-fitsio --enable-fftw3 --enable-gsl-shared --enable-mathmore --enable-minuit2 --enable-opengl --enable-roofit --enable-soversion --enable-rpath MathGL ./configure --enable-double --enable-all
Usage Assuming the raw uncalibrated TOD as downloaded from the WMAP site is in "/home/user/uncalibrated-tod/" and the auxiliary files are in "/home/user/auxiliary/" one can run the iterative calibration. Version #1 (manually, not recommended) Extract the TOD into "/home/user/uncalibrated-tod-sql/". lx_wmap_tod_extract, "/home/user/uncalibrated-tod/", "/home/user/uncalibrated-tod-sql/", "DK113,DK114,DK123,DK124", "GAL", "AB", "/home/user/auxiliary/", /Center Run the fitting procedure and save the results into "/home/user/calibration-solutions/". ./wmapLX --set=/home/user/auxiliary/settings.ini --action=model-fit-1 --raw_prefix=/home/user/uncalibrated-tod-sql/ --aux_prefix=/home/user/auxiliary/wmap_processing_r9_mask_3yr_v2.fits --out_prefix=/home/user/calibration-solutions/ Make a copy of uncalibrated data in "/home/user/calibrated-tod/" (Remember to rename the files. You can batch rename using the following bash command: rename -f 's/.*([0-9]{11}_[0-9]{11}).*\.(.*$)/$1.$2/' *.fits). Run the calibration on the files from step 3 using the solutions from step 2. ./wmapLX --set=/home/user/auxiliary/settings.ini --action=calibrate --raw_prefix=/home/user/uncalibrated-tod-sql/ --aux_prefix=/home/user/calibration-solutions/ --out_prefix=/home/user/calibrated-tod/ Generate a map from the calibrated data. run_mapmaking, "K1", 1, 1, /wmap, "/home/user/calibrated-tod/", "/home/user/map-making/", "/home/user/auxiliary/", "/home/user/auxiliary/wmap_processing_r9_mask_3yr_v2.fits", 80, "/home/user/auxiliary/loop.so" Run the reduction procedure on the files in "/home/user/uncalibrated-tod-sql/" using the map and solutions from the above steps (this will overwrite the SQL files). ./wmapLX --set="/home/user/auxiliary/settings.ini" --action=reduce --raw_prefix="/home/user/uncalibrated-tod-sql/" --aux_prefix="/home/user/map-making/yr1_K1_m_t.fits" --out_prefix="/home/user/calibration-solutions/" Repeat the procedure from step 1 (you can skip step 3 and reuse the files from the previous iteration) as necessary and desirable. Version #2 (automatic, not recommended) Run the iterative calibration with the following command (it will automatically extract the necessary data, but the data will be changed in the reduction step). lx_wmap_run_iterative_calibration, "/home/user/uncalibrated-tod/", "/home/user/calibrated-tod/", "/home/user/calibration-solutions/", "/home/user/uncalibrated-tod-sql/", "/home/user/map-making/", "/home/user/auxiliary/", "wmap_processing_r9_mask_3yr_v2.fits", 80, 1, 1, "Q1", 5 Version #3 (store the extracted data, recommended) Extract the TOD into "/home/user/uncalibrated-tod-sql/". Make a copy of the extracted data from the above step into "/home/user/iterative-calibration-working-dir/". Run the iterative calibration (this will force the routine to use the available extracted data in "/home/user/iterative-calibration-working-dir/" and skip the extraction step) while preserving the original data in "/home/user/uncalibrated-tod-sql/" for further use. For result analysis you mau also need to install mksqlite (MATLAB SQLite Connector) in order to enable MATLAB - SQLite connections. When re-running the calibration on an already processed assembly, remember to clear the calibration log file in the auxiliary directory. If you forget to do this, the calibration routine may skip some of the calibration and reduction steps. When running the iterative calibration procedure always remember to set the target detector assembly in the settings.ini file (this way you avoid unnecessary and incorrect processing of other DAs). It can be achieved by adding a condition like this: (name LIKE '%Q1%') to the query_select_det_tbls query.