IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 11, 2006, 3:46:56 PM (20 years ago)
Author:
Paul Price
Message:

Add camera for toresidexp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/dettool.c

    r9489 r9494  
    10201020{
    10211021    PS_ASSERT_PTR_NON_NULL(config, false);
    1022  
     1022
    10231023    // select detProcessedImfile.det_id
    10241024    // select detRun.iteration
     
    17251725
    17261726    psString query = psStringCopy(
    1727         "SELECT" 
     1727        "SELECT"
    17281728        "   det_id,"
    17291729        "   det_type,"
     
    22482248{
    22492249    PS_ASSERT_PTR_NON_NULL(config, false);
    2250  
     2250
    22512251    psString query = psStringCopy(
    22522252        " SELECT DISTINCT"
     
    23382338{
    23392339    PS_ASSERT_PTR_NON_NULL(config, false);
    2340  
     2340
    23412341    // det_id, recip, -bg, -bg_stdev, & -bg_mean_stdev
    23422342    // are required
     
    27242724
    27252725    if (config->where) {
    2726         bool status;
    2727         int iteration = psMetadataLookupS32 (&status, config->where, "iteration");
    2728         if (status) {
    2729             psMetadataRemoveKey (config->where, "iteration");
    2730             psMetadataAddS32 (config->where, PS_LIST_TAIL, "iteration", 0, "==", iteration);
    2731         }
     2726        bool status;
     2727        int iteration = psMetadataLookupS32 (&status, config->where, "iteration");
     2728        if (status) {
     2729            psMetadataRemoveKey (config->where, "iteration");
     2730            psMetadataAddS32 (config->where, PS_LIST_TAIL, "iteration", 0, "==", iteration);
     2731        }
    27322732        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "detNormalizedImfile");
    27332733        psStringAppend(&query, " AND %s", whereClause);
     
    31263126        "   det_type,"
    31273127        "   exp_tag,"
    3128         "   include"
     3128        "   include,"
     3129        "   camera"
    31293130        " FROM"
    31303131        "   (SELECT DISTINCT"
     
    31343135        "       detInputExp.exp_tag,"
    31353136        "       detInputExp.include,"
    3136         "       rawDetrendExp.imfiles"
     3137        "       rawDetrendExp.imfiles,"
     3138        "       rawDetrendExp.camera"
    31373139        "   FROM detRun"
    31383140        "       LEFT JOIN detInputExp"
     
    41184120        " WHERE"
    41194121        "   detRun.state = 'run'");
    4120    
    4121     // XXX this query was not restricted by det_id, resulting 
     4122
     4123    // XXX this query was not restricted by det_id, resulting
    41224124    // in an inconsistent UPDATE below.  I added this AND clause
    41234125    // though there may be a cleaner method (EAM 2006.10.08)
    41244126    psStringAppend (
    4125         &query,
    4126         "  AND detRun.det_id = '%s'", det_id);
     4127        &query,
     4128        "  AND detRun.det_id = '%s'", det_id);
    41274129
    41284130    psStringAppend (
    4129         &query,
    4130         " GROUP BY"
     4131        &query,
     4132        " GROUP BY"
    41314133        "   detRun.det_id,"
    41324134        "   detRun.iteration,"
     
    41544156        return true;
    41554157    }
    4156    
     4158
    41574159    // start a transaction so we don't end up with an incremented iteration
    41584160    // count but no detInputExps
Note: See TracChangeset for help on using the changeset viewer.