IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8353


Ignore:
Timestamp:
Aug 15, 2006, 1:26:30 PM (20 years ago)
Author:
jhoblitt
Message:

first pass implementation of -tonormalize

File:
1 edited

Legend:

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

    r8349 r8353  
    16561656    PS_ASSERT_PTR_NON_NULL(config, false);
    16571657
     1658    // select detRun.position (det_id)
    16581659    // select detRun.iteration
    1659     // select detProcessedImfile.det_id
    1660     // select detProcessedImfile.class_id
    16611660    // by:
    16621661    // find the current iteration bassed on det_id
    16631662    // find all exp_ids in the current det_id/iteration from detInputExp
    1664     // find all rawImfiles in the current exp_ids
    1665     // compare to detProcessedImfiles by det_id/exp_id
    1666     // found how many imfile there are in each class_id
     1663    // sort to detInputExp.imfiles to find the largest value per det_id/iter
     1664    // compare imfiles to the number of detStackedImfiles by class_id
    16671665    // and:
     1666    // ???
    16681667    // det_id is not in detStackedImfile;
    16691668    // iteration is not in detStackedImfile;
     
    16711670
    16721671    psString query = psStringCopy(
    1673         " SELECT"
    1674         "    detRun.position,"
    1675         "    detRun.iteration,"
     1672        "SELECT DISTINCT"
     1673        "     detRun.position AS det_id,"
     1674        "     detRun.iteration"
    16761675        " FROM detRun"
    16771676        " LEFT JOIN detInputExp"
    1678         "    ON detRun.position = detInputExp.det_id"
    1679         "    AND detRun.iteration = detInputExp.iteration"
     1677        "     ON detRun.position = detInputExp.det_id"
     1678        "     AND detRun.iteration = detInputExp.iteration"
     1679        " LEFT JOIN rawDetrendExp"
     1680        "     ON detInputExp.exp_id = rawDetrendExp.exp_id"
    16801681        " LEFT JOIN detStackedImfile"
    1681         "    ON detInputExp.det_id = detStackedImfile.det_id"
    1682         "    AND detInputExp.iteration = detStackedImfile.iteration"
    1683         " LEFT JOIN rawImfile"
    1684         "    ON detInputExp.exp_id = rawImfile.exp_id"
    1685         " WHERE"
    1686         "    detStackedImfile.det_id IS NOT NULL"
    1687         "    AND detStackedImfile.iteration IS NOT NULL"
    1688         "    AND detStackedImfile.class_id IS NOT NULL"
     1682        "     ON detInputExp.det_id = detStackedImfile.det_id"
     1683        "     AND detInputExp.iteration = detStackedImfile.iteration"
    16891684        " GROUP BY"
    1690         "    detStackedImfile.class_id,"
    1691         "    rawImfile.class_id"
    1692         " HAVING"
    1693         "    COUNT(detStackedImfile.class_id) = COUNT(rawImfile.class_id)"
     1685        "     rawDetrendExp.imfiles"
     1686        " HAVING MAX(rawDetrendExp.imfiles) = COUNT(detStackedImfile.class_id)"
    16941687        );
     1688
    16951689
    16961690    // XXX does it make sens to accept any search params?
Note: See TracChangeset for help on using the changeset viewer.