Imaging tests with polynomial ephemerides for solar system bodies in casa
Note: As of casa 3.3, the task fixplanets can be used to fix the coordinates of bodies with (0,0) in the ms.
Problem
- ALMA data for solar system bodies is currently filled with (0,0) for RA, Dec. See CSV-600. This leads to errors in the UVW coordinates, and in the coordinate axes of images. We need a way to fix this for Early Science data, in case the problem is not resolved by then in the control system.
Data for tests
- Three calibrated .ms files each containing 5 minutes of data on Titan, separated by ~1 hour, recorded on April 22, 2011 at ALMA (kindly provided by cbrogan)
- No spectral lines are present in this spw, so it should provide a good continuum
- vis1 = 'Titan_spw0_one.ms' # (mean position of Titan = 12:49:28.603, -02:22:20.29)
- vis2 = 'Titan_spw0_two.ms' # (mean position of Titan = 12:49:27.448, -02:22:12.49)
- vis3 = 'Titan_spw0_three.ms' # (mean position of Titan = 12:49:26.337, -02:22:04.94)
- According to the SMA planetary calculator, the expected zero-spacing flux density at this date was 3.295 Jy at 356 GHz.
Procedure
- Checkout (via cvs to Chile) project21 which contains the directory: AIV/science/analysis_scripts/
- Start casapy-stable
- import analysisUtils as au
- Pick one .ms, and run the following commands which will compute the mean time of observation, download from JPL Horizons the corresponding J2000 coordinate and rate (i.e. the first-order polynomial) at this instant, and stuff these into the FIELD table. All images subsequently produced will show the source at the reference position computed in this step.
- fp = au.FixPosition(vis1)
- [polynomial,timestamp] = fp.setRADecJ2000FromJPL('Titan')
- fixvis(vis=vis1,outputvis=vis1fixed)
- for the other .ms, you must stuff in the same polynomial like so:
- fp = au.FixPosition(vis2)
- fp.setRADecJ2000FromPolynomial('Titan',polynomial,timestamp)
- fixvis(vis=vis2,outputvis=vis2fixed)
- fp = au.FixPosition(vis3)
- fp.setRADecJ2000FromPolynomial('Titan',polynomial,timestamp)
- fixvis(vis=vis3,outputvis=vis3fixed)
Test Plan
- Produce individual images of Titan for each .ms prior to any changes
- Produce individual images of Titan for each .ms after fixvis
- Produce combined image of first two.
- Produce combined image of all three.
- Produce combined image of second two.
- Compute S/N in the images, and list beamsizes
Results
Individual cleaned images (prior to FixPosition and fixvis)
clean(vis=vis1,imagename=imagename,
mode='mfs',calready=T,imagermode='csclean',
imsize=100,cell=['0.3arcsec'],spw='',
weighting='briggs',robust=0.5,
mask=[44,44,56,56],
interactive=F,threshold='5mJy',niter=100000)
- They all appear as nice point sources at the reference position for the individual .ms with varying beamshapes according to the snapshot uv coverage:
Individual cleaned images (after FixPosition and fixvis)
clean(vis=vis1fixed,imagename=imagename,
mode='mfs',calready=T,imagermode='csclean',
imsize=100,cell=['0.3arcsec'],spw='',
weighting='briggs',robust=0.5,
mask=[44,44,56,56],
interactive=F,threshold='5mJy',niter=100000)
- They all appear as nice point sources at the reference position for the individual .ms:
Simultaneous clean of Titan_spw0_one.fixvis.ms and Titan_spw0_two.fixvis.ms:
- I found that a pixel mask produced an error message, This should probably be put into a JIRA ticket:
2011-05-06 00:07:32 INFO VisSetUtil Normal robustness, robust = 0.5
2011-05-06 00:07:33 WARN CoordinateUtil::makeFrequencyMachine Unable to convert between the input and output SpectralCoordinates
2011-05-06 00:07:33 WARN CoordinateUtil::makeFrequencyMachine+ this probably means one is in the REST frame which requires
2011-05-06 00:07:33 WARN CoordinateUtil::makeFrequencyMachine+ the radial velocity - this is not implemented yet
2011-05-06 00:07:33 WARN CoordinateUtil::makeFrequencyMachine Unable to convert between the input and output SpectralCoordinates
2011-05-06 00:07:33 WARN CoordinateUtil::makeFrequencyMachine+ this probably means one is in the REST frame which requires
2011-05-06 00:07:33 WARN CoordinateUtil::makeFrequencyMachine+ the radial velocity - this is not implemented yet
2011-05-06 00:07:33 SEVERE image::setcoordsys Exception Reported: Failed to set conversion layer state
- Therefore, I had to clean interactively and manually draw a similar-sized box at the phase center. Here are the results. The image on the right is set to saturate at the 10% of the peak intensity in order to show the structure of the noise:
clean(vis=['Titan_spw0_one.fixvis.ms','Titan_spw0_two.fixvis.ms'],
imagename=imagename,
mode='mfs',calready=T,imagermode='csclean',
imsize=500,cell=['0.3arcsec'],spw='',
weighting='briggs',robust=0.5,
mask='',
interactive=T,threshold='5mJy',niter=100000)
Simultaneous clean of all three fixvis'd .ms
- Here the image continues to improve:
clean(vis=['Titan_spw0_one.fixvis.ms','Titan_spw0_two.fixvis.ms','Titan_spw0_three.fixvis.ms'],
imagename=imagename,
mode='mfs',calready=T,imagermode='csclean',
imsize=500,cell=['0.3arcsec'],spw='',
weighting='briggs',robust=0.5,
phasecenter=phasecenter,
mask='',
interactive=T,threshold='5mJy',niter=100000)
Simultaneous clean of latter two fixvis'd .ms:
- Here we see that the object still appears at the same reference position, even though the data for the first .ms is not included (as expected):
Table of results
- The image rms before and after fixing the coordinates is essentially unchanged. At 12h -22d, this source is essentially opposite in the sky from 0h, 0d, so the expected error in the UVW coordinates is small.
- The image rms improves when 2 or 3 datasets are combined.
- For vis12, we naively expect 5.4e-3 if you add the image rms of the two component datasets in quadrature
- For vis123, we similarly expect 4.2e-3
- But with this poor uv coverage, we may not expect the rms to improve quite as fast as expected
Image |
Peak (Jy/beam) |
rms noise (mJy) |
S/N |
Beam size |
vis1 |
3.1422 |
9.0318 |
348 |
2.196 x 1.746 at -47.97 deg |
vis2 |
3.0992 |
6.7187 |
461 |
1.926 x 1.602 at +176.67 deg |
vis3 |
3.1057 |
6.5744 |
472 |
1.987 x 1.615 at +21.39 deg |
vis1fixed |
3.1422 |
8.9509 |
351 |
2.196 x 1.746 at -47.97 deg |
vis2fixed |
3.0992 |
6.6683 |
465 |
1.926 x 1.601 at +176.67 deg |
vis3fixed |
3.1056 |
6.6822 |
465 |
1.987 x 1.615 at +21.39 deg |
vis12fixed |
3.1243 |
5.7789 |
541 |
1.943 x 1.803 at -177.05 deg |
vis23fixed |
3.1073 |
5.8321 |
533 |
1.825 x 1.661 at +16.62 deg |
vis123fixed |
3.1199 |
4.7779 |
653 |
1.892 x 1.760 at +38.65 deg |
--
ToddHunter