Variables | |
string | prefix |
Clear out previous run results. | |
string | msfile |
string | concatvis |
N4826 - BIMA SONG Data 16apr98 source=ngc4826 phasecal=1310+323 fluxcal=3c273, Flux = 23 Jy on 16apr98 passcal= none - data were observed with online bandpass correction. | |
string | freqtol |
string | vis |
TUTORIAL NOTES: | |
tuple | spwid |
string | averagemode |
16 APR Calibration | |
string | selectplot |
tuple | user_check |
Plot calibration. | |
string | spw |
Flag end channels. | |
string | timerange |
string | comment |
Some example clean-up editing Slightly high almost-edge channel in field='1', spw='4' (channel 2) can be flagged interactively with plotxy. | |
string | field |
CALIBRATION. | |
string | refant |
string | solint |
string | fluxtable |
Transfer the flux density scale: | |
string | reference |
float | gaincurve |
string | gaintable |
list | spwmap |
string | outputvis |
Check calibrated data. | |
string | datacolumn |
string | imagename |
print '--Clearcal (split data)--' | |
list | cell |
string | mode |
Manually correct for mosaic response pattern using .image/.flux images. | |
string | psfmode |
float | cyclefactor |
float | minpb |
tuple | srcstat |
Statistics on clean image cube. | |
tuple | offstat |
tuple | offlinestat |
string | expr |
tuple | pbcorstat |
Statistics on PBcor image cube. | |
tuple | pbcoroffstat |
tuple | pbcorofflinestat |
string | momfile |
Do zeroth and first moments. | |
string | momzeroimage |
string | momoneimage |
int | moments |
string | chans |
string | outfile |
tuple | momzerostat |
Statistics on moment images. | |
tuple | momonestat |
list | im_srcmax16 |
An alternative is to mask the pbcor image before calculating moments. | |
list | im_offrms16 |
list | im_offlinerms16 |
list | thistest_immax |
list | thistest_imrms |
string ngc4826_tutorial.averagemode |
16 APR Calibration
List contents of MS Plotting and Flagging
The plotxy task is the interactive x-y display and flagging GUI
Definition at line 331 of file ngc4826_tutorial.py.
Definition at line 732 of file ngc4826_tutorial.py.
string ngc4826_tutorial.chans |
Definition at line 852 of file ngc4826_tutorial.py.
string ngc4826_tutorial.comment |
Some example clean-up editing Slightly high almost-edge channel in field='1', spw='4' (channel 2) can be flagged interactively with plotxy.
plotxy(vis='ngc4826.tutorial.ms', xaxis='channel',yaxis='amp',field='1',spw='4', averagemode='vector',timebin='1e7',crossscans=True, selectplot=True,newplot=False,title='Field 1 SPW 4')
Use Flagmanager to save a copy of the flags so far
Definition at line 441 of file ngc4826_tutorial.py.
string ngc4826_tutorial.concatvis |
N4826 - BIMA SONG Data 16apr98 source=ngc4826 phasecal=1310+323 fluxcal=3c273, Flux = 23 Jy on 16apr98 passcal= none - data were observed with online bandpass correction.
NOTE: This data has been filled into MIRIAD, line-length correction done, and then exported as separate files for each source. 3c273 was not line length corrected since it was observed for such a short amount of time that it did not need it.
From miriad: source Vlsr = 408; delta V is 20 km/s
Import and concatenate sources
USB spectral windows written separately by miriad for 16apr98 Assumes these are in sub-directory called "fitsfiles" of working directory
Definition at line 143 of file ngc4826_tutorial.py.
Definition at line 735 of file ngc4826_tutorial.py.
string ngc4826_tutorial.datacolumn |
Definition at line 666 of file ngc4826_tutorial.py.
string ngc4826_tutorial.expr |
Definition at line 810 of file ngc4826_tutorial.py.
string ngc4826_tutorial.field |
CALIBRATION.
Correct the calibrater/target source data: Use new parm spwmap to apply gain solutions derived from spwid1 to all other spwids...
Bandpasses are very flat because of observing mode used (online bandpass correction) so bandpass calibration is unecessary for these data.
Derive gain calibration solutions. We will use VLA-like G (per-scan) calibration:
Set the flux density of 3C273 to 23 Jy
Gain calibration
Definition at line 489 of file ngc4826_tutorial.py.
string ngc4826_tutorial.fluxtable |
Transfer the flux density scale:
Definition at line 506 of file ngc4826_tutorial.py.
string ngc4826_tutorial.freqtol |
Definition at line 144 of file ngc4826_tutorial.py.
Definition at line 555 of file ngc4826_tutorial.py.
string ngc4826_tutorial.gaintable |
Definition at line 556 of file ngc4826_tutorial.py.
Definition at line 988 of file ngc4826_tutorial.py.
Definition at line 987 of file ngc4826_tutorial.py.
An alternative is to mask the pbcor image before calculating moments.
The following block shows how to do this.
Now show how to print out results
Definition at line 986 of file ngc4826_tutorial.py.
string ngc4826_tutorial.imagename |
print '--Clearcal (split data)--'
You might image the calibrater data:
print '--Clean (1310+323)--' default('clean')
clean(vis='ngc4826.tutorial.16apr98.1310+323.split.ms', imagename='ngc4826.tutorial.16apr98.cal.clean', cell=[1.,1.],imsize=[256,256], field='0',spw='0~7',threshold=10., mode='mfs',psfmode='clark',niter=100,stokes='I')
IMAGING OF NGC4826 MOSAIC
Mosaic field spacing looks like: F3 (field 3) F2 (field 2)
F4 (field 4) F0 (field 0) F1 (field 1)
F5 (field 5) F6 (field 6)
4x64 channels = 256 channels
Primary Beam should be about 1.6' FWHM (7m dishes, 2.7mm wavelength) Resolution should be about 5-8"
Image the target source mosaic:
Definition at line 730 of file ngc4826_tutorial.py.
float ngc4826_tutorial.minpb |
Definition at line 736 of file ngc4826_tutorial.py.
string ngc4826_tutorial.mode |
Manually correct for mosaic response pattern using .image/.flux images.
Definition at line 733 of file ngc4826_tutorial.py.
Definition at line 851 of file ngc4826_tutorial.py.
string ngc4826_tutorial.momfile |
Do zeroth and first moments.
NGC4826 LSR velocity is 408 km/s; delta is 20 km/s
Definition at line 844 of file ngc4826_tutorial.py.
string ngc4826_tutorial.momoneimage |
Definition at line 846 of file ngc4826_tutorial.py.
Definition at line 898 of file ngc4826_tutorial.py.
Definition at line 845 of file ngc4826_tutorial.py.
Statistics on moment images.
Definition at line 892 of file ngc4826_tutorial.py.
string ngc4826_tutorial.msfile |
Definition at line 52 of file ngc4826_tutorial.py.
Definition at line 795 of file ngc4826_tutorial.py.
tuple ngc4826_tutorial.offstat |
Definition at line 787 of file ngc4826_tutorial.py.
string ngc4826_tutorial.outfile |
Definition at line 853 of file ngc4826_tutorial.py.
string ngc4826_tutorial.outputvis |
Check calibrated data.
Pause script if you are running in scriptmode user_check=raw_input('Return to continue script
')
SPLIT THE DATA INTO SINGLE-SOURCE MS AND THEN IMAGE THE CALIBRATOR
Split out calibrated target source and calibrater data:
Definition at line 652 of file ngc4826_tutorial.py.
Definition at line 828 of file ngc4826_tutorial.py.
Definition at line 823 of file ngc4826_tutorial.py.
Statistics on PBcor image cube.
Definition at line 819 of file ngc4826_tutorial.py.
string ngc4826_tutorial.prefix |
Clear out previous run results.
Definition at line 51 of file ngc4826_tutorial.py.
string ngc4826_tutorial.psfmode |
Definition at line 734 of file ngc4826_tutorial.py.
string ngc4826_tutorial.refant |
Definition at line 490 of file ngc4826_tutorial.py.
string ngc4826_tutorial.reference |
Definition at line 507 of file ngc4826_tutorial.py.
string ngc4826_tutorial.selectplot |
Definition at line 332 of file ngc4826_tutorial.py.
string ngc4826_tutorial.solint |
Definition at line 491 of file ngc4826_tutorial.py.
string ngc4826_tutorial.spw |
Flag end channels.
Definition at line 394 of file ngc4826_tutorial.py.
tuple ngc4826_tutorial.spwid |
Definition at line 218 of file ngc4826_tutorial.py.
Definition at line 557 of file ngc4826_tutorial.py.
tuple ngc4826_tutorial.srcstat |
Statistics on clean image cube.
Definition at line 781 of file ngc4826_tutorial.py.
Definition at line 989 of file ngc4826_tutorial.py.
Definition at line 990 of file ngc4826_tutorial.py.
string ngc4826_tutorial.timerange |
Definition at line 405 of file ngc4826_tutorial.py.
Plot calibration.
NOTE: mosaic data ...Sault weighting implies a noise unform image.
NOTE: that niter is set to large number so that stopping point is controlled by threshold. NOTE: with pbcor=False, the final image is not "flux correct", instead the image has constant noise despite roll off in power as you move out from the phase center(s). Though this format makes it "look nicest", for all flux density measurements, and to get an accurate integrated intensity image, one needs to divide the srcimage.image/srcimage.flux in order to correct for the mosaic response pattern. One could also achieve this by setting pbcor=True in clean.
Do interactive viewing of clean image
Definition at line 336 of file ngc4826_tutorial.py.
string ngc4826_tutorial.vis |
TUTORIAL NOTES:
You can invoke tasks in two ways:
(1) As function calls with arguments as shown above for concat and used extensively in this script, e.g.
task( par1=val1, par2=val2, ... )
with parameters set as arguments in the call. Note that in this case, the global parameter values are NOT used or changed, and any task parameters that are not specified as arguments to the call will be defaulted to the task-specific default values (see the "help task" description).
(2) By setting the values of the global parameters and then using the "go" command (if taskname is set) or calling the task with no arguments. For example:
default task par1 = val1 par2 = val2 ... inp task()
In this case, the "default" command sets the parmeters to their task defaults, and sets the "taskname" paramter to the task to be run. The "inp" command displays the current values for the task parameters. Then the call with no arguments runs with the globals.
Warning: "go" does not work inside scripts. See Cookbook.
Using the concat call above as an example, we would do:
default('concat')
vis = ['ngc4826.tutorial.3c273.5.ms', 'ngc4826.tutorial.3c273.6.ms', 'ngc4826.tutorial.3c273.7.ms', 'ngc4826.tutorial.3c273.8.ms', 'ngc4826.tutorial.1310+323.ll.9.ms', 'ngc4826.tutorial.1310+323.ll.10.ms', 'ngc4826.tutorial.1310+323.ll.11.ms', 'ngc4826.tutorial.1310+323.ll.12.ms', 'ngc4826.tutorial.1310+323.ll.13.ms', 'ngc4826.tutorial.1310+323.ll.14.ms', 'ngc4826.tutorial.1310+323.ll.15.ms', 'ngc4826.tutorial.1310+323.ll.16.ms', 'ngc4826.tutorial.ngc4826.ll.5.ms', 'ngc4826.tutorial.ngc4826.ll.6.ms', 'ngc4826.tutorial.ngc4826.ll.7.ms', 'ngc4826.tutorial.ngc4826.ll.8.ms']
concatvis='ngc4826.tutorial.ms' freqtol = "" dirtol = "1arcsec" async=False
Fix up the MS (temporary, changes to importfits underway)
Definition at line 216 of file ngc4826_tutorial.py.