[daip] AIPS rotation question

Eric Greisen egreisen at NRAO.EDU
Wed Jan 16 15:31:57 EST 2008


Vincent Fish writes:
 > I'm trying to take a model image (FITS file), rotate it 90 degrees in 
 > the plane of the sky, and continue working with it in AIPS.  How do I do 
 > this in a way that makes sense to AIPS?  I will refer to the following 
 > data reduction pathways, where the input FITS file and adverbs to CONVL 
 > and UVCON are identical for the two runs:
 > 
 >    FITS image -->           CONVL --> UVCON
 >    FITS image --> OGEOM --> CONVL --> UVCON
 > 
 > I've tried using the task OGEOM, APARM(3)=90.  The resulting image 
 > is indeed apparently rotated, as can be seen with TVALL.  However, 
 > clearly there's some internal bookkeeping going on in AIPS that records 
 > the coordinate transformation, because after rotation via OGEOM, TVLABEL 
 > puts "Right Ascension" on the y-axis and "Declination" on the x-axis, 
 > rather than putting them in their usual places.  (For purposes of this 
 > experiment, I do not want the axes to be rotated as well.)

   The bookkeeping is not hideen at all.  Say IMHEADER and you will
see all the aips knows about things and, yes, it tries very hard to
keep track of real coordinates even when the view is rotated.

   What you want to do is TRANS w TRANSCODE='21' and then a bunch of
PUTHEADs or AXDEFINEs to put the coordinates back to the "normal"
order.

   I suspect that UVCON can be fooled by what you are doing although
it should not be.  The mainstream routines that use modeling, e.g.
IMAGR, CALIB, UVSUB are not fooled by rotation even of odd arbitrary
angles with different rotation in the uv data and the image.  But they
must work to avoid being fooled.

    You will be better off not rotating but becoming familiar with an
aips header and ways to manipulate it.

Eric Greisen


 > 
 > Next I run CONVL on the images to convolve them with a Gaussian 
 > specified by BMAJ, BMIN, and BPA (same for both the unrotated and 
 > rotated images).  The resulting output on the rotated image is not as 
 > desired.  For instance, if I set BMAJ large and BPA to 80 deg E of N, I 
 > get elongated stripes mostly left-right in the unrotated image and 
 > up-down in the rotated image.  Note that both directions correspond 
 > approximately to the direction that AIPS thinks is right ascension.
 > 
 > But now when I run the two CONVL'ed image files through UVCON 
 > (noiseless, CMODEL 'IMAG'), I get different data.  If UVCON acted like 
 > CONVL and had access to some "hidden variable" that kept track of image 
 > rotation, one would expect the two output UV data sets to be identical.
 > 
 > So, how do I do image rotation properly in AIPS so that the axes don't 
 > get rotated along with the model image?  Is there another task I can use 
 > besides OGEOM, or an option I can set that won't rotate the axes as 
 > well?  It seems that the tasks CONVL and UVCON do not act consistently 
 > with each other in how they treat such an image.
 > 
 > I strongly suspect that I can get the UV data that I want for this 
 > experiment by adding 90 degrees to BPA when I run CONVL on the 
 > OGEOM-rotated image file, and then running it through UVCON with the 
 > same parameters I use for an unrotated model.  Is this correct?
 > 
 > Eric: I'm sending this to you because I figure that you know about how 
 > AIPS internally handles coordinate transformations, but it's possible 
 > that this message should be sent to Leonia as well.
 >  							Vincent




More information about the Daip mailing list