IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1879


Ignore:
Timestamp:
Sep 24, 2004, 10:08:22 AM (22 years ago)
Author:
gusciora
Message:

psCOmments.h

Location:
trunk/psLib/src
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psMinimize.c

    r1861 r1879  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-23 06:12:22 $
     11 *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-24 20:08:22 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    730730
    731731    PS_CHECK_NULL_1DPOLY(myPoly);
    732     PS_CHECK_NULL_VECTOR(x);
    733     PS_CHECK_EMPTY_VECTOR(x);
    734732    PS_CHECK_NULL_VECTOR(y);
    735733    PS_CHECK_EMPTY_VECTOR(y);
     734
     735    // XXX: Verify that this is the correct action.
     736    if (x == NULL) {
     737        x = psVectorAlloc(y->n, PS_TYPE_F32);
     738        for (i=0;i<x->n;i++) {
     739            x->data.F32[i] = (float) i;
     740        }
     741    }
     742
     743    PS_CHECK_EMPTY_VECTOR(x);
    736744    PS_CHECK_NULL_VECTOR(yErr);
    737745    PS_CHECK_EMPTY_VECTOR(yErr);
  • trunk/psLib/src/dataManip/psStats.c

    r1846 r1879  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-22 01:30:21 $
     11 *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-24 20:08:22 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2323
    2424/*****************************************************************************/
    25 
    2625/* INCLUDE FILES                                                             */
    27 
    2826/*****************************************************************************/
    2927#include "psMemory.h"
     
    3836
    3937/*****************************************************************************/
    40 
    4138/* DEFINE STATEMENTS                                                         */
    42 
    4339/*****************************************************************************/
    4440// will use robust statistical methods.
     
    8884
    8985/*****************************************************************************/
    90 
    9186/* TYPE DEFINITIONS                                                          */
    92 
    9387/*****************************************************************************/
    9488
    9589/*****************************************************************************/
    96 
    9790/* GLOBAL VARIABLES                                                          */
    98 
    9991/*****************************************************************************/
    10092
     
    10294
    10395/*****************************************************************************/
    104 
    10596/* FILE STATIC VARIABLES                                                     */
    106 
    10797/*****************************************************************************/
    10898
     
    110100
    111101/*****************************************************************************/
    112 
    113102/* FUNCTION IMPLEMENTATION - LOCAL                                           */
    114 
    115103/*****************************************************************************/
    116104
     
    471459    // regardless of the vector size.
    472460    /*
    473      * if (myVector->n > stats->sampleLimit) { psAbort(__func__, "Robust Statistic Algorithms have not yet
    474      * been defined or implemented.");
    475      *
    476461     * // Calculate the robust quartiles. stats2 = psStatsAlloc(PS_STAT_ROBUST_MEDIAN);
    477462     * p_psVectorRobustStats(myVector, maskVector, maskVal, stats2);
     
    15251510    newStruct->sampleUQ = NAN;
    15261511    newStruct->sampleLQ = NAN;
    1527     newStruct->sampleLimit = 30000;
    15281512    newStruct->robustMean = NAN;
    15291513    newStruct->robustMedian = NAN;
     
    17801764algorithms stablize, we will then macro everything and put type support in
    17811765the various stat functions.
     1766 
     1767XXX: Should the default data type be F64?  Since we are buying Athlons...
    17821768 *****************************************************************************/
    17831769psVector* p_psConvertToF32(psStats* stats, psVector* in, psVector* mask, unsigned int maskVal)
     
    18261812macro-ize everything and add PS_TYPE_U16 and PS_TYPE_F64.
    18271813 *****************************************************************************/
    1828 psStats* psVectorStats(psStats* stats, psVector* in, psVector* mask, unsigned int maskVal)
     1814psStats* psVectorStats(psStats* stats,
     1815                       psVector* in,
     1816                       psVector* mask,
     1817                       unsigned int maskVal)
    18291818{
    18301819    psVector* inF32;
  • trunk/psLib/src/dataManip/psStats.h

    r1470 r1879  
    1010 *  @author George Gusciora, MHPCC
    1111 *
    12  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-11 19:16:04 $
     12 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-09-24 20:08:22 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131 *  @see psStats, psVectorStats, psImageStats
    3232 */
     33// XXX: Is PS_STAT_ROBUST_FOR_SAMPLE obsolete?
    3334typedef enum {
    3435    PS_STAT_SAMPLE_MEAN = 0x000001,
     
    4344    PS_STAT_CLIPPED_MEAN = 0x000200,
    4445    PS_STAT_CLIPPED_STDEV = 0x000400,
    45     PS_STAT_MAX = 0x000800,
    46     PS_STAT_MIN = 0x001000,
    47     PS_STAT_USE_RANGE = 0x002000,
     46    PS_STAT_MAX =  0x000800,
     47    PS_STAT_MIN =  0x001000,
     48    PS_STAT_USE_RANGE =  0x002000,
    4849    PS_STAT_USE_BINSIZE = 0x004000,
    4950    PS_STAT_ROBUST_FOR_SAMPLE = 0x008000
     
    6061    double sampleUQ;            ///< upper quartile of sample
    6162    double sampleLQ;            ///< lower quartile of sample
    62     double sampleLimit;         ///<
    6363    double robustMean;          ///< robust mean of array
    6464    double robustMedian;        ///< robust median of array
     
    6767    double robustUQ;            ///< robust upper quartile
    6868    double robustLQ;            ///< robust lower quartile
    69     double XXX;
    7069    double robustN50;           ///<
    7170    double robustNfit;          ///<
    7271    double clippedMean;         ///< Nsigma clipped mean
    7372    double clippedStdev;        ///< standard deviation after clipping
     73    int clippedNvalues          ///< ???
    7474    double clipSigma;           ///< Nsigma used for clipping; user input
    7575    int clipIter;               ///< Number of clipping iterations; user input
     
    8686 */
    8787psStats* psVectorStats(
    88     psStats* stats,
    89     ///< stats structure defines stats to be calculated and how
    90 
    91     psVector* in,
    92     ///< Vector to be analysed: must be F32
    93 
    94     psVector* mask,
    95     ///< Ignore elements where (maskVector & maskVal) != 0: must be INT or NULL
    96 
    97     unsigned int maskVal
    98     ///< Only mask elements with one of these bits set in maskVector
     88    psStats* stats,    ///< stats structure defines stats to be calculated and how
     89    psVector* in,    ///< Vector to be analysed: must be F32
     90    psVector* mask,    ///< Ignore elements where (maskVector & maskVal) != 0: must be INT or NULL
     91    unsigned int maskVal    ///< Only mask elements with one of these bits set in maskVector
    9992);
    10093
  • trunk/psLib/src/math/psMinimize.c

    r1861 r1879  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-23 06:12:22 $
     11 *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-24 20:08:22 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    730730
    731731    PS_CHECK_NULL_1DPOLY(myPoly);
    732     PS_CHECK_NULL_VECTOR(x);
    733     PS_CHECK_EMPTY_VECTOR(x);
    734732    PS_CHECK_NULL_VECTOR(y);
    735733    PS_CHECK_EMPTY_VECTOR(y);
     734
     735    // XXX: Verify that this is the correct action.
     736    if (x == NULL) {
     737        x = psVectorAlloc(y->n, PS_TYPE_F32);
     738        for (i=0;i<x->n;i++) {
     739            x->data.F32[i] = (float) i;
     740        }
     741    }
     742
     743    PS_CHECK_EMPTY_VECTOR(x);
    736744    PS_CHECK_NULL_VECTOR(yErr);
    737745    PS_CHECK_EMPTY_VECTOR(yErr);
  • trunk/psLib/src/math/psStats.c

    r1846 r1879  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-22 01:30:21 $
     11 *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-24 20:08:22 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2323
    2424/*****************************************************************************/
    25 
    2625/* INCLUDE FILES                                                             */
    27 
    2826/*****************************************************************************/
    2927#include "psMemory.h"
     
    3836
    3937/*****************************************************************************/
    40 
    4138/* DEFINE STATEMENTS                                                         */
    42 
    4339/*****************************************************************************/
    4440// will use robust statistical methods.
     
    8884
    8985/*****************************************************************************/
    90 
    9186/* TYPE DEFINITIONS                                                          */
    92 
    9387/*****************************************************************************/
    9488
    9589/*****************************************************************************/
    96 
    9790/* GLOBAL VARIABLES                                                          */
    98 
    9991/*****************************************************************************/
    10092
     
    10294
    10395/*****************************************************************************/
    104 
    10596/* FILE STATIC VARIABLES                                                     */
    106 
    10797/*****************************************************************************/
    10898
     
    110100
    111101/*****************************************************************************/
    112 
    113102/* FUNCTION IMPLEMENTATION - LOCAL                                           */
    114 
    115103/*****************************************************************************/
    116104
     
    471459    // regardless of the vector size.
    472460    /*
    473      * if (myVector->n > stats->sampleLimit) { psAbort(__func__, "Robust Statistic Algorithms have not yet
    474      * been defined or implemented.");
    475      *
    476461     * // Calculate the robust quartiles. stats2 = psStatsAlloc(PS_STAT_ROBUST_MEDIAN);
    477462     * p_psVectorRobustStats(myVector, maskVector, maskVal, stats2);
     
    15251510    newStruct->sampleUQ = NAN;
    15261511    newStruct->sampleLQ = NAN;
    1527     newStruct->sampleLimit = 30000;
    15281512    newStruct->robustMean = NAN;
    15291513    newStruct->robustMedian = NAN;
     
    17801764algorithms stablize, we will then macro everything and put type support in
    17811765the various stat functions.
     1766 
     1767XXX: Should the default data type be F64?  Since we are buying Athlons...
    17821768 *****************************************************************************/
    17831769psVector* p_psConvertToF32(psStats* stats, psVector* in, psVector* mask, unsigned int maskVal)
     
    18261812macro-ize everything and add PS_TYPE_U16 and PS_TYPE_F64.
    18271813 *****************************************************************************/
    1828 psStats* psVectorStats(psStats* stats, psVector* in, psVector* mask, unsigned int maskVal)
     1814psStats* psVectorStats(psStats* stats,
     1815                       psVector* in,
     1816                       psVector* mask,
     1817                       unsigned int maskVal)
    18291818{
    18301819    psVector* inF32;
  • trunk/psLib/src/math/psStats.h

    r1470 r1879  
    1010 *  @author George Gusciora, MHPCC
    1111 *
    12  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-11 19:16:04 $
     12 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-09-24 20:08:22 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131 *  @see psStats, psVectorStats, psImageStats
    3232 */
     33// XXX: Is PS_STAT_ROBUST_FOR_SAMPLE obsolete?
    3334typedef enum {
    3435    PS_STAT_SAMPLE_MEAN = 0x000001,
     
    4344    PS_STAT_CLIPPED_MEAN = 0x000200,
    4445    PS_STAT_CLIPPED_STDEV = 0x000400,
    45     PS_STAT_MAX = 0x000800,
    46     PS_STAT_MIN = 0x001000,
    47     PS_STAT_USE_RANGE = 0x002000,
     46    PS_STAT_MAX =  0x000800,
     47    PS_STAT_MIN =  0x001000,
     48    PS_STAT_USE_RANGE =  0x002000,
    4849    PS_STAT_USE_BINSIZE = 0x004000,
    4950    PS_STAT_ROBUST_FOR_SAMPLE = 0x008000
     
    6061    double sampleUQ;            ///< upper quartile of sample
    6162    double sampleLQ;            ///< lower quartile of sample
    62     double sampleLimit;         ///<
    6363    double robustMean;          ///< robust mean of array
    6464    double robustMedian;        ///< robust median of array
     
    6767    double robustUQ;            ///< robust upper quartile
    6868    double robustLQ;            ///< robust lower quartile
    69     double XXX;
    7069    double robustN50;           ///<
    7170    double robustNfit;          ///<
    7271    double clippedMean;         ///< Nsigma clipped mean
    7372    double clippedStdev;        ///< standard deviation after clipping
     73    int clippedNvalues          ///< ???
    7474    double clipSigma;           ///< Nsigma used for clipping; user input
    7575    int clipIter;               ///< Number of clipping iterations; user input
     
    8686 */
    8787psStats* psVectorStats(
    88     psStats* stats,
    89     ///< stats structure defines stats to be calculated and how
    90 
    91     psVector* in,
    92     ///< Vector to be analysed: must be F32
    93 
    94     psVector* mask,
    95     ///< Ignore elements where (maskVector & maskVal) != 0: must be INT or NULL
    96 
    97     unsigned int maskVal
    98     ///< Only mask elements with one of these bits set in maskVector
     88    psStats* stats,    ///< stats structure defines stats to be calculated and how
     89    psVector* in,    ///< Vector to be analysed: must be F32
     90    psVector* mask,    ///< Ignore elements where (maskVector & maskVal) != 0: must be INT or NULL
     91    unsigned int maskVal    ///< Only mask elements with one of these bits set in maskVector
    9992);
    10093
Note: See TracChangeset for help on using the changeset viewer.