Changeset 5359 for trunk/doc/modules/CameraImages.tex
- Timestamp:
- Oct 18, 2005, 4:07:17 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/doc/modules/CameraImages.tex (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/modules/CameraImages.tex
r5030 r5359 724 724 output; otherwise it shall return \code{false}. 725 725 726 \subsection{Astrometry Fitting Support Routines} 727 728 Astrometry is performed on an astronomical image after a collection of 729 sources in the image have been detected and thier instrumental 730 positions have been measured. In this collection of tools, the 731 coordinates should be measured in the frame of the \code{pmReadout} 732 portion of the Image Hierarchy. This potentially allows us to measure 733 an astrometric transformation resulting from the transformation to any 734 of the other coordinate system. For example, it might be necessary to 735 determine the coordinates of the \code{psReadout} pixels relative to 736 the \code{psCell} (rather accept the relationship defined by the 737 metadata). 738 739 For the moment, we define two layers of astrometric analysis which 740 will be performed on typical mosaic images in the Pan-STARRS IPP: 741 per-chip astrometry and per-mosaic astrometry. In the first case, a 742 collection of detections across a single chip are used to determine a 743 basic, linear transformation to celestial coordinates. This 744 astrometric analysis can be used to determine an initial, approximate 745 astrometry for each chip in a mosaic camera, with accurcy limited by 746 the effects of optical distortion (a few pixels error, typically). In 747 the second case, a collection of detectors on a collection of chips 748 from a mosaic camera are used to measure the position of the telescope 749 boresite, the camera rotation, the impact of distortion from the 750 telescope optics, and the chip-to-focal plane transformation resulting 751 from chip placement errors or possible detector tilts or warps. 752 753 The 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} 768 In this section, we specify several functions which together make 769 possible the above analysis steps. 770 771 We define the following structure to carry the necessary information 772 about each detection. 773 \begin{datatype} 774 typedef 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} 782 This 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{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 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. 795 796 The 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. 803 804 If the two sets of coordinates are expected to agree very well (ie, 805 the current best-guess astrometric solution is quite close to the 806 'true' astrometric solution), then it is possible to use the simplest 807 matching process: cross-correlation within a fixed radius. The 808 following function accepts two sets of \code{pmAstromObj} sources and 809 determines the matched objects between the two lists. The input 810 sources must have been projected to the Focal Plane coordinates 811 (\code{pmAstromObj.P,Q}), and the supplied \code{config} entry must 812 contain 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} 817 psArray *pmAstromRadiusMatch (psArray *st1, psArray *st2, pmAstromOpt *opt); 818 \end{prototype} 819 820 \begin{datatype} 821 typedef struct { 822 int i1; 823 int i2; 824 } pmAstromMatch; 825 \end{datatype} 826 The \code{pmAstromMatch} structure defines the cross-correlation 827 between 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. 830 831 If the two sets of coordinates are not known to agree well, a somewhat 832 different approach is needed. Several algorithms have been defined in 833 the past to correlate two lists with unknown offsets, and potentially 834 unknown relative rotations and scaling. One well-known method is the 835 triangle-match algorithm which searches for similar triangles observed 836 in the two lists. This algorithm has the advantage of not requiring 837 the rotation or the scale to be well-known in advance. The 838 disadvantage of the triangle match algorithm is that it is necessarily 839 an $O(N^3)$ process since it is necessary to construct a substantial 840 fraction of all possible triangles for both input lists. \tbd{we do 841 not define a triangle match algorithm at this time}. 842 843 If the two sets of coordinates are not known to agree well, but the 844 relative scale and approximate relative rotation is known, then a much 845 faster match can be found using pair-pair displacements. In such a 846 case, the two lists can be considered as having the same coordinate 847 system, with an unknown relative displacement. In this algorithm, all 848 possible pair-wise differences between the source positions in the two 849 lists are constructed and accumulated in a grid of possible offset 850 values. The resulting grid is searched for a cluster representing the 851 offset between the two input lists. This algorithm can only tolerate 852 a small error in the relative scale or the relative rotation of the 853 two coordinate lists. However, this process is naturally $O(N^2)$, 854 and is thus advantageous over triangle matching in some circumstances. 855 This process can be extended to allow a larger uncertainty in the 856 relative rotation by allowing the procedure to scan over a range of 857 rotations. We define the following function to apply this matching algorithm: 858 \begin{prototype} 859 pmAstromGridMatchStat pmAstromGridMatch (psArray *st1, psArray *st2, psMetadata *options); 860 \end{prototype} 861 The input sources must have been projected to the Focal Plane 862 coordinates (\code{pmAstromObj.P,Q}), and the supplied \code{config} 863 entry 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} 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 dP; 878 double dQ; 879 double minMetric; 880 double minVar; 881 int nMatch; 882 } pmAstromGridMatchStats; 883 \end{datatype} 884 The elements \code{angle}, \code{dP}, \code{dQ} 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. 912 913 The result of a \code{pmAstromGridMatch} may be used to modify the 914 astrometry transformation information for a \code{pmFPA} image 915 hierarchy structure. The result of \code{pmAstromGridMatch} defines 916 the adjustments which should be made to the reference coordinate of 917 the projection (\code{pmFPA.projection.R,D}) and the effective 918 rotation of the Focal Plane. The rotation implies modification of the 919 linear terms of the \code{pmFPA.toTangentPlane} transformation. These 920 two adjustments are made using the function: 921 \begin{prototype} 922 pmAstromApplyGridMatch (pmFPA *fpa, pmAstromGridMatchStats stats); 923 \end{prototype} 924 This function modifies the supplied \code{pmFPA} entry as described 925 above. 926 927 The result of a \code{pmAstromRadiusMatch} operation is a list of 928 matched entries between the two input lists. This list may be used to 929 determine a linear fit between the two sets of matched sources. The 930 following function performs this operation: 931 \begin{prototype} 932 bool pmAstromMatchedListFit (pmFPA *fpa, psArray *st1, psArray *st2, psArray *match, psMetadata *config); 933 \end{prototype} 934 This function accepts the raw and reference source lists and the list 935 of matched entries. It uses the matched list to determine a 936 polynomial transformation between the two coordinate systems. The 937 fitting uses clipping to exclude outliers, likely representing poor 938 matches. 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 941 iterations must be performed). The \code{config} element must also 942 specify the order of the polynomial fit (keyword: 943 \code{ASTROM_ORDER}). The result of this fit is a set of 944 modifications of the components of the \code{pmFPA.toTangentPlane} 945 transformation, and the modifications of the reference coordinate of 946 the 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 949 linear terms and the higher-order terms of the polynomial fits. 950
Note:
See TracChangeset
for help on using the changeset viewer.
