Changeset 374
- Timestamp:
- Apr 1, 2004, 12:09:25 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r367 r374 1 %%% $Id: psLibSDRS.tex,v 1.2 8 2004-04-01 09:44:17price Exp $1 %%% $Id: psLibSDRS.tex,v 1.29 2004-04-01 10:09:25 price Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 1232 1232 /** Set a bit mask */ 1233 1233 psBitMask * 1234 psBitMaskSet(psBitMask *outMask, ///< Output bit mask or NULL 1235 const psBitMask *myMask, ///< Input bit mask 1236 int bit ///< Bit to set 1234 psBitMaskSet(psBitMask *myMask, ///< Input bit mask 1235 int bit ///< Bit to set 1237 1236 ); 1238 1237 \end{verbatim} … … 1341 1340 1342 1341 \begin{verbatim} 1343 /** Do Statistics on an array. Returns a status value. */1342 /** Do Statistics on an array. Returns a status value. \ingroup MathGroup */ 1344 1343 psStats * 1345 1344 psArrayStats(const psFloatArray *restrict myArray, ///< Array to be analysed 1346 const psIntArray *restrict maskArray, ///< Ignore elements where (maskArray & maskVal) != 01347 ///< May be NULL1348 unsigned int maskVal,///< Only mask elements with one of these bits set in maskArray1349 psStats *stats///< stats structure defines stats to be calculated and how1350 );1345 const psIntArray *restrict maskArray, ///< Ignore elements where (maskArray & maskVal) != 0 1346 ///< May be NULL 1347 unsigned int maskVal, ///< Only mask elements with one of these bits set in maskArray 1348 psStats *stats ///< stats structure defines stats to be calculated and how 1349 ); 1351 1350 \end{verbatim} 1352 1351 % … … 1570 1569 psMatrixOp(psMatrix *out, ///< Matrix to return, or NULL 1571 1570 const psMatrix *matrix1, ///< Matrix 1 1572 const char *op, ///< Operation to perform 1571 const char *op, ///< Operation to perform: "+", "-", "*" 1573 1572 const psMatrix *matrix2 ///< Matrix 2 1574 1573 ); … … 1594 1593 /** Convert matrix to vector. Intended for a 1-d matrix. */ 1595 1594 psVector * 1596 psMatrixToVector(psMatrix *myMatrix ///< Matrix to convert 1595 psMatrixToVector(psVector *out, ///< Vector to return, or NULL 1596 psImage *myMatrix ///< Matrix to convert 1597 1597 ); 1598 1598 … … 1619 1619 /** Fast Fourier Transform */ 1620 1620 typedef struct { 1621 p_psFFTDetails *details; //!< Details on FFT implementation (private)1622 int nx, ny; //!< Size in x and y1623 float * *real; //!< Data in real space1624 void *fourier; //!< Data in fourier space; implementation dependent1621 p_psFFTDetails *details; ///< Details on FFT implementation (private) 1622 int nx, ny; ///< Size in x and y 1623 float *real; ///< Data in real space: a 2D array using the [nx*y + x] stuff 1624 void *fourier; ///< Data in fourier space; implementation dependent 1625 1625 } psFFT; 1626 1626 \end{verbatim} 1627 1627 1628 The \code{ *details} entry allows us to wrap the external library in1629 theevent that it carries information around from one transform to the1628 The \code{details} entry allows us to wrap the external library in the 1629 event that it carries information around from one transform to the 1630 1630 next (as is the case for FFTW), and hence it is 1631 implementation-dependent. The intent is that every function that 1632 employs a FFT will act on a \code{psFFT}. A user will create a 1633 \code{psFFT} by stuffing it with the real data, perform operations in 1634 Fourier space using the \code{psFFT}, and then extract the output as 1635 an image when done. 1631 implementation-dependent. The size of the data in real space are 1632 stored in \code{nx} and \code{ny}, and the data is stored as a 1633 Fortran-style array, \code{real}. Since different libraries store the 1634 data in the Fourier space differently, \code{fourier}, we have 1635 specified it as of type \code{void*}. 1636 1637 The intent is that every function that employs a FFT will act on a 1638 \code{psFFT}. A user will create a \code{psFFT} by stuffing it with 1639 the real data, perform operations in Fourier space using the 1640 \code{psFFT}, and then extract the output as an image when done. 1636 1641 1637 1642 We specify two constructors --- one for use with images, and the other … … 1663 1668 /** Forward FFT: from real to fourier space */ 1664 1669 psFFT * 1665 psFFTForward Transform(psFFT *fft //!< FFT to apply1666 );1670 psFFTForward(psFFT *fft ///< FFT to apply (input and output) 1671 ); 1667 1672 1668 1673 /** Reverse FFT: from fourier to real space */ 1669 1674 psFFT * 1670 psFFTReverse Transform(psFFT *fft //!< FFT to apply1671 );1675 psFFTReverse(psFFT *fft ///< FFT to apply (input and output) 1676 ); 1672 1677 \end{verbatim} 1673 1678 … … 1701 1706 1702 1707 \begin{verbatim} 1703 /** Calculate cross-correlation function */ 1708 /** Calculate FFT of the cross-correlation. Multiplication of the first FFT with the complex conjugate of 1709 * the second. 1710 */ 1704 1711 psFFT * 1705 1712 psFFTCrossCorrelate(psFFT *out //!< Output FFT (or NULL) … … 1708 1715 \end{verbatim} 1709 1716 1717 In convolution, two Fourier transforms are multiplied, and the resultant 1718 \code{psFFT} is returned. 1719 1720 \begin{verbatim} 1721 /** Calculate FFT of the convolution. Straight multiplication of the FFTs */ 1722 psFFT * 1723 psFFTConvolve(psFFT *out, ///< Output FFT (or NULL) 1724 const psFFT *fft1, const psFFT *fft2 ///< FFTs to multiply 1725 ); 1726 \end{verbatim} 1727 1710 1728 The power spectrum is calculated from the Fourier transform, returning 1711 1729 an array of floating-point values containing the power spectrum. … … 1713 1731 \begin{verbatim} 1714 1732 /** Calculate power spectrum */ 1715 psFFT * 1716 psFFTPowerSpec(psFFT *fft //!< FFT to use (input and output) 1717 ); 1718 \end{verbatim} 1719 1720 In convolution, two Fourier transforms are multiplied, and the resultant 1721 \code{psFFT} is returned. 1722 1723 \begin{verbatim} 1724 /** Multiply two Fourier transforms, as for convolution */ 1725 psFFT * 1726 psFFTMultiplyFT(psFFT *out, //!< Output FFT (or NULL) 1727 const psFFT *fft1, const psFFT *fft2 //!< FFTs to multiply 1728 ); 1733 psFloatArray * 1734 psFFTPowerSpec(psFFT *fft ///< FFT to use (input and output) 1735 ); 1729 1736 \end{verbatim} 1730 1737 … … 1757 1764 1758 1765 \begin{verbatim} 1759 /** evaluate a non-normalized Gaussian with the given mean and sigma at the given coordianate. Note that this1766 /** Evaluate a non-normalized Gaussian with the given mean and sigma at the given coordianate. Note that this 1760 1767 is not a Gaussian deviate. The evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */ 1761 1768 float … … 1841 1848 \end{verbatim} 1842 1849 1843 \tbd{Generate a Gaussian deviate vector}1850 \tbd{Generate a vector of random Gaussian deviates} 1844 1851 1845 1852 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 1853 1860 1854 1861 \begin{verbatim} 1855 /** Minimize a particular function */1862 /** Minimize a particular non-linear function */ 1856 1863 psFloatArray * 1857 psMinimize(float (*myFunction)(const psFloatArray *restrict), ///< Function to minimize 1858 psFloatArray *restrict initialGuess ///< Initial guess 1859 ); 1864 psMinimize(float (*myFunction)(const psFloatArray *restrict), ///< Function to minimize 1865 psFloatArray *restrict initialGuess, ///< Initial guess 1866 psIntArray *restrict paramMask //!< 1 = fit for parameter, 0 = hold parameter constant 1867 ); 1860 1868 \end{verbatim} 1861 1869 … … 1870 1878 psFloatArray * 1871 1879 psMinimizeChi2(float (*evalModel)(const psFloatArray *restrict, 1872 const psFloatArray *restrict), ///< Model to fit; receives domain and 1873 ///< parameters 1874 const psFloatArray *restrict domain, ///< The domain values for the corresponding measurements 1875 const psFloatArray *restrict data, ///< Data to fit 1876 const psFloatArray *restrict errors, ///< Errors in the data 1877 psFloatArray *restrict initialGuess, ///< Initial guess 1878 const psIntArray *restrict guessMask ///< 1 = fit for parameter, 0 = hold parameter constant 1879 ); 1880 const psFloatArray *restrict), ///< Model to fit; (domain and params) 1881 const psFloatArray *restrict domain, ///< The domain values for the corresponding measurements 1882 const psFloatArray *restrict data, ///< Data to fit 1883 const psFloatArray *restrict errors, ///< Errors in the data 1884 psFloatArray *restrict initialGuess, ///< Initial guess 1885 const psIntArray *restrict paramMask ///< 1 = fit for parameter, 0 = hold parameter constant 1886 ); 1880 1887 \end{verbatim} 1881 1888 … … 1889 1896 1890 1897 \begin{verbatim} 1891 /** Derive a polynomial that goes through the points --- can be done analytically */ 1892 psFloatArray * 1893 psGetArrayPolynomial(const psFloatArray *restrict ord, ///< Ordinates (or NULL to just use the indices) 1894 const psFloatArray *restrict coord ///< Coordinates 1898 /** Derive a polynomial fit by chi^2 minimisation --- can be done analytically */ 1899 psPolynomial1D * 1900 psGetArrayPolynomial(psPolynomial1D myPoly, ///< Polynomial to fit 1901 const psFloatArray *restrict x, ///< Ordinates (or NULL to just use the indices) 1902 const psFloatArray *restrict y, ///< Coordinates 1903 const psFloatArray *restrict yErr ///< Errors in coordinates, or NULL 1895 1904 ); 1896 1905 \end{verbatim}
Note:
See TracChangeset
for help on using the changeset viewer.
