Welcome to iraf.net Wednesday, February 21 2018 @ 01:32 AM GMT

Buglog #558 -- MSCIMAGE

  • Friday, March 30 2007 @ 06:10 PM GMT
  • Contributed by:
  • Views: 1,973
Bug Logs NUMBER: 558
MODULE: mscimage
SYSTEM: all release up to date
DATE: Fri Mar 30 11:04:18 MST 2007
FROM: valdes

BUG: MSCIMAGE defines the resampled output world coordinate system (WCS) using a reference image WCS. If this reference image has a ZPN projection an error will occur. This is because when the output WCS is set the ZPN projection is inherited from the reference image but MSCIMAGE does correctly setup the output ZPN projection from the reference image. So one must use a reference image with another projection such as TAN.

.....see story for remainder of buglog

What is confusing is that wcssource="parameters" implies that the output WCS is entirely defined by the task parameters. This is true for everything but the WCS projection type which is taken from the input image. There is no parameter to set the projection explicitly and the MSCIMAGE script would need to be edited to access the projection parameter in the underlying call to a hidden task MSCWTEMPLATE. MSCIMAGE automatically changes input projections of "tnx" and "zpx" (distorted projections) to "tan" since the point of MSCIMAGE is to resample to a simpler undistorted WCS. A change will be made to also do this for "zpn".

The workarounds when the input data uses ZPN are to use a reference image that doesn't have a ZPN WCS or edit mscsrc$mscimage.cl to change projection="" to projection="tan" in the call to MSCWTEMPLATE. The code change to MSCWTEMPLATE could also be made and the MSCRED package recompiled but this is a more complex process and users should contact iraf.net for help.

The recommendation for users with the most recent version of IRAF is to use the task imcoords.mkcwcs to create a reference WCS. This task creates a dataless image with the desired WCS. It is basically like defining the WCS using the MSCIMAGE parameters except you have control over the projection and the tangent position. The only thing that is less obvious is that you must set a reference pixel. When building a mosaic you might set this to be roughly in the middle of the field. For instance if the final image will be roughly 4Kx4K you might choose a reference pixel at (2100,2100).

If you don't have MKCWCS you can call MSCWTEMPLATE directly to do the same thing. Leave the input and reference image parameters empty, set wcssource="parameters" and fill in the parameters including the projection as "tan". This will leave the reference pixel at (0,0) so you would use HEDIT to set CRPIX1 and CRPIX2 to the desired point. Alternatively, you could make a list of all the extensions in the input and specify that as the input in MSCWTEMPLATE. This then does exactly what mscimage would do put give you access to the projection parameter. In other words making the reference image manually this way is equivalent to editing the mscimage.cl script.

STATUS: Future releases of MSCRED will convert input ZPN WCS to TAN WCS automatically.

Buglog #558 -- MSCIMAGE | 0 comments | Create New Account

The following comments are owned by whomever posted them. This site is not responsible for what they say.

Privacy Policy
Terms of Use

User Functions