Changeset 3069
- Timestamp:
- Jan 19, 2005, 10:26:04 PM (22 years ago)
- Location:
- trunk/doc/pslib
- Files:
-
- 3 edited
-
ChangeLogSDRS.tex (modified) (2 diffs)
-
psLibSDRS.tex (modified) (4 diffs)
-
psLibSDRS_Astrom.tex (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/ChangeLogSDRS.tex
r3067 r3069 1 %%% $Id: ChangeLogSDRS.tex,v 1.5 6 2005-01-20 03:46:53price Exp $1 %%% $Id: ChangeLogSDRS.tex,v 1.57 2005-01-20 08:25:45 price Exp $ 2 2 3 3 \subsection{Changes from version 00 to version 01} … … 426 426 of \code{const psList} in \code{psListIteratorAlloc}. 427 427 \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.16 7 2005-01-20 03:46:48price Exp $1 %%% $Id: psLibSDRS.tex,v 1.168 2005-01-20 08:25:55 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 2717 2717 PS_INTERPOLATE_BILINEAR, 2718 2718 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 2720 2723 } psImageInterpolateMode mode; 2721 2724 \end{verbatim} 2725 2726 The first four are fairly straightforward. The last three, however, 2727 require some explanation. When attempting to account for noise in a 2728 CCD image, it is customary to carry an additional image containing the 2729 variance for each pixel. When operating on the CCD image (performing 2730 some transformation), we want to perform the same operation on the 2731 variance image, but the weights of the different input pixels 2732 contributing to the output pixel must be squared in order to propagate 2733 the noise (adding in quadrature). 2722 2734 2723 2735 \begin{verbatim} … … 2792 2804 \code{psU16}, \code{psS8}, \code{psS16}, \code{psF32}, \code{psF64}, 2793 2805 \code{psC32}, \code{psC64}. 2806 2807 \begin{verbatim} 2808 psImage *psImageTransform(psImage *output, const psImage *input, const psImage *inputMask, int inputMaskVal, 2809 const psPlaneTransform *outToIn, const psImage *combineMask, int combineMaskVal); 2810 \end{verbatim} 2811 Transform the \code{input} image according the supplied 2812 transformation. In the event that the \code{output} is \code{NULL}, 2813 the smallest possible image capable of containing the entire 2814 transformed \code{input} image is to be returned; otherwise only the 2815 image 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 2818 transformation. The \code{inputMask} must be of type \code{psU8}, and 2819 of the same size as the \code{input}, otherwise the function shall 2820 generate an error and return \code{NULL}. The transformation 2821 \code{outToIn} specifies the coordinates in the input image of a pixel 2822 in the output image --- note that this is the reverse of what might be 2823 naively 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 2826 not transformed. \code{combineMask} must be of type \code{psU8} and 2827 of the same size as the \code{output}, otherwise the function shall 2828 generate an error and return \code{NULL}. This function must be 2829 capable of handling the following types for the \code{input} (with 2830 corresponding types for the \code{output}): \code{psF32}, 2831 \code{psF64}. 2832 2794 2833 2795 2834 \subsubsection{Image Statistical Functions} … … 4554 4593 float mag, float color); 4555 4594 \end{verbatim} 4595 4596 4597 The following functions perform operations on transformations: 4598 4599 \begin{verbatim} 4600 psPlaneTransform *psPlaneTransformInvert(psPlaneTransform *out, const psPlaneTransform *in, float xMin, 4601 float xMax, float yMin, float yMax, int nSamples); 4602 psPlaneTransform *psPlaneTransformCombine(psPlaneTransform *out, const psPlaneTransform *trans1, 4603 const psPlaneTransform *trans2); 4604 bool 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 4609 inverts the given transformation. It may assume that the input 4610 transformation is one-to-one, and that the inverse transformation may 4611 be specified through using polynomials of the same type and order as 4612 the forward transformation. In the event that the input 4613 transformation is linear, an exact solution may be calculated; 4614 otherwise \code{nSamples} samples in each axis, ranging from 4615 \code{xMin} to \code{xMax} and \code{yMin} to \code{yMax} shall be 4616 used as a grid to fit the best inverse transformation. The function 4617 shall return \code{NULL} if it was unable to generate the inverse 4618 transformation; otherwise it shall return the inverse transformation. 4619 In 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 4624 that has the effect of performing \code{trans1} followed by 4625 \code{trans2}. The function shall return \code{NULL} if it was unable 4626 to generate the transformation; otherwise it shall return the 4627 transformation. \tbd{Not sure on the algorithm yet --- it may be the 4628 same as for \code{psPlaneTransformInvert}, in which case we will need 4629 the ranges and number of samples as well.} 4630 4631 \code{psPlaneTransform} takes two arrays containing matched 4632 coordinates (i.e., coordinates the \code{source} correspond to the 4633 appropriate coordinates in the \code{dest}) and returns the 4634 best-fitting transformation. The \code{source} and \code{dest} will 4635 contain \code{psCoord}s. In the event that the number of coordinates 4636 in each is not identical, the function shall generate a warning, and 4637 extra coordinates in the longer of the two shall be ignored. The 4638 \code{trans} transform may not be \code{NULL}, since it specifies the 4639 desired order, polynomial type and any polynomial terms to mask. 4640 \code{nRejIter} rejection iterations shall be performed, wherein 4641 coordinates lying more than \code{sigmaClip} standard deviations from 4642 the fit shall be rejected. 4556 4643 4557 4644 \subsubsection{Celestial Coordinate Conversions} -
trunk/doc/pslib/psLibSDRS_Astrom.tex
r2502 r3069 694 694 \end{verbatim} 695 695 Calculate 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 702 The FITS World Coordinate System (WCS) headers are commonly employed 703 with astronomical images in order to relate pixels to celestial (or 704 otherwise) coordinates. Since it is a FITS standard, we must be able 705 to read and write from WCS into our internal format. For the time 706 being, we will consider only celestial WCS (i.e., no spectral 707 wavelength calibrations, etc). Because WCS does not support the 708 multiple layers that we have built for \PS{}, we will use a simple 709 internal representation: a transformation, which handles any 710 distortions (i.e., goes directly from the coordinate frame of the 711 image to the tangent plane); and the projection. 712 713 The FITS WCS standard is described in Calabretta \& Greisen, A\&A, 714 2002, 395, 1077. An extension to the standard, the TNX projection, is 715 described at \url{http://iraf.noao.edu/projects/ccdmosaic/tnx.html}. 716 This extension is in widespread use and must also be supported for 717 both reading and writing. 718 719 \begin{verbatim} 720 bool psAstrometryReadWCS(psPlaneTransform **transform, // Output transformation 721 psProjection **projection, // Output projection 722 psMetadata *header // Input FITS header 723 ); 724 bool psAstrometryWriteWCS(psMetadata *header, // Output FITS header 725 psPlaneTransform *transform, // Input transformation 726 psProjection *projection // Input projection 727 ); 728 bool 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}, 735 returning new instances of the \code{transform} and \code{projection} 736 that represent the WCS. The function shall return \code{true} if it 737 was able to successfully generate the outputs; otherwise it shall 738 return \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 743 able to successfully generate the output; otherwise it shall return 744 \code{false}. 745 746 \code{pmSimplifyAstrometry} shall take a \code{cell} and simplify the 747 internal 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 752 multi-layered \PS{} internal astrometric representation. The function 753 shall return \code{true} if it was able to successfully generate the 754 output; otherwise it shall return \code{false}. 755
Note:
See TracChangeset
for help on using the changeset viewer.
