Occasionally I've encountered line data that are taken in 4-IF mode - that is, where you have 2 IFs, each tuned to different frequencies, that overlap on their edges. I found these to be a pain to combine the last time I worked with them (in my first Astronomy research project ever!), and they have resurfaced again now.. but I've discovered a much easier solution: UJOIN!UJOIN takes a data set with 2 IFs tuned to different frequencies (as from 4-IF mode at the VLA), and joined them together. It even deals with re-weighting the overlap regions because now there's more data there! You will want to use UJOIN on data that has already been calibrated (gain AND bandpass).
Here are the inputs:
AIPS 1: UJOIN Converts IFs to additional spectral channels
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME ' ' Input UV file name (name)
AIPS 1: INCLASS ' ' Input UV file name (class)
AIPS 1: INSEQ 0 Input UV file name (seq. #)
AIPS 1: INDISK 0 Input UV file disk unit #
AIPS 1: OUTNAME ' ' Output UV file name (name)
AIPS 1: OUTCLASS ' ' Output UV file name (class)
AIPS 1: OUTSEQ 0 Output UV file name (seq. #)
AIPS 1: OUTDISK 1 Output UV file disk unit #.
AIPS 1: CHANSEL *all 0 Begin, end input channels,
AIPS 1: begin output channel each IF
AIPS 1: OPCODE ' ' 'DIFF' to output the vis
AIPS 1: difference in the overlap
AIPS 1: DOWEIGHT 1 0 => delete spectrum if any
AIPS 1: IF or channel is flagged
AIPS 1: < -0.5 => keep data even if
AIPS 1: one of the IFs is flagged
AIPS 1: > 0.5 => delete channel if
AIPS 1: one of the IFs is flagged
The main thing to set is CHANSEL. This is a 6-element array:
chansel(1) - first channel to use from IF 1
chansel(2) - last channel to use from IF 1
chansel(3) - output channel that corresponds to 1st input channel from IF 1 (ugh)
chansel(4) - first channel to use from IF 2
chansel(5) - last channel to use from IF 2
chansel(6) - output channel that corresponds to 1st input channel from IF 2 (ugh again)
The AIPS help file on UJOIN has some helpful information on how to set these values properly, but I will reproduce what I did to set these - it's not completely straightforward.
Using UJOIN on your own data
First, you should apply all your calibrations in SPLIT. Make sure that when you SPLIT off your science source, you keep BIF and EIF set to 0 - this will create a single source file with both IFs.
Then, you will need to figure out the frequency and reference pixel of each of your observations (f_1, p_1, f_2, p_2). I did this by SPLITting each IF off separately from the LINE data and then running IMHEAD on each. You should also record delta_f (from IMHEAD again - this should be the same for each IF). In my case, f_2 was bigger than f_1 - if this is different for you, you'll have some sign differences somewhere and CHANSEL will be in a different order.
Next, figure out if any of the channels in your IFs are on the edges of the bandpass. You will not want to keep these channels as they will add noise into the final, combined UV data. Typically, look at the region where the bandpass is flat-ish, and use that. To find these, you will want to use POSSM to take a quick look at your bandpass solutions for each antenna:
default possm
aparm = 0, 1, 0.7, 1.3, -180, 180, 0, 2, 0, 0
source [bpass calibrator]
solint -1
nplots 9
dotv 1
bpver 0
Find the first and last channels of the flat-ish region for each IF (n_first,1; n_last,1; n_first,2; n_last,2).
Now you can start setting CHANSEL with the first and last channels for IF 1:
chansel(1) = n_first,1 # first channel from flat-ish part of bpass, if 1
chansel(2) = n_last,1 # last channel from flat-ish part of bpass, if 1
chansel(3) = 1 # ichansel(1) goes into output channel 1
chansel(4) = n_first,2 # first channel from flat-ish part of bpass, if 2
chansel(5) = n_last,2 # last channel from flat-ish part of bpass, if 2
Now we move on to chansel(6), which is not nearly as easy as the above part was. Here you have to figure out which output channel corresponds to chansel(4). You'll have to take into consideration all the other ichansel values. Here is the equation I came up with for ichansel(6):
You can find the derivation at the end of this post if you're interested or getting incorrect answers. (As Martha Haynes once said, "You get what you pay for and this is free!")
As a reminder, here's what all of the variables stand for:
n = this is the value for ichansel(6)
f_1,0 = reference frequency of IF 1
f_2,0 = reference frequency of IF 2
delta_f = frequency steps between channels
n_first,1 = first channel of IF 1 used in output
n_first,2 = first channel of IF 2 used in output
p_1 = reference channel of IF 1
p_2 = reference channel of IF 2
Testing that UJOIN did the right thing
You'll probably want to check that this actually worked correctly. The UJOIN help recommends that you use POSSM to check that the spectrum of the phase calibrator is flat.
- First, SPLIT off the phase calibrator separately.
- Next, run UJOIN on this phase calibrator file with the same inputs as for the galaxy.
- Check that the spectrum of the UJOIN data is flat in POSSM:
default possm
aparm 0
solint 0
nplots 0
source [phase calibrator]
This should plot the phase calibrator spectrum with data from all antennas averaged together.
My derivation of the ichansel(6) equation:
To figure this out, I wrote some equations to find the frequency at a given channel (f1, f2):
These tell you the frequency (f_1, f_2) at an arbitrary channel (n_1, n_2) for each IF. f_1,0 tells you the frequency at reference pixel p_1 for IF 1. f_2,0 tells you the frequency at reference pixel p_2, for IF 2. delta_f is the frequency steps between each channel.
Now we can write an equation to for the frequency of the output channels:
We can sub in for f_out,0 because we know what channel we're setting as the first output channel (ichansel 1!), and we know its frequency from the above equation for f_1 (n_1) for IF 1:
Now we want to know what output channel (n) corresponds to the first channel of IF 2 (n_first,2). Where does this occur in f_out?
Now just rearrange that for n!
Monday, January 25, 2010
Joining Spectral Line Data with Multiple IFs
Posted by
Adrienne
at
12:50 PM
1 comments
Labels: spectral line
Tuesday, January 19, 2010
TV suddenly red?
Is your TV suddenly mis-behaving and showing everything in red rather than in black and white? Make sure that TVCHAN=1.
Posted by
amanda
at
10:57 AM
1 comments
Friday, January 8, 2010
IBLED error (related to the TV?)
Reader Ruta asks:
hi, i have come across an error message copied below while running task 'ibled' on a single source datafile. whats happening and why am i getting this error..? thanks in advance.
localh> IBLED1: Loading data for baseline 1 - 2
localh> IBLED1: Loading data from ***/12:00:53 to ***/11:54:54
localh> IBLED1: There are 25 valid vis. points on this baseline
localh> IBLED1: Loading AMPLITUDE
localh> IBLED1: with Stokes I chs 1- 1 IFs 1- 1
localh> IBLED1: Displaying pixels 1 to 35
localh> IBLED1: Data range 1.092369E+04 1.093816E+04
localh> IBLED1: VISLAB: ERROR 2 RETURNED FROM IMVECT
localh> IBLED1: IBFOAD: ERROR 2 FROM VISLAB
localh> IBLED1: LOADING ERROR 2 FROM IBFOAD
localh> IBLED1: TELEVISION I/O ERROR 2 FROM SETFRM
localh> IBLED1: Temporary master file to be destroyed
localh> IBLED1: Destroyed 1 extension files of type FC
localh> IBLED1: Destroyed UV image file: catno= 540 disk= 3
localh> IBLED1: Purports to die of UNNATURAL causes
localh> IBLED1: voodoo 31DEC09 TST: Cpu= 1.8 Real= 3 IO= 17
Does anyone have any ideas other than double-checking the parameters to make sure that they are correct?
Posted by
amanda
at
10:53 AM
0
comments
Tuesday, November 10, 2009
Heads Up! Inverted Axes for EVLA-VLA data..
I recently encountered an issue with one spectral line data set observed during the EVLA-VLA transition (like all my other data sets). So far, only this data set in particular is affected, but it could possibly apply to others if you notice this behavior. If you notice rotation that should not be there compared to other images, this may affect you!
Here are the weird things about this data set:
I spent a lot of time trying to figure out the cause of this and originally chalked it up to user error - i.e., something went wrong in the calibration, which gave the phases the opposite sign. Or so I thought.
Well! Turns out it was a bona fide problem with the EVLA transition, which inverted the velocity axis and gave the phase an incorrect sign. This has mostly been corrected in the archive, but is apparently still present in a few, lingering data sets. The fix for this is to use the task "FLOPM" on the data (after SPLIT) with opcode "VLAE".
Voila! Problem solved. Now if I could only get back the three weeks I spent banging my head against the proverbial AIPS wall.
Posted by
Adrienne
at
1:25 PM
0
comments
Labels: EVLA
IMERG SECRETS
IMERG is a program that combines single dish and interferometer data (see Stanimirovic (2002) for details on the algorithm). In short, this algorithm (also referred to as "feathering") fourier transforms both the single dish and the interferometer data, uses the overlap region in uv space between the interferometer and single dish data to determine a scaling factor for the single dish data, adds the interferometer image and the scaled single dish image in fourier space, and then fourier transforms it back.
IMERG has a couple of extra caveats that the user should be aware of before running:
- Both images need to be square and the dimensions a power of two.
- Make very sure there are no blanks in either image. Use REMAG to replace any blanks with zero. Note that OHGEO will blank any region in the transformed image that is outside the boundaries of the original image. One of the signs that you may have some blanks in your image is really small scaling factors (~1e-8).
- Make sure that the single dish image is big enough, i.e., make sure the galaxy is much smaller than the entire image.
Edit (11/13/09): As far as I can tell, IMERG does absolutely no checking that the two images have the same axes, so beware and double check that both images are the same. Also the beam that gets put in the resulting image is the single dish beam, not the interferometer beam. Use ADDBEAM to change.
Read more!
Posted by
amanda
at
7:00 AM
0
comments
Friday, November 6, 2009
Multi-frequency synthesis in AIPS?
(Edited based on re-reading the documentation this morning.)
Does any one here have experience with multi-frequency synthesis in AIPS? I've got a WSRT data set with 8 continuous IFs each with 64 channels. I'm currently setting
bif=1; eif=8
bchan=2; echan=50; nchav=49
in IMAGR.
I was going to run it through self-calibration as usual.(See the following post for details.) Is there anything else I need to do?
[Edited 11/11/09: See Michael Rupen's comment on this post for the answer.]
Posted by
amanda
at
4:54 PM
2
comments
Labels: imaging, multi-frequency synthesis
Friday, September 25, 2009
"Air Mass Chart" for Radio Observations?
A question that has plagued me for quite some time, as I prepare my EVLA proposal:
Do you all know of a tool to find the rise/set times and elevations of radio sources? My favorite tool for seeing the trajectory of an object through the sky is 'airchart' in IRAF, but unfortunately IRAF assumes you are an optical astronomer and only tracks your sources through the nighttime. Anyone know of something similar for all 24 hours? (the GMRT has one, but it assumes the GMRT's latitude, which is rather different than the VLA's).
Posted by
Laura
at
11:35 PM
10
comments
Labels: tips n' tricks
If you have a question about AIPS that CANNOT be answered by reading the