Changeset 1110
- Timestamp:
- Jun 25, 2004, 5:42:48 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/modules/ModulesSDRS.tex (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/modules/ModulesSDRS.tex
r1104 r1110 1 %%% $Id: ModulesSDRS.tex,v 1. 3 2004-06-26 00:34:15price Exp $1 %%% $Id: ModulesSDRS.tex,v 1.4 2004-06-26 03:42:48 price Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 394 394 395 395 Given an input image and region to keep, \code{psPhase2Trim} shall 396 trim the input image, leaving only the specified region. The API 397 shall be the following: 398 \begin{verbatim} 399 /** Trims the input image to remove the edges corrupted by OT shifting, and the overscan. */ 400 psReadout *psPhase2Trim(psReadout *in, ///< Input image to be trimmed, and output 401 const psImageRegion *region ///< Region to keep 402 ); 403 \end{verbatim} 404 405 Note that the trim shall be performed on the input image in-place. 396 trim the input image, \code{in}, leaving only the specified region, 397 \code{region}. The API shall be the following: 398 \begin{verbatim} 399 psReadout *psPhase2Trim(psReadout *in, const psImageRegion *region); 400 \end{verbatim} 401 402 Note that the trim shall be performed on the input image in-place, so 403 that the input image is modified. 406 404 407 405 The offset of the input image (\code{in->x0} and \code{in->y0}) shall … … 420 418 \subsection{Non-linearity} 421 419 422 Given an input image, and the coefficients of a polynomial, 423 \code{psPhase2CorrectNonLinearity} shall correct the input image for 424 non-linearity by applying the polynomial to the flux of each pixel. 420 We shall specify two functions to perform the non-linearity 421 correction, in order to implement the possible methods of specifying 422 the correction. 423 424 The first, \code{psPhase2NonLinearityPolynomial} shall correct the 425 input image for non-linearity by applying the given polynomial, 426 \code{coeff}, to the flux of each pixel in the input image, \code{in}. 425 427 The API shall be the following: 428 426 429 \begin{verbatim} 427 430 /** Applies the correction for detector non-linearity. */ 428 psReadout *psPhase2CorrectNonLinearity(psReadout *in, ///< Input image to be corrected, and output 429 const psPolynomial1D *coeff ///< Polynomial with which to correct 430 ); 431 psReadout *psPhase2CorrectNonLinearity(psReadout *in, const psPolynomial1D *coeff); 431 432 \end{verbatim} 432 433 … … 434 435 caller, likely from the image metadata. 435 436 437 The second function, \code{psPhase2NonLinearityLookup} shall correct 438 the input image for non-linearity by using a lookup table. The API 439 shall be the following: 440 441 \begin{verbatim} 442 psReadout *psPhase2NonLinearityLookup(psReadout *in, const psVector *inFlux, const psVector *outFlux); 443 \end{verbatim} 444 445 For each pixel in the input image, the function shall find the flux 446 value in the \code{inFlux} vector, and replace the flux with the 447 corresponding value in the \code{outFlux} vector. If the sizes of the 448 \code{inFlux} and \code{outFlux} vectors differ, then the function 449 shall generate a warning, and the longer vector shall be truncated to 450 the length of the shorter. The \code{inFlux} vector may be assumed 451 to be pre-sorted. 452 453 Both \code{psPhase2NonLinearityPolynomial} and 454 \code{psPhase2NonLinearityLookup} shall modify the input image 455 in-place. 456 436 457 \subsection{Flat-fielding} 437 458 438 459 Given an input image and a flat-field image, \code{psPhase2FlatField} 439 shall divide the input image by the flat-field image. The API shall be the following: 440 \begin{verbatim} 441 /** Flat-fields the image. */ 442 psReadout *psPhase2FlatField(psReadout *in, ///< Input image to be flat-fielded, and output 443 const psImage *flat ///< Flat-field image 444 ); 460 shall divide the input image by the flat-field image. The API shall 461 be the following: 462 \begin{verbatim} 463 psReadout *psPhase2FlatField(psReadout *in, const psImage *flat); 445 464 \end{verbatim} 446 465 … … 456 475 457 476 Pixels which are negative or zero in the \code{flat} shall be masked 458 in the input image. 477 in the input image with the value \code{PS_MASK_FLAT} (see 478 \S\ref{sec:maskValues}). 459 479 460 480 The function shall not normalise the \code{flat}; this responsibility 461 is left to the caller. 481 is left to the caller. This function is basically equivalent to a 482 divide, but with care for the region that is divided. 462 483 463 484 \subsection{Subtract sky} … … 484 505 \end{verbatim} 485 506 486 Note that the input image shall be subtracted in-place. The function 487 shall return the subtracted image, and also update the polynomial, 507 The polynomial specification, \code{poly}, specifies the order of the 508 polynomial to be used in fitting the background. Note that the input 509 image, \code{in}, shall be subtracted in-place. The function shall 510 return the subtracted image, and also update the polynomial, 488 511 \code{poly}, to hold the polynomial coefficients used in the 489 512 subtraction, and update the vector \code{outNorms} to hold the … … 491 514 subtraction. The \code{outNorms} vector shall be resized if necessary 492 515 to match the number of template sky images in the list 493 \code{skyImages}. 516 \code{skyImages}. If the polynomial specification is \code{NULL}, then 517 no polynomial shall be fit to the input image. 494 518 495 519 Note that the input image, \code{in}, and the template sky images, … … 503 527 function shall generate an error. 504 528 505 If the size of a source in the \code{catalog} is \code{size}, then the 506 radius to mask around the source before fitting the background shall 507 be \code{radiusMultiply} $\times$ \code{size} + \code{radiusAdd}. 529 The \code{catalog} shall be a linked list of \code{psObject} which 530 corresponds to objects on the input image. If the size of a source in 531 the \code{catalog} is \code{size}, then the radius to mask around the 532 source before fitting the background shall be \code{radiusMultiply} 533 $\times$ \code{size} + \code{radiusAdd}. 508 534 509 535 \tbd{Are the catalog stars in celestial or pixel coordinates? I lean 510 536 to pixel coordinates.} 537 538 \tbd{What size do we use? FWHM?} 511 539 512 540 When fitting a polynomial, the function shall bin the input image by … … 529 557 The following modules mask various defects on an image. 530 558 559 \subsection{Mask values} 560 \label{sec:maskValues} 561 562 We define several mask values for use in the phase 2 processing: 563 \begin{verbatim} 564 /** Mask values */ 565 typedef enum { 566 PS_MASK_TRAP, // The pixel is a charge trap 567 PS_MASK_BADCOL, // The pixel is a bad column 568 PS_MASK_SAT, // The pixel is saturated 569 PS_MASK_FLAT, // The pixel is non-positive in the flat-field 570 PS_MASK_CR_MORPH // The pixel is determined to be a cosmic ray, based on its morphology 571 } psMaskValue; 572 \end{verbatim} 573 574 Of these, masks for the charge traps need to be grown by the 575 extent of the OT convolution kernel. For other pixel types, 576 orthogonal transfer of the flux in this pixel will not (necessarily) 577 affect the flux in neighbouring pixels 578 531 579 \subsection{Bad pixels} 532 580
Note:
See TracChangeset
for help on using the changeset viewer.
