Skip to end of metadata
Go to start of metadata

This page is under active development - scroll down to the second section if you want to run CHIPS on OzStar. Updated Instructions for Garrawarla will soon be added - J. Line  

CHIPS is available on Garrawarla


Plotting scripts in Python available in /astro/mwaeor/MWA/chips: - 1D PS - 2D PS - ratio in 2D of two different datasets

External cloud processing pared down version of CHIPS (v2.8)

CHIPS version for external computing

Full version CHIPS is a three-step data analysis suite:

Grid visibilities over time as a function of frequency (parallel over frequency with OpenMP)
Combine frequencies into a data cube
Perform spectral Fourier Transform to form power

This version of CHIPS includes Steps 1 and 2 only

CHIPS software:

ANSI C, compiled with gcc, using OpenMP parallelisation
dependencies required: CFITSIO, LAPACK, BLAS, OpenMP, LIBSLA (astronomy)
file input: UVFITS
file outputs: complex floats, doubles (binary files, little endian)


Example usage: This example has 384 frequency channels split over 24 input uvfits files. Each channel is gridded separately, and then these frequencies are combined into a cube with prepare_diff:




for i in 1 2 3 4 5 6 7 8 9


./gridvisdiff $OUTPUTDIR/uvdump_0${i}.uvfits 1160576480 ${ext} 1 -f 0 -e 1

echo ${i}


for i in 10 11 12 13 14 15 16 17 18 19 24


./gridvisdiff $OUTPUTDIR/uvdump_${i}.uvfits 1160576480 ${ext} 1 -f 0 -e 1

echo ${i}


./prepare_diff ${ext} 384 0 'yy' ${ext} 1 -p 2.0 -n 167.075e6 ./lssa_fg_thermal ${ext} 384 80 'yy' 300. ${ext} 0 1 0

IMPORTANT For data with Nchan neq 384, kriging cannot be used. Instead, run with kriging off. E.g., for 120 channels:

./prepare_diff ${ext} 384 0 'yy' ${ext} 1 -p 2.0 -n 167.075e6 ./lssa_fg_thermal ${ext} 120 80 'yy' 300. ${ext} 1 1 0


fprintf(stderr,"Usage: %s <options> uvfits_filename obs_id extension band \n",argv[0]);
fprintf(stderr,"\t -p period (seconds)\n");
fprintf(stderr,"\t -ew flag 14m EW baselines\n");
fprintf(stderr,"\t -c chanwidth (Hz)\n");
fprintf(stderr,"\t -n lowest frequency (Hz)\n");
fprintf(stderr,"\t -field fieldnum (0=EoR0, 1=EoR1, >2 anything)\n");
fprintf(stderr,"\t -u umax\n");

Running on OzStar

CHIPS can be launched via a python wrapper, which generates and launches sbatch  scripts for you, all with the correct dependencies. Here is a working example with explanations.

The very first thing you have to do is prepare a spot for outputs. CHIPS creates a large number of output files; to make it easier to track, it's suggested each user creates their own output directoy. CHIPS is hard-coded to require a few files in the output directory, so the first thing you have to do is ensure they're in your output directory:

Setup output directory
##cd into where I want to store CHIPS outputs
$ cd /fred/oz048/jline/test_CHIPS_scripts

##make a directory to store the outputs, and soft link necessary files
$ mkdir -p CHIPS_outputs
$ ln -s /fred/oz048/MWA/CODE/CHIPS/TEMPLATE_CHIPS_OUT/*.dat CHIPS_outputs

Next, we need to understand the inputs into CHIPS. The primary inputs are RTS-style uvfits files, which are labelled like uvdump_01.uvfits , one for each coarse band (24 in total). Typically, the outputs are stored in a generic data directory /fred/oz048/MWA/data/ , saved in a directory titled with the observation ID, and often stored in a sub directory. In our example, we'll use three different observation numbers, which are stored in a text file:

Observation list
$ more obs_list.txt

 are stored. We are aiming to process the .uvfits files that live here:

Data locations

to do that, we run the following commands (note this has the --no_run flag, meaning no jobs will be launched).  /fred/oz048/MWA/data is the default data directory for OzStar, so we don't have to specify that, just the obs IDs and the sub-dir name. Also, note copying and pasting this code won't work with the comments - you'll need to delete them for it to work.

CHIPS script (without running)
##This is equivalent to a 'module load chips', so sets up all the paths and dependencies needed for CHIPS
source /fred/oz048/jline/software/chips/

##This command searches for uvfits, and if it finds it, setups up the correct sbatch scripts \
     --cluster=ozstar \ ##what cluster we are on
     --obs_list=/fred/oz048/jline/test_CHIPS_scripts/obs_list.txt \ ##search for these obs
     --uvfits_dir=test_8dec \ ##within the obs, look for this sub-dir
     --output_dir=/fred/oz048/jline/test_CHIPS_scripts/CHIPS_outputs/ \ ##dump outputs here
     --output_tag=test_ozstar_chips \ ##name the outputs with this tag
     --band=high \ ##this is a high-band observation. CHIPS expects low or high
     --obs_range=0,3 \ ##process all three observations listed in obs_list.txt
     --no_run ##do not launch sbatch jobs; just check arguments and generate scripts

which will generate the following scripts, located in a new directory called logs_test_ozstar_chips :

Slurm scripts
$ ls logs_test_ozstar_chips ##Cleans up intermediate data products ##Grids the first observation ##Grids the second observation ##Grids the third observation ##Makes the XX power spectra ##Makes the YY power spectra 

if there are any errors in the input arguments, you should get some form of error message telling you what to do next. If this command runs find. To actually launch your jobs, remove the --no_run command. I usually put this all in a bash script, so you'd do something like:

Launching sbatch commands
$ more
source /fred/oz048/jline/software/chips/ \
     --cluster=ozstar \
     --obs_list=/fred/oz048/jline/test_CHIPS_scripts/obs_list.txt \
     --uvfits_dir=test_8dec \
     --output_tag=test_ozstar_chips \
     --output_dir=/fred/oz048/jline/test_CHIPS_scripts/CHIPS_outputs/ \
     --band=high --obs_range=0,3

$ source
Command run: sbatch --parsable
Job ID: 27145363
Command run: sbatch --parsable --dependency=afterok:27145363
Job ID: 27145364
Command run: sbatch --parsable --dependency=afterok:27145363:27145364
Job ID: 27145365
Command run: sbatch --parsable --dependency=afterok:27145363:27145364:27145365
Job ID: 27145366
Command run: sbatch --parsable --dependency=afterok:27145363:27145364:27145365
Job ID: 27145367
Command run: sbatch --parsable --dependency=afterok:27145366:27145366

which shows that you have launched a number of jobs, each with dependencies. The gridding must happen observation by observation (each of which is an array job), and you can't make the power spectra until you finished the gridding. Finally, the cleaning script should run after the power spectra step.

Debugging actual CHIPS runs: all the log outputs and error messages for this run will be output into logs_test_ozstar_chips , so if you jobs error, try checking the output logs and error messages located there. If everything runs fine, you can just delete that entire logs_test_ozstar_chips  directory (saves on the number of files quota).

Plotting the outputs

See (page to be written soon) for a full overview of the plotting commands available. But a quick example of how to make a 2D cross-power spectra using outputs of the OzStar example is below. Note the output tag for the files is a combination of the --output_tag and --uvfits_dir options that were fed to :

Simple 2D plot
source /fred/oz048/jline/software/chips/ \
    --basedir=/fred/oz048/jline/test_CHIPS_scripts/CHIPS_outputs/ \
    --polarisation='yy' \
    --chips_tag=test_8dec_test_ozstar_chips \
    --min_power=1e3 --max_power=1e15

this will produce a plot called chips2D_yy_test_8dec_test_ozstar_chips_crosspower.png which looks like this:

This is some random EoR1 data I found on OzStar so I have no idea of the quality or what peeling was done, but hey, it's a power spectrum!

  • No labels