Status: offline
Registered: 08/23/2007
Posts: 13
|
Hello,I am endeavouring to use MSCRED for the coordinate refinement and stacking of wide-field mosaic images obtained with the IMACS camera on Magellan.I have a WCS solution from star fields. This particular solution is expressed as a 3rd-order polynomial ("half" terms only in IRAF parlance), so it includes distortion corrections. It looks like this:RA = RA,c + Sum(Amn * x^m * y^n), m+n<=3
dec = dec,c + Sum(Bmn * x^m * y^n)where x and y are relative to the central pixel in each chip and [RA,c; dec,c] is the coordinate of the field center. The A00 [B00] term in the above polynomial expresses the offset from RA,c [dec,c] to each chip center.I have tried to convert this way of expressing the WCS into the TNX projection through the following procedure:(1) I excise the linear part of the solution. This becomes the following header keywords for each chip:CRVAL1 = RA,c + A00
CRPIX1 = 1024 (the central pixel of the chip in the x-direction)
CD1_1 = A10
CD1_2 = A01and so on.(2) I use the remaining non-linear parts of the solution as inputs to the distortion correction. These become parts of the WATi_jjj terms (where the linear parts of the distortion term are set to 0.0). This involves a change of coordinates and some algebraic manipulation, since the distortion corrections in the TNX projection are a function of the linearly transformed coordinates, not the original x and y. But this is computationally trivial (though a little time-consuming).(3) I then add the header keywords manually with HEDIT.This seems fairly reasonable, and when I input the resulting image into DS9 it at least reads the linear part of the WCS properly.My uncertainty is whether or not the MSCRED tasks will take this "shoehorned" WCS and interpret it properly. My major concern is the following:Is the fact that the distortion solution for each chip is referenced to the chip center rather than the field center going to be a problem? In other words, from what I can tell through on-line docs, images from NOAO's Mosaic camera have the same CRVAL's for each chip, and the CRPIX's vary. Thus, the distortion solutions are relative to the field center. This is not the case for my solutions, as I have described above. Unfortunately, I do not know the precise pixel gaps between chips and so converting between these two ways of expressing the reference point would be difficult.There is a less worrisome concern about the zeros for the linear term of the distortion correction, but I don't think this is a problem (?).I'd be grateful if anyone could shed light on these issues.Best wishes,
Dave Rupke
|
Status: offline
Registered: 11/11/2005
Posts: 728
|
Hi Dave,Rather than trying to analytically figure out coefficients I suggest the following method. Use the function you are starting with and evaluate it on a grid of pixel values that span each image, typically the grid would include the end pixels. The result is a text file of pixel and ra/dec values. Then use CCMAP to compute the new WCS. You could do this interactively but since this is a well constrained problem it could be done blindly. You should use "pixsystem=physical" for technical reasons I can explain if needed. You then can use either MSCSETWCS or CCSETWCS to convert the database solution to the image header. MSCSETWCS has the feature of handling MEF files and using the database for the distortion terms but setting the pointing (CRVALs) to a particular place. This is what would be done to have one solution apply to many exposures.When doing the CCMAP you should indeed use the same reference point for all CCDs and it should be roughly in the center of the field of view of the MOSAIC. It is ithe case that some tools assume all the CCDs have the same tangent point, in particular MSCSETWCS assumes this.The approach of creating a grid and then doing a non-interactive CCMAP or
GEOMAP fit is a common method in IRAF scripts. For instance, MSCWCS does this to apply rotations, etc. to a non-linear WCS because it is difficult to analytically adjust coefficients for specific transformations.If you are experienced with IRAF scripts you could develop one that automatically takes your starting WCS and generates a TNX WCS.I hope this helps.Yours,
Frank Valdes
|