IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 18, 2005, 5:24:11 PM (21 years ago)
Author:
eugene
Message:

cleaned up astrom / fringe additions

File:
1 edited

Legend:

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

    r5367 r5377  
    724724output; otherwise it shall return \code{false}.
    725725
    726 \subsection{Astrometry Fitting Support Routines}
     726\subsection{Astrometry Analysis}
    727727
    728728Astrometry is performed on an astronomical image after a collection of
     
    734734of the other coordinate system.  For example, it might be necessary to
    735735determine the coordinates of the \code{psReadout} pixels relative to
    736 the \code{psCell} (rather accept the relationship defined by the
    737 metadata). 
     736the \code{psCell} (rather than accept the relationship defined by the
     737metadata).
    738738
    739739For the moment, we define two layers of astrometric analysis which
     
    747747the second case, a collection of detectors on a collection of chips
    748748from a mosaic camera are used to measure the position of the telescope
    749 boresite, the camera rotation, the impact of distortion from the
     749boresight, the camera rotation, the impact of distortion from the
    750750telescope optics, and the chip-to-focal plane transformation resulting
    751 from chip placement errors or possible detector tilts or warps. 
     751from chip placement errors or possible detector tilts or warps.
    752752
    753753The process of performing astrometry involves the following steps:
     
    769769possible the above analysis steps. 
    770770
     771\subsubsection{Astrometry Objects}
     772
    771773We define the following structure to carry the necessary information
    772774about each detection. 
    773775\begin{datatype}
    774776typedef struct {
    775     double X, Y;
    776     double L, M;
    777     double P, Q;
    778     double R, D;
    779     double Mag;
     777    psPlane pix;
     778    psPlane FP;
     779    psPlane TP;
     780    psSphere sky;
     781    double mag;
    780782} pmAstromObj;
    781783\end{datatype}
    782784This structure specifies the coordinate of the detection in each of
    783 the four necessary coordinate frames: \code{X,Y} define the position
    784 in the \code{psReadout} frame, \code{L,M} define the position in the
    785 \code{psChip} frame, \code{P,Q} define the position in the
    786 \code{psFPA} frame, \code{R,D} define the position on the Celestial
    787 Sphere.  \tbd{re-write using psPlane and psSphere?}.  In addition, a
    788 measurement of the brightness is given by the element \code{Mag}.
    789 Such a data structure should be used for both the raw and the
    790 reference stars.  In astrometric processing, the raw detections will
    791 be projected using the best available information to each of these
    792 coordinate frames from the \code{X,Y} coordinates, while the reference
    793 detections will be projected to the other frames from the \code{R,D}
    794 coordinates.
     785the four necessary coordinate frames: \code{pix} defines the position
     786in the \code{psReadout} frame, \code{FP} defines the position in the
     787Focal Plane frame, \code{TP} defines the position in the Tangent Plane
     788frame, \code{sky} defines the position on the Celestial Sphere.  In
     789addition, a measurement of the brightness is given by the element
     790\code{Mag}.  Such a data structure should be used for both the raw and
     791the reference stars.  In astrometric processing, the raw detections
     792will be projected using the best available information to each of
     793these coordinate frames from the \code{pix} coordinates, while the
     794reference detections will be projected to the other frames from the
     795\code{sky} coordinates.
    795796
    796797The raw detections and the reference stars are both projected to a
    797 common coordinate frame for analysis.  In these modules, we
    798 principally use the Focal Plane for this reference frame.  After
    799 projection to the common frame, it is necessary to determine the match
    800 between corresponding objects in the two lists.  In order to match the
    801 raw detections to the reference stars, different methods are used
    802 depending on the circumstance. 
     798common coordinate frame for analysis.  In these modules, we use the
     799Focal Plane for this reference frame.  After projection to the common
     800frame, it is necessary to determine the match between corresponding
     801objects in the two lists.  In order to match the raw detections to the
     802reference stars, different methods are used depending on the
     803circumstance.
     804
     805\subsubsection{Matching Stars : Close Match}
    803806
    804807If the two sets of coordinates are expected to agree very well (ie,
    805808the current best-guess astrometric solution is quite close to the
    806 'true' astrometric solution), then it is possible to use the simplest
     809`true' astrometric solution), then it is possible to use the simplest
    807810matching process: cross-correlation within a fixed radius.  The
    808811following function accepts two sets of \code{pmAstromObj} sources and
    809812determines the matched objects between the two lists.  The input
    810813sources must have been projected to the Focal Plane coordinates
    811 (\code{pmAstromObj.L,M}), and the supplied \code{config} entry must
     814(\code{pmAstromObj.FP}), and the supplied \code{options} entry must
    812815contain the desired match radius (keyword:
    813 \code{ASTROM_MATCH_RADIUS}).  The output consists an array of
     816\code{ASTROM.MATCH.RADIUS}).  The output consists an array of
    814817\code{pmAstromMatch} values, defined below.
    815818
    816819\begin{prototype}
    817 psArray *pmAstromRadiusMatch (psArray *st1, psArray *st2, pmAstromOpt *opt);
     820psArray *pmAstromRadiusMatch (psArray *starlist1, psArray *starlist2, psMetadata *options);
    818821\end{prototype}
    819822
    820823\begin{datatype}
    821824typedef struct {
    822     int i1;
    823     int i2;
     825    int idx1;
     826    int idx2;
    824827} pmAstromMatch;
    825828\end{datatype}
    826829The \code{pmAstromMatch} structure defines the cross-correlation
    827830between two arrays.  An single such data item specifies that item
    828 number \code{pmAstromMatch.i1} in the first list corresponds to
    829 \code{pmAstromMatch.i2} in the second list. 
     831number \code{pmAstromMatch.idx1} in the first list corresponds to
     832\code{pmAstromMatch.idx2} in the second list. 
     833
     834\subsubsection{Matching Stars : Rough Match}
    830835
    831836If the two sets of coordinates are not known to agree well, a somewhat
     
    857862rotations.  We define the following function to apply this matching algorithm:
    858863\begin{prototype}
    859 pmAstromGridMatchStat pmAstromGridMatch (psArray *st1, psArray *st2, psMetadata *options);
     864psArray *pmAstromGridMatch (psArray *starlist1, psArray *starlist2, psMetadata *options);
    860865\end{prototype}
    861866The input sources must have been projected to the Focal Plane
    862 coordinates (\code{pmAstromObj.L,M}), and the supplied \code{config}
     867coordinates (\code{pmAstromObj.FP}), and the supplied \code{options}
    863868entry must contain the following user-defined parameters:
    864869\begin{itemize}
    865 \item \code{GRID_OFFSET} : maximum allowed displacement in search
    866 \item \code{GRID_SCALE}  : grid bin size in focal-plane coordinate units
    867 \item \code{MIN_ANGLE} : minimum tested relative rotation
    868 \item \code{MAX_ANGLE} : maximum tested relative rotation
    869 \item \code{DEL_ANGLE} : relative rotation step size
     870\item \code{GRID.OFFSET}    : maximum allowed displacement in search
     871\item \code{GRID.SCALE}     : grid bin size in focal-plane coordinate units
     872\item \code{GRID.MIN.ANGLE} : minimum tested relative rotation
     873\item \code{GRID.MAX.ANGLE} : maximum tested relative rotation
     874\item \code{GRID.DEL.ANGLE} : relative rotation step size
    870875\end{itemize}
    871 The 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}
    875 typedef struct {
    876     double angle;
    877     double dL;
    878     double dM;
    879     double minMetric;
    880     double minVar;
    881     int    nMatch;
    882 } pmAstromGridMatchStats;
    883 \end{datatype}
    884 The elements \code{angle}, \code{dL}, \code{dM} define the best
    885 rotation and offset; the element \code{nMatch} indicates the number of
    886 matched sources which fell within the match bin; the element
    887 \code{minVar} defines the variance of the sources within the match
    888 bin; the element \code{minMetric} specifies the value of the selection
    889 metric for the matched bin.  Note that the metric of choice may not
    890 necessarily be either the simple number of sources or the varience.
    891 We find that a combination based on both which enhances the importance
    892 of having a well-populated bin with a minimal variance gives good
    893 results: $\mbox{metric} = \mbox{var} \times N^{-4}$. 
    894 
    895 We 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}
    899 pmAstromGridMatchStats pmAstromGridMatchAngle (psArray *st1, psArray *st2, psMetadata *config);
    900 \end{prototype}
    901 This function is identical to \code{pmAstromGridMatch}, but is valid
    902 for only a single relative rotation.  The input \code{config}
    903 information need not contain any of the \code{ANGLE} entries.
    904 
    905 \begin{prototype}
    906 psArray *pmAstromRotateObj (psArray *old, double angle, double pCenter, double qCenter);
    907 \end{prototype}
    908 This function accepts an array of \code{pmAstromObj} objects and
    909 rotates them by the given \code{angle} about the given center
    910 coordinate \code{pCenter,qCenter} in the Focal Plane Array
    911 coordinates. 
     876Note that the angles are defined as counter-clockwise rotations of
     877starlist 1 relative to starlist 2.
     878
     879This function returns all matched pairs identified in the grid cell.
     880It also adds to the \code{options} metadata several elements defining
     881the statistics of the best-fit (rotation and offset grid cell):
     882\begin{itemize}
     883\item \code{GRID.FIT.ANGLE}
     884\item \code{GRID.FIT.LOFF}
     885\item \code{GRID.FIT.MOFF}
     886\item \code{GRID.FIT.METRIC}
     887\item \code{GRID.FIT.VARIANCE}
     888\item \code{GRID.FIT.NMATCH}
     889\end{itemize}
     890The elements \code{GRID.FIT.ANGLE}, \code{GRID.FIT.LOFF},
     891\code{GRID.FIT.MOFF} define the best rotation and offset; the element
     892\code{GRID.FIT.NMATCH} indicates the number of matched sources which
     893fell within the match bin; the element \code{GRID.FIT.VAR} defines the
     894variance of the sources within the match bin; the element
     895\code{GRID.FIT.METRIC} specifies the value of the selection metric for
     896the matched bin.  Note that the metric of choice may not necessarily
     897be either the simple number of sources or the varience.  We find that
     898a combination based on both which enhances the importance of having a
     899well-populated bin with a minimal variance gives good results:
     900$\mbox{metric} = \mbox{var} \times N^{-4}$. 
    912901
    913902The result of a \code{pmAstromGridMatch} may be used to modify the
     
    920909two adjustments are made using the function:
    921910\begin{prototype}
    922 pmAstromApplyGridMatch (pmFPA *fpa, pmAstromGridMatchStats stats);
     911bool pmAstromApplyGridMatch (pmFPA *fpa, pmAstromGridMatchStats stats);
    923912\end{prototype}
    924913This function modifies the supplied \code{pmFPA} entry as described
    925914above.
     915
     916We define two additional functions which are used in two build
     917\code{pmAstromGridMatch}, but which may be useful on their own:
     918
     919\begin{prototype}
     920psArray *pmAstromGridMatchAngle (psArray *starlist1, psArray *starlist2, psMetadata *options);
     921\end{prototype}
     922This function is identical to \code{pmAstromGridMatch}, but is valid
     923for only a single relative rotation.  The input \code{config}
     924information need not contain any of the \code{GRID.*.ANGLE} entries
     925(they will be ignored).
     926
     927\begin{prototype}
     928psArray *pmAstromRotateObj (psArray *old, double angle, double pCenter, double qCenter);
     929\end{prototype}
     930This function accepts an array of \code{pmAstromObj} objects and
     931rotates them by the given \code{angle} about the given center
     932coordinate \code{pCenter,qCenter} in the Focal Plane Array
     933coordinates. 
     934
     935\subsubsection{Astrometry Fitting Routines}
    926936
    927937The result of a \code{pmAstromRadiusMatch} operation is a list of
     
    937947fitting uses clipping to exclude outliers, likely representing poor
    938948matches.  The \code{config} element must contain the information
    939 \code{ASTROM_NSIGMA} (specifying the number of sigma used in the
    940 clipping) and \code{ASTROM_NCLIP} (specifying the number of clipping
     949\code{ASTROM.NSIGMA} (specifying the number of sigma used in the
     950clipping) and \code{ASTROM.NCLIP} (specifying the number of clipping
    941951iterations must be performed).  The \code{config} element must also
    942952specify the order of the polynomial fit (keyword:
    943 \code{ASTROM_ORDER}).  The result of this fit is a set of
     953\code{ASTROM.ORDER}).  The result of this fit is a set of
    944954modifications of the components of the \code{pmFPA.toTangentPlane}
    945955transformation, and the modifications of the reference coordinate of
     
    961971systems.  The fitting uses clipping to exclude outliers, likely
    962972representing poor matches.  The \code{config} element must contain the
    963 information \code{ASTROM_NSIGMA} (specifying the number of sigma used
    964 in the clipping) and \code{ASTROM_NCLIP} (specifying the number of
     973information \code{ASTROM.NSIGMA} (specifying the number of sigma used
     974in the clipping) and \code{ASTROM.NCLIP} (specifying the number of
    965975clipping iterations must be performed).  The \code{config} element
    966976must also specify the order of the polynomial fit (keyword:
    967 \code{ASTROM_ORDER}).  The result of this fit is a set of
     977\code{ASTROM.ORDER}).  The result of this fit is a set of
    968978modifications of the components of the \code{pmChip.toFPA}
    969979transformation.
     
    980990plane, for a collection of raw measurements and matched reference
    981991stars.  The configuration data must include the bin size over which
    982 the gradient is measured (keyword: \code{ASTROM_GRAD_BOX}).  The
     992the gradient is measured (keyword: \code{ASTROM.GRAD.BOX}).  The
    983993function returns an array of \code{pmAstromGradient} structures,
    984994defined below.
    985995\begin{prototype}
    986 psArray pmAstromMeasureGradients (psArray *st1, psArray *st2, psArray *match, psMetadata *config);
     996psArray pmAstromMeasureGradients (psArray *starlist1, psArray *starlist2, psArray *match, psMetadata *config);
    987997\end{prototype}
    988998
    989999The following data structure carries the information about the
    9901000residual gradient of source positions in the tangent plane
    991 (\code{P,Q}) as a function of position in the focal plane
    992 (\code{L,M}).
     1001(\code{pmAstromObj.TP}) as a function of position in the focal plane
     1002(\code{pmAstromObj.FP}).
    9931003\begin{datatype}
    9941004typedef struct {
    995     double L;
    996     double M;
    997     double dPdL;
    998     double dPdM;
    999     double dQdL;
    1000     double dQdM;
     1005    psPlane FP;
     1006    psPlane dTPdL;
     1007    psPlane dTPdM;
    10011008} pmAstromGradient;
    10021009\end{datatype}
     
    10081015transformation of the supplied \code{pmFPA} structure.  The
    10091016configuration variable supplies the polynomial order (keyword:
    1010 \code{ASTROM_DISTORT_ORDER}).
     1017\code{ASTROM.DISTORT.ORDER}).
    10111018\begin{prototype}
    10121019psArray pmAstromFitDistortion (pmFPA *fpa, psArray *gradients, psMetadata *config);
    10131020\end{prototype}
    1014 
    1015 \tbd{can we use the pmAstromFitMatch func above to fit the remaining
    1016   power in the chips?}
    1017 
Note: See TracChangeset for help on using the changeset viewer.