IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5359


Ignore:
Timestamp:
Oct 18, 2005, 4:07:17 AM (21 years ago)
Author:
eugene
Message:

added astrometry matching tools, fringes

Location:
trunk/doc/modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/modules/CameraImages.tex

    r5030 r5359  
    724724output; otherwise it shall return \code{false}.
    725725
     726\subsection{Astrometry Fitting Support Routines}
     727
     728Astrometry is performed on an astronomical image after a collection of
     729sources in the image have been detected and thier instrumental
     730positions have been measured.  In this collection of tools, the
     731coordinates should be measured in the frame of the \code{pmReadout}
     732portion of the Image Hierarchy.  This potentially allows us to measure
     733an astrometric transformation resulting from the transformation to any
     734of the other coordinate system.  For example, it might be necessary to
     735determine the coordinates of the \code{psReadout} pixels relative to
     736the \code{psCell} (rather accept the relationship defined by the
     737metadata). 
     738
     739For the moment, we define two layers of astrometric analysis which
     740will be performed on typical mosaic images in the Pan-STARRS IPP:
     741per-chip astrometry and per-mosaic astrometry.  In the first case, a
     742collection of detections across a single chip are used to determine a
     743basic, linear transformation to celestial coordinates.  This
     744astrometric analysis can be used to determine an initial, approximate
     745astrometry for each chip in a mosaic camera, with accurcy limited by
     746the effects of optical distortion (a few pixels error, typically).  In
     747the second case, a collection of detectors on a collection of chips
     748from a mosaic camera are used to measure the position of the telescope
     749boresite, the camera rotation, the impact of distortion from the
     750telescope optics, and the chip-to-focal plane transformation resulting
     751from chip placement errors or possible detector tilts or warps. 
     752
     753The process of performing astrometry involves the following steps:
     754\begin{itemize}
     755\item Make an initial guess at the celestial coordinates of the raw
     756  detections (eg, from metadata or image header information).
     757\item Determine, and load, stars from an astrometric catalog which may
     758  potentially correspond to the raw detections.
     759\item Project both raw and reference stars to a common coordinate
     760  frame (here we use the Focal Plane as an appropriate coordinate
     761  system).
     762\item Identify matches between the raw and reference stars.
     763\item Determine the transformations necessary to relate the
     764  coordinates of the two sets of stars.
     765\item Convert the measured transformations into appropriate terms in
     766  the astrometric elements of the Image Hierarchy.
     767\end{itemize}
     768In this section, we specify several functions which together make
     769possible the above analysis steps. 
     770
     771We define the following structure to carry the necessary information
     772about each detection. 
     773\begin{datatype}
     774typedef struct {
     775    double X, Y;
     776    double P, Q;
     777    double L, M;
     778    double R, D;
     779    double Mag;
     780} pmAstromObj;
     781\end{datatype}
     782This structure specifies the coordinate of the detection in each of
     783the four necessary coordinate frames: \code{X,Y} define the position
     784in the \code{psReadout} frame, \code{P,Q} define the position in the
     785\code{psChip} frame, \code{L,M} define the position in the
     786\code{psFPA} frame, \code{R,D} define the position on the Celestial
     787Sphere.  \tbd{re-write using psPlane and psSphere?}.  In addition, a
     788measurement of the brightness is given by the element \code{Mag}.
     789Such a data structure should be used for both the raw and the
     790reference stars.  In astrometric processing, the raw detections will
     791be projected using the best available information to each of these
     792coordinate frames from the \code{X,Y} coordinates, while the reference
     793detections will be projected to the other frames from the \code{R,D}
     794coordinates.
     795
     796The raw detections and the reference stars are both projected to a
     797common coordinate frame for analysis.  In these modules, we
     798principally use the Focal Plane for this reference frame.  After
     799projection to the common frame, it is necessary to determine the match
     800between corresponding objects in the two lists.  In order to match the
     801raw detections to the reference stars, different methods are used
     802depending on the circumstance. 
     803
     804If the two sets of coordinates are expected to agree very well (ie,
     805the current best-guess astrometric solution is quite close to the
     806'true' astrometric solution), then it is possible to use the simplest
     807matching process: cross-correlation within a fixed radius.  The
     808following function accepts two sets of \code{pmAstromObj} sources and
     809determines the matched objects between the two lists.  The input
     810sources must have been projected to the Focal Plane coordinates
     811(\code{pmAstromObj.P,Q}), and the supplied \code{config} entry must
     812contain the desired match radius (keyword:
     813\code{ASTROM_MATCH_RADIUS}).  The output consists an array of
     814\code{pmAstromMatch} values, defined below.
     815
     816\begin{prototype}
     817psArray *pmAstromRadiusMatch (psArray *st1, psArray *st2, pmAstromOpt *opt);
     818\end{prototype}
     819
     820\begin{datatype}
     821typedef struct {
     822    int i1;
     823    int i2;
     824} pmAstromMatch;
     825\end{datatype}
     826The \code{pmAstromMatch} structure defines the cross-correlation
     827between two arrays.  An single such data item specifies that item
     828number \code{pmAstromMatch.i1} in the first list corresponds to
     829\code{pmAstromMatch.i2} in the second list. 
     830
     831If the two sets of coordinates are not known to agree well, a somewhat
     832different approach is needed.  Several algorithms have been defined in
     833the past to correlate two lists with unknown offsets, and potentially
     834unknown relative rotations and scaling.  One well-known method is the
     835triangle-match algorithm which searches for similar triangles observed
     836in the two lists.  This algorithm has the advantage of not requiring
     837the rotation or the scale to be well-known in advance.  The
     838disadvantage of the triangle match algorithm is that it is necessarily
     839an $O(N^3)$ process since it is necessary to construct a substantial
     840fraction of all possible triangles for both input lists.  \tbd{we do
     841  not define a triangle match algorithm at this time}.
     842
     843If the two sets of coordinates are not known to agree well, but the
     844relative scale and approximate relative rotation is known, then a much
     845faster match can be found using pair-pair displacements.  In such a
     846case, the two lists can be considered as having the same coordinate
     847system, with an unknown relative displacement.  In this algorithm, all
     848possible pair-wise differences between the source positions in the two
     849lists are constructed and accumulated in a grid of possible offset
     850values.  The resulting grid is searched for a cluster representing the
     851offset between the two input lists.  This algorithm can only tolerate
     852a small error in the relative scale or the relative rotation of the
     853two coordinate lists.  However, this process is naturally $O(N^2)$,
     854and is thus advantageous over triangle matching in some circumstances.
     855This process can be extended to allow a larger uncertainty in the
     856relative rotation by allowing the procedure to scan over a range of
     857rotations.  We define the following function to apply this matching algorithm:
     858\begin{prototype}
     859pmAstromGridMatchStat pmAstromGridMatch (psArray *st1, psArray *st2, psMetadata *options);
     860\end{prototype}
     861The input sources must have been projected to the Focal Plane
     862coordinates (\code{pmAstromObj.P,Q}), and the supplied \code{config}
     863entry must contain the following user-defined parameters:
     864\begin{itemize}
     865\item GRID_OFFSET : maximum allowed displacement in search
     866\item GRID_SCALE  : grid bin size in focal-plane coordinate units
     867\item MIN_ANGLE : minimum tested relative rotation
     868\item MAX_ANGLE : maximum tested relative rotation
     869\item DEL_ANGLE : relative rotation step size
     870\end{itemize}
     871The output from this process is the statistics of the best-fit
     872(rotation and offset grid cell).  This information is returned in the
     873\code{pmAstromGridMatchStats} structure:
     874\begin{datatype}
     875typedef struct {
     876    double angle;
     877    double dP;
     878    double dQ;
     879    double minMetric;
     880    double minVar;
     881    int    nMatch;
     882} pmAstromGridMatchStats;
     883\end{datatype}
     884The elements \code{angle}, \code{dP}, \code{dQ} define the best
     885rotation and offset; the element \code{nMatch} indicates the number of
     886matched sources which fell within the match bin; the element
     887\code{minVar} defines the variance of the sources within the match
     888bin; the element \code{minMetric} specifies the value of the selection
     889metric for the matched bin.  Note that the metric of choice may not
     890necessarily be either the simple number of sources or the varience.
     891We find that a combination based on both which enhances the importance
     892of having a well-populated bin with a minimal variance gives good
     893results: $\mbox{metric} = \mbox{var} \times N^{-4}$. 
     894
     895We define two additional functions which are used in two build
     896\code{pmAstromGridMatch}, but which may be useful on their own:
     897
     898\begin{prototype}
     899pmAstromGridMatchStats pmAstromGridMatchAngle (psArray *st1, psArray *st2, psMetadata *config);
     900\end{prototype}
     901This function is identical to \code{pmAstromGridMatch}, but is valid
     902for only a single relative rotation.  The input \code{config}
     903information need not contain any of the \code{ANGLE} entries.
     904
     905\begin{prototype}
     906psArray *pmAstromRotateObj (psArray *old, double angle, double pCenter, double qCenter);
     907\end{prototype}
     908This function accepts an array of \code{pmAstromObj} objects and
     909rotates them by the given \code{angle} about the given center
     910coordinate \code{pCenter,qCenter} in the Focal Plane Array
     911coordinates. 
     912
     913The result of a \code{pmAstromGridMatch} may be used to modify the
     914astrometry transformation information for a \code{pmFPA} image
     915hierarchy structure.  The result of \code{pmAstromGridMatch} defines
     916the adjustments which should be made to the reference coordinate of
     917the projection (\code{pmFPA.projection.R,D}) and the effective
     918rotation of the Focal Plane.  The rotation implies modification of the
     919linear terms of the \code{pmFPA.toTangentPlane} transformation.  These
     920two adjustments are made using the function:
     921\begin{prototype}
     922pmAstromApplyGridMatch (pmFPA *fpa, pmAstromGridMatchStats stats);
     923\end{prototype}
     924This function modifies the supplied \code{pmFPA} entry as described
     925above.
     926
     927The result of a \code{pmAstromRadiusMatch} operation is a list of
     928matched entries between the two input lists.  This list may be used to
     929determine a linear fit between the two sets of matched sources.  The
     930following function performs this operation:
     931\begin{prototype}
     932bool pmAstromMatchedListFit (pmFPA *fpa, psArray *st1, psArray *st2, psArray *match, psMetadata *config);
     933\end{prototype}
     934This function accepts the raw and reference source lists and the list
     935of matched entries.  It uses the matched list to determine a
     936polynomial transformation between the two coordinate systems.  The
     937fitting uses clipping to exclude outliers, likely representing poor
     938matches.  The \code{config} element must contain the information
     939\code{ASTROM_NSIGMA} (specifying the number of sigma used in the
     940clipping) and \code{ASTROM_NCLIP} (specifying the number of clipping
     941iterations must be performed).  The \code{config} element must also
     942specify the order of the polynomial fit (keyword:
     943\code{ASTROM_ORDER}).  The result of this fit is a set of
     944modifications of the components of the \code{pmFPA.toTangentPlane}
     945transformation, and the modifications of the reference coordinate of
     946the projection (\code{pmFPA.projection.R,D}) and the projection scale
     947(\code{pmFPA.projection.Xs,Ys}).  The modifications to
     948\code{pmFPA.toTangentPlane} incorporate the rotation component of the
     949linear terms and the higher-order terms of the polynomial fits.
     950
  • trunk/doc/modules/ModulesSDRS.tex

    r5077 r5359  
    1 %%% $Id: ModulesSDRS.tex,v 1.59 2005-09-20 22:01:33 jhoblitt Exp $
     1%%% $Id: ModulesSDRS.tex,v 1.60 2005-10-18 14:07:17 eugene Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    12041204\item \code{MASK.NAME} (STR): Name of mask image
    12051205\end{itemize}
     1206
     1207\subsection{Fringes}
     1208
     1209Some images contain a signal caused by thin-film interference in the
     1210device due to strong emission lines.  The resulting instrumental
     1211effect consists of a pattern (the fringe pattern) of bright and dark
     1212bands corresponding to the constructive and destructive interference
     1213of the emission lines.  In the case that a single emission line causes
     1214the line structure, the resulting pattern can be described by two
     1215independent parameters: First, the amplitude of the emission line
     1216determines the overall amplitude of the pattern.  Second, the
     1217three-dimensional surface structure of the device determines the shape
     1218of the pattern.  In a typical situation, the device is not only
     1219illuminated by the emission line (or lines), but also by a continuum
     1220spectral source, which contributes to the overall light detected by
     1221the device without following the fringe pattern.  The relative
     1222intensities of the continuum background and the fringe pattern depend
     1223on the device structure (thickness) and on the ratio of the continuum
     1224and line emission fluxes. 
     1225
     1226A simple approach to the fringe pattern is to subtract a master fringe
     1227frame scaled by the amplitude of the fringe pattern.  We thus need a
     1228method of measuring the fringe amplitude which is robust in the
     1229presence of stars and which is fast.  We implement a method used at
     1230CFHT in which the fringe pattern is mapped by a series of points pairs
     1231which correspond to peaks and valleys of the fringe pattern.  We
     1232define the following function to measure the global fringe amplitude
     1233of an image given a collection of fringe point pairs.
     1234\begin{prototype}
     1235stats *pmFringeStats (psImage *image, psArray *fringePoints, psMetadata *config);
     1236\end{prototype}
     1237This function measures the robust median at each of the minimum and
     1238maximum coordinates and determines the difference and mean of the two
     1239values.  From the collection of differences, the robust median is
     1240calculated, and returned as part of the fringe statistics.
     1241 
     1242The \code{fringePoints} are defined by the following structure:
     1243\begin{datatype}
     1244typedef struct {
     1245    double xMin;
     1246    double yMin;
     1247    double xMax;
     1248    double yMax;
     1249    double delta;
     1250    double midValue;
     1251} pmFringePoint;
     1252\end{datatype}
     1253
    12061254
    12071255%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracChangeset for help on using the changeset viewer.