IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3069


Ignore:
Timestamp:
Jan 19, 2005, 10:26:04 PM (22 years ago)
Author:
Paul Price
Message:

Additions for Cycle 5:
Added psPlaneTransformInvert, psPlaneTransformCombine and psPlaneTransformFit.
Added psAstrometryReadWCS, psAstrometryWriteWCS, and psAstrometrySimplify.
Added additional modes to psImageInterpolateMode to deal with variances:

PS_INTERPOLATE_BILINEAR_VARIANCE, PS_INTERPOLATE_BICUBIC_VARIANCE, PS_INTERPOLATE_SINC_VARIANCE.

Added psImageTransform.

Location:
trunk/doc/pslib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/ChangeLogSDRS.tex

    r3067 r3069  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.56 2005-01-20 03:46:53 price Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.57 2005-01-20 08:25:45 price Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    426426    of \code{const psList} in \code{psListIteratorAlloc}.
    427427  \end{itemize}
    428 
    429 \end{itemize}
     428\item Added \code{psPlaneTransformInvert},
     429  \code{psPlaneTransformCombine} and \code{psPlaneTransformFit}.
     430\item Added \code{psAstrometryReadWCS}, \code{psAstrometryWriteWCS},
     431  and \code{psAstrometrySimplify}.
     432\item Added additional modes to \code{psImageInterpolateMode} to deal
     433  with variances: \code{PS_INTERPOLATE_BILINEAR_VARIANCE,
     434  PS_INTERPOLATE_BICUBIC_VARIANCE, PS_INTERPOLATE_SINC_VARIANCE}.
     435\item Added \code{psImageTransform}.
     436\end{itemize}
  • trunk/doc/pslib/psLibSDRS.tex

    r3067 r3069  
    1 %%% $Id: psLibSDRS.tex,v 1.167 2005-01-20 03:46:48 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.168 2005-01-20 08:25:55 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    27172717    PS_INTERPOLATE_BILINEAR,
    27182718    PS_INTERPOLATE_BICUBIC,
    2719     PS_INTERPOLATE_SINC
     2719    PS_INTERPOLATE_SINC,
     2720    PS_INTERPOLATE_BILINEAR_VARIANCE,
     2721    PS_INTERPOLATE_BICUBIC_VARIANCE,
     2722    PS_INTERPOLATE_SINC_VARIANCE
    27202723} psImageInterpolateMode mode;
    27212724\end{verbatim}
     2725
     2726The first four are fairly straightforward.  The last three, however,
     2727require some explanation.  When attempting to account for noise in a
     2728CCD image, it is customary to carry an additional image containing the
     2729variance for each pixel.  When operating on the CCD image (performing
     2730some transformation), we want to perform the same operation on the
     2731variance image, but the weights of the different input pixels
     2732contributing to the output pixel must be squared in order to propagate
     2733the noise (adding in quadrature).
    27222734
    27232735\begin{verbatim}
     
    27922804\code{psU16}, \code{psS8}, \code{psS16}, \code{psF32}, \code{psF64},
    27932805\code{psC32}, \code{psC64}.
     2806
     2807\begin{verbatim}
     2808psImage *psImageTransform(psImage *output, const psImage *input, const psImage *inputMask, int inputMaskVal,
     2809                          const psPlaneTransform *outToIn, const psImage *combineMask, int combineMaskVal);
     2810\end{verbatim}
     2811Transform the \code{input} image according the supplied
     2812transformation.  In the event that the \code{output} is \code{NULL},
     2813the smallest possible image capable of containing the entire
     2814transformed \code{input} image is to be returned; otherwise only the
     2815image size specified in the \code{output} image is to be used.  If the
     2816\code{inputMask} is not \code{NULL}, those pixels in the
     2817\code{inputMask} matching \code{inputMaskVal} are to be ignored in the
     2818transformation.  The \code{inputMask} must be of type \code{psU8}, and
     2819of the same size as the \code{input}, otherwise the function shall
     2820generate an error and return \code{NULL}.  The transformation
     2821\code{outToIn} specifies the coordinates in the input image of a pixel
     2822in the output image --- note that this is the reverse of what might be
     2823naively expected, but it is what is required in order to use
     2824\code{psImagePixelInterpolate}.  If \code{combineMask} is not
     2825\code{NULL}, then those pixels that match \code{combineMaskVal} are
     2826not transformed.  \code{combineMask} must be of type \code{psU8} and
     2827of the same size as the \code{output}, otherwise the function shall
     2828generate an error and return \code{NULL}.  This function must be
     2829capable of handling the following types for the \code{input} (with
     2830corresponding types for the \code{output}): \code{psF32},
     2831\code{psF64}.
     2832
    27942833
    27952834\subsubsection{Image Statistical Functions}
     
    45544593                             float mag, float color);
    45554594\end{verbatim}
     4595
     4596
     4597The following functions perform operations on transformations:
     4598
     4599\begin{verbatim}
     4600psPlaneTransform *psPlaneTransformInvert(psPlaneTransform *out, const psPlaneTransform *in, float xMin,
     4601                                         float xMax, float yMin, float yMax, int nSamples);
     4602psPlaneTransform *psPlaneTransformCombine(psPlaneTransform *out, const psPlaneTransform *trans1,
     4603                                          const psPlaneTransform *trans2);
     4604bool psPlaneTranformFit(psPlaneTransform *trans, const psArray *source, const psArray *dest, int nRejIter,
     4605                        float sigmaClip);
     4606\end{verbatim}
     4607
     4608\code{psPlaneTransformInvert} shall return the transformation that
     4609inverts the given transformation.  It may assume that the input
     4610transformation is one-to-one, and that the inverse transformation may
     4611be specified through using polynomials of the same type and order as
     4612the forward transformation.  In the event that the input
     4613transformation is linear, an exact solution may be calculated;
     4614otherwise \code{nSamples} samples in each axis, ranging from
     4615\code{xMin} to \code{xMax} and \code{yMin} to \code{yMax} shall be
     4616used as a grid to fit the best inverse transformation.  The function
     4617shall return \code{NULL} if it was unable to generate the inverse
     4618transformation; otherwise it shall return the inverse transformation.
     4619In the event that \code{out} is \code{NULL}, a new
     4620\code{psPlaneTransform} shall be allocated and returned.
     4621
     4622\code{psPlaneTransformSubsume} takes two transformations
     4623(\code{trans1} and \code{trans2}) and returns a single transformation
     4624that has the effect of performing \code{trans1} followed by
     4625\code{trans2}.  The function shall return \code{NULL} if it was unable
     4626to generate the transformation; otherwise it shall return the
     4627transformation.  \tbd{Not sure on the algorithm yet --- it may be the
     4628same as for \code{psPlaneTransformInvert}, in which case we will need
     4629the ranges and number of samples as well.}
     4630
     4631\code{psPlaneTransform} takes two arrays containing matched
     4632coordinates (i.e., coordinates the \code{source} correspond to the
     4633appropriate coordinates in the \code{dest}) and returns the
     4634best-fitting transformation.  The \code{source} and \code{dest} will
     4635contain \code{psCoord}s.  In the event that the number of coordinates
     4636in each is not identical, the function shall generate a warning, and
     4637extra coordinates in the longer of the two shall be ignored.  The
     4638\code{trans} transform may not be \code{NULL}, since it specifies the
     4639desired order, polynomial type and any polynomial terms to mask.
     4640\code{nRejIter} rejection iterations shall be performed, wherein
     4641coordinates lying more than \code{sigmaClip} standard deviations from
     4642the fit shall be rejected.
    45564643
    45574644\subsubsection{Celestial Coordinate Conversions}
  • trunk/doc/pslib/psLibSDRS_Astrom.tex

    r2502 r3069  
    694694\end{verbatim}
    695695Calculate the parallax factor for the given exposure.  \tbd{Why do we need this?}.
     696
     697
     698%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     699
     700\subsection{Astrometry and World Coordinate System}
     701
     702The FITS World Coordinate System (WCS) headers are commonly employed
     703with astronomical images in order to relate pixels to celestial (or
     704otherwise) coordinates.  Since it is a FITS standard, we must be able
     705to read and write from WCS into our internal format.  For the time
     706being, we will consider only celestial WCS (i.e., no spectral
     707wavelength calibrations, etc).  Because WCS does not support the
     708multiple layers that we have built for \PS{}, we will use a simple
     709internal representation: a transformation, which handles any
     710distortions (i.e., goes directly from the coordinate frame of the
     711image to the tangent plane); and the projection.
     712
     713The FITS WCS standard is described in Calabretta \& Greisen, A\&A,
     7142002, 395, 1077.  An extension to the standard, the TNX projection, is
     715described at \url{http://iraf.noao.edu/projects/ccdmosaic/tnx.html}.
     716This extension is in widespread use and must also be supported for
     717both reading and writing.
     718
     719\begin{verbatim}
     720bool psAstrometryReadWCS(psPlaneTransform **transform, // Output transformation
     721                         psProjection **projection, // Output projection
     722                         psMetadata *header // Input FITS header
     723                         );
     724bool psAstrometryWriteWCS(psMetadata *header, // Output FITS header
     725                          psPlaneTransform *transform, // Input transformation
     726                          psProjection *projection // Input projection
     727                          );
     728bool psAstrometrySimplify(psPlaneTransform **transform, // Output transformation
     729                          psProjection **projection, // Output projection
     730                          psCell *cell // Cell for which to generate transform and projection
     731                          );
     732\end{verbatim}                 
     733
     734\code{pmReadAstrometry} shall parse the specified FITS \code{header},
     735returning new instances of the \code{transform} and \code{projection}
     736that represent the WCS.  The function shall return \code{true} if it
     737was able to successfully generate the outputs; otherwise it shall
     738return \code{false}.
     739
     740\code{pmWriteAstrometry} shall add WCS keywords to the supplied FITS
     741\code{header} that implement the given \code{transform} and
     742\code{projection}.  The function shall return \code{true} if it was
     743able to successfully generate the output; otherwise it shall return
     744\code{false}.
     745
     746\code{pmSimplifyAstrometry} shall take a \code{cell} and simplify the
     747internal astrometric representation (\code{cell->toFPA} or equivalent,
     748\code{cell->parent->parent->toTangentPlane} and
     749\code{cell->parent->parent->grommit}) to a single \code{transform} and
     750\code{projection}.  This allows the subsequent use of
     751\code{pmWriteAstrometry} in the case that we have only the
     752multi-layered \PS{} internal astrometric representation.  The function
     753shall return \code{true} if it was able to successfully generate the
     754output; otherwise it shall return \code{false}.
     755
Note: See TracChangeset for help on using the changeset viewer.