Data Processing School :: Exercise 50
Source directory | /data/lofarschool/data/exercise 50 |
---|---|
Contact person | Joe Masters and Casey Law |
Context
This exercise demonstrates a simple tool for summarizing the data in a Measurement Set. The tool uses PyDAL, a library that allows one to use Python to interact with various kinds of data, especially Measurement Sets.
Prerequisite
A little knowledge of shell and python programming (or at least a curiosity to learn).
Description
This exercise is to familiarize you with how to run shell and python scripts that use the PyDAL. First, the user should run the script and study the output to understand the structure of the data. Second, the user should try to customize the bash and python scripts.
Files & Directories
The user will find three files in the data directory:
L2007_01810_SB18-20_OB20.MS
– dataset to studymsinfo.py
– python script that summarizes the MS inforun_script.sh
– bash script that runsmsinfo.py
Step-by-step instructions
1) Run “run_script.sh” and examine the output text. The information there can help you answer the following questions:
a) What year was this observation taken? b) Is this raw or processed data? c) How many subbands went into this MS?
2) Try running “msinfo.py” on a different measurement set (e.g., the data from the MeqTrees exercise). To do this you can modify “run_script.sh” or run the python script directly (the latter requires you to set the PYTHONPATH variable, however). How is the other Measurement Set different from the one given with this exercise?
3) Modify “msinfo.py” to print the DATA, CORRECTED_DATA, and MODEL_DATA for the *last* 10 integrations.
Example outputs
lioff025> ./run_script.sh PYTHONPATH = /app/usg/release/lib/python:/home/claw/bin::/app/usg_dal/lib/python/:/home/claw/tkp-code-repository/pipe/python-packages/:/app/pipeline/python64:/app/pipeline/python64/mirlib:/app/lofar/renting:.:/app/lofar/stable:/app/pyrap/lib Running: python ./msinfo.py L2007_01810_SB18-20_OB20.MS 1 Summary of UV data for L2007_01810_SB18-20_OB20.MS Phase center (deg): (-9.15026986482,58.8167346557) Frequency range (MHz): (64.9987792969, 64.9987792969) Wavelength range (m): (4.61227828035, 4.61227828035) Time range (MJD): (4681981850.0, 4682040303.92) s or 16.23719936 hrs Integrations, Time bin size: 978, 59.768832 s Channels, Width: 1, 143.432617188 kHz Polarizations: 4 Number of antennas: 16 ['CS010_dipole0' 'CS010_dipole4' 'CS010_dipole8' 'CS010_dipole12' 'CS001_dipole0' 'CS001_dipole4' 'CS001_dipole8' 'CS001_dipole12' 'CS008_dipole0' 'CS008_dipole4' 'CS008_dipole8' 'CS008_dipole12' 'CS016_dipole0' 'CS016_dipole4' 'CS016_dipole8' 'CS016_dipole12'] Data columns (first 10 ints, middle channel, xx poln): DATA [ 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j] CORRECTED_DATA [ 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j] MODEL_DATA [ 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j 0.+0.j]
Outstanding problems
Text has now been corrected - ER