Changeset 5937 for trunk/doc/modules/ModulesSDRS.tex
- Timestamp:
- Jan 6, 2006, 4:53:15 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/doc/modules/ModulesSDRS.tex (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/modules/ModulesSDRS.tex
r5709 r5937 1 %%% $Id: ModulesSDRS.tex,v 1.6 8 2005-12-06 19:48:26 eugene Exp $1 %%% $Id: ModulesSDRS.tex,v 1.69 2006-01-07 02:53:15 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 860 860 861 861 Given an input image and various other parameters, 862 \code{pmSubtractBias} shall subtract the bias from the image .863 The API shall be the following: 864 \begin{prototype} 865 pmReadout *pmSubtractBias(pmReadout *in, void *fitSpec, pmFit fit, bool overscan,866 const psStats *stat, int nBin,862 \code{pmSubtractBias} shall subtract the bias from the image: 863 864 \begin{prototype} 865 pmReadout *pmSubtractBias(pmReadout *in, pmOverscanOptions *overscanOpts, 866 psRegion imageRegion, psList *overscanRegions, 867 867 const pmReadout *bias, const pmReadout *dark); 868 868 \end{prototype} … … 876 876 877 877 The input image, \code{in}, shall have the bias subtracted in-place. 878 The input image may be of type U16, S32, or F32. 879 880 Overscan subtraction is controlled by the \code{overscan} boolean. If 881 it is \code{true}, then overscan subtraction is performed. The 882 prescan and/or overscan regions to be used are specified in by 883 \code{CELL.BIASSEC} (accessed via the parent of the \code{pmReadout}; 884 a linked list of \code{psRegion}s). These shall be reduced to a 885 single vector (in the dimension specified by \code{CELL.READDIR}, 886 which is accessed via the parent of the \code{pmReadout}). 887 888 If the overscan is not defined for each row/column, then the function 889 shall generate a warning and then interpolate using the provided 890 functional form if \code{fit} is not \code{PM_FIT_NONE} (see below); 891 otherwise, the function shall generate an error. 892 893 The statistic to use in combining multiple pixels in the 894 prescan/overscan regions is specified by \code{stat}. \code{stat} is 895 of type \code{psStats} instead of simply \code{psStatsOptions} so that 896 clipping levels may be specified, if desired. In the event that 897 multiple options are specified by \code{stats}, a warning shall be 898 generated, and the option with the highest priority shall be used, 899 according to the following priority order: \code{PS_STAT_SAMPLE_MEAN}, 900 \code{PS_STAT_SAMPLE_MEDIAN}, \code{PS_STAT_CLIPPED_MEAN}, 901 \code{PS_STAT_ROBUST_MEAN}, \code{PS_STAT_ROBUST_MEDIAN}, 902 \code{PS_STAT_ROBUST_MODE}. 903 904 If \code{nBin} is positive and less than the size of the vector, then 905 the vector shall subsequently be binned into \code{nBin} bins, using 906 the specified statistic (\code{stat}). For example, the whole 907 overscan region can be taken as a unity if \code{nBin=1}. If 908 \code{fit} is \code{PM_FIT_SPLINE}, then \code{nBin} also serves as 909 the number of spline pieces. 910 911 \code{fit} is an enumerated type which specifies the type of fit to 912 employed on the overscan vector (and hence the type of \code{fitSpec}): 913 \begin{datatype} 914 typedef enum { 915 PM_FIT_NONE, ///< No fit 916 PM_FIT_POLYNOMIAL, ///< Fit polynomial 917 PM_FIT_SPLINE ///< Fit cubic splines 918 } pmFit; 919 \end{datatype} 920 921 If \code{fit} is \code{PM_FIT_POLYNOMIAL} or \code{PM_FIT_SPLINE}, 922 then \code{fitSpec} shall be interpreted to be a structure of the 923 appropriate type (\code{psPolynomial1D} for \code{PM_FIT_POLYNOMIAL}, 924 and \code{psSpline1D} for \code{PM_FIT_SPLINE}), and the overscan 925 vector shall be fit using the specified functional form. 926 927 In cases where \code{fitSpec} is \code{NULL} and \code{fit} is not 928 \code{PM_FIT_NONE} or \code{overscan} is \code{true}, the function 929 shall generate an error. If \code{overscan} is \code{false} and 930 \code{fit} is not \code{PM_FIT_NONE}, then the function shall generate 931 a warning, and no overscan subtraction shall be performed. Upon 932 return, the \code{fitSpec} shall contain the coefficients of the 933 overscan fit. 934 935 If \code{fitSpec} is \code{NULL}, or \code{fit} is \code{PM_FIT_NONE}, 936 then no fit shall be performed to the overscan. 878 The input image may be of type U16, S32, or F32. The region of the 879 input image that shall have the overscan or full-frame subtractions 880 applied is specified by \code{imageRegion}. 881 882 Overscan subtraction is performed if \code{overscanOpts} is 883 non-\code{NULL} (see \S\ref{sec:overscan}). \code{overscanRegions} 884 shall be a list of \code{psRegion}s that specify the regions that 885 comprise the overscans. 937 886 938 887 A \code{bias} frame shall be subtracted pixel-by-pixel from the input … … 952 901 \code{dark} shall also be masked in the output. The bias and dark 953 902 images may be copied to the same type as the input image if required. 903 904 905 \subsubsection{Overscan subtraction} 906 \label{sec:overscan} 907 908 The options for performing the overscan subtraction are bundled in a 909 \code{pmOverscanOptions}: 910 911 \begin{datatype} 912 typedef struct { 913 // Inputs 914 bool single; // Reduce all overscan regions to a single value? 915 bool scanRows; // Scan direction was rows? (otherwise columns) 916 pmFit fitType; // Type of fit to overscan 917 unsigned int order; // Order of polynomial, or number of spline pieces 918 psStats *stat; // Statistic to use when reducing the minor direction 919 // Outputs 920 psPolynomial1D *poly; // Result of polynomial fit 921 psSpline1D *spline; // Result of spline fit 922 } pmOverscanOptions; 923 \end{datatype} 924 925 The mode in which the overscan is subtracted is specified by the 926 \code{single} boolean. If \code{single} is \code{true}, then the 927 entire overscan region is reduced to a single value using the 928 \code{stat}. If \code{single} is \code{false}, the overscan shall be 929 reduced along the dimension specified by \code{scanRows} (rows if 930 \code{scanRows} is true; otherwise columns). 931 932 If the overscan is not defined for each row/column, 933 \code{pmSubtractBias} shall generate an error if \code{fitType} is 934 \code{PM_FIT_NONE}; otherwise, the function shall shall generate a 935 warning and the undefined values shall be interpolated using the 936 provided functional form. 937 938 The statistic to use in combining multiple pixels in the 939 prescan/overscan regions is specified by \code{stat}. \code{stat} is 940 of type \code{psStats} instead of simply \code{psStatsOptions} so that 941 clipping levels may be specified, if desired. In the event that 942 multiple options are specified by \code{stats}, a warning shall be 943 generated, and the option with the highest priority shall be used, 944 according to the following priority order: \code{PS_STAT_SAMPLE_MEAN}, 945 \code{PS_STAT_SAMPLE_MEDIAN}, \code{PS_STAT_CLIPPED_MEAN}, 946 \code{PS_STAT_ROBUST_MEAN}, \code{PS_STAT_ROBUST_MEDIAN}, 947 \code{PS_STAT_ROBUST_MODE}. 948 949 \code{fitType} is an enumerated type which specifies the type of fit 950 to employed on the overscan vector: 951 \begin{datatype} 952 typedef enum { 953 PM_FIT_NONE, ///< No fit 954 PM_FIT_POLY_ORD, ///< Fit ordinary polynomial 955 PM_FIT_POLY_CHEBY, ///< Fit Chebyshev polynomial 956 PM_FIT_SPLINE ///< Fit cubic splines 957 } pmFit; 958 \end{datatype} 959 960 If \code{fitType} is \code{PM_FIT_NONE}, then the overscan vector is 961 subtracted from the image without fitting. Otherwise, the overscan 962 vector is fit using the specified functional form, the fit is 963 subtracted from the image, and the \code{poly} or \code{spline} is 964 allocated and updated with the results of the fit. 965 966 The allocator for a \code{pmOverscanOptions} shall be: 967 \begin{prototype} 968 pmOverscanOptions *pmOverscanOptionsAlloc(bool single, bool scanRows, 969 pmFit fitType, unsigned int order, 970 psStats *stat); 971 \end{prototype} 954 972 955 973 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note:
See TracChangeset
for help on using the changeset viewer.
