.TH MTANHDR 1 "Dec 2016" "Montage 5" "Montage" .SH NAME mTANHdr \- Determine if there would be an equivalent distorted TAN projection .SH SYNOPSIS mTANHdr [\-d] [\-o \fIorder\fP][\-i \fImaxiter\fP][\-t \fItolerance\fP][\-s \fIstatusfile\fP] orig.hdr new.hdr .SH DESCRIPTION Analyzes a template file and determines if there would be an adequate equivalent distorted TAN projection, within a specified tolerance, and outputs the alternate header. This header can be used in conjunction with \fBmProjectPP\fP to produce a TAN plane image. This process is considerably faster than projecting with the general purpose tool \fBmProject\fP. .PP The output header is a FITS header template containing a TAN projection with polynomial focal plane distortions. (Link to an example output header) .PP \fBmTANHdr\fP is most suitable for projections which can be approximated by tangent-plane projections (TAN, SIN, ZEA, STG, ARC), and is also therefore not suited for images covering large portions of the sky. .SH OPTIONS .TP \-d Print additional debugging information to stdout. .TP \-o \fIorder\fP Order of output header polynomial focal plane distortions (default = 4) .TP \-i \fImaxiter\fP Maximum number of iteration attempts to produce header (default = 50) .TP \-t \fItolerance\fP Distortion tolerance value for acceptable output (default = 0.01) .TP \-s \fIstatusfile\fP Output and errors are written to \fIstatusfile\fP instead of stdout. .SH ARGUMENTS .TP orig.hdr Input FITS header .TP new.hdr Path to output header to be created .SH RESULT \fB[struct stat="OK", fwdxerr=\fIfwdxerr\fP, fwdyerr=\fIfwdyerr\fP, fwditer=\fIiter\fP, revxerr=\fIrevxerr\fP, revyerr=\fIrevyerr\fP, reviter=\fIreviter\fP]\fP .PP where \fIfwdxerr\fP and \fIfwdyerr\fP are the maximum errors along each axis found when projecting from the original image to the distorted header; \fIrevxerr\fP and \fIrevyerr\fP are the maximum errors along each axis found when projecting from the distorted header back to the original header; and \fIfwditer\fP and \fIreviter\fP are the number of iterations required in each direction to converge on a solution. .SH MESSAGES .TP OK [struct stat="OK", fwdxerr=\fIfwdxerr\fP, fwdyerr=\fIfwdyerr\fP, fwditer=\fIiter\fP, revxerr=\fIrevxerr\fP, revyerr=\fIrevyerr\fP, reviter=\fIreviter\fP] .TP ERROR \-i (iterations) argument .TP ERROR \-o (order) argument .TP ERROR \-t (tolerance) argument .TP ERROR Cannot open status file: \fIstatusfile\fP .TP ERROR Cannot open output template file \fInew.hdr\fP .TP ERROR All points offscale in forward transform .TP ERROR All points offscale in reverse transform .TP ERROR Bad template: \fIorig.hdr\fP .TP ERROR Output wcsinit() failed. .TP ERROR Singular Matrix-1 .TP ERROR Singular Matrix-2 .TP ERROR Allocation failure in ivector() .SH EXAMPLES .TP $ mTANHdr input/SIN_1.hdr alternate.hdr [struct stat="OK", fwdxerr=4.31068e-05, fwdyerr=4.42599e-05, fwditer=4, revxerr=1.22123e-05, revyerr=1.19694e-05, reviter=4] .PP The output header is a FITS header template containing a TAN projection with polynomial focal plane distortions: alternate.hdr .SH BUGS The drizzle algorithm has been implemented but has not been tested in this release. .PP If a header template contains carriage returns (i.e., created/modified on a Windows machine), the cfitsio library will be unable to read it properly, resulting in the error: [struct stat="ERROR", status=207, msg="illegal character in keyword"] .PP It is best for the background correction algorithms if the area described in the header template completely encloses all of the input images in their entirety. If parts of input images are "chopped off" by the header template, the background correction will be affected. We recommend you use an expanded header for the reprojection and background modeling steps, returning to the originally desired header size for the final coaddition. The default background matching assumes that there are no non-linear background variations in the individual images (and therefore in the overlap differences). If there is any uncertainty in this regard, it is safer to turn on the "level only" background matching (the "\-l" flag in mBgModel. .SH COPYRIGHT 2001-2015 California Institute of Technology, Pasadena, California .PP If your research uses Montage, please include the following acknowledgement: "This research made use of Montage. It is funded by the National Science Foundation under Grant Number ACI-1440620, and was previously funded by the National Aeronautics and Space Administration's Earth Science Technology Office, Computation Technologies Project, under Cooperative Agreement Number NCC5-626 between NASA and the California Institute of Technology." .PP The Montage distribution includes an adaptation of the MOPEX algorithm developed at the Spitzer Science Center.