IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14091


Ignore:
Timestamp:
Jul 9, 2007, 3:17:14 PM (19 years ago)
Author:
jhoblitt
Message:
  • fix inhere. workdir rawExp to chipRun
  • add option to supply workdir to addprocessedexp
  • add 'reduction' to newExp and rawExp
  • add inherit reduction from newexp -> rawExp and rawExp -> chipRun
Location:
trunk/ippTools
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/scripts/regtest.sh

    r14059 r14091  
    88echo -e "YES\nipp\n\n" | pxadmin -recreate || exit 1
    99
    10 exp_id1=`$inject -newExp -tmp_exp_name t10 -tmp_inst gpc -tmp_telescope ps1 -workdir file::///some/path -simple` || exit 1
     10exp_id1=`$inject -newExp -tmp_exp_name t10 -tmp_inst gpc -tmp_telescope ps1 -workdir file::///some/path -reduction batman -simple` || exit 1
    1111
    1212for ID in `seq 0 3`; do
     
    1616$inject -updatenewExp -exp_id $exp_id1 -state run
    1717
    18 exp_id2=`$inject -newExp -tmp_exp_name t11 -tmp_inst gpc -tmp_telescope ps1 -workdir file::///some/path -simple` || exit 1
     18exp_id2=`$inject -newExp -tmp_exp_name t11 -tmp_inst gpc -tmp_telescope ps1 -workdir file::///some/path -reduction robin -simple` || exit 1
    1919
    2020for ID in `seq 0 3`; do
  • trunk/ippTools/share/regtool_pendingexp.sql

    r14057 r14091  
    1 SELECT DISTINCT * FROM
     1-- output should match the format of newExp
     2SELECT DISTINCT
     3    exp_id,
     4    tmp_exp_name,
     5    tmp_camera,
     6    tmp_telescope,
     7    state,
     8    workdir,
     9    workdir_state,
     10    reduction
     11FROM
    212    (SELECT
    313       newExp.*,
  • trunk/ippTools/src/pxchip.c

    r14065 r14091  
    7474    // create a chipRun
    7575    if (!chipRunInsert(config->dbh,
    76             0x0,
     76            0x0, // chip_id
    7777            (psS64)atoll(exp_id),
    7878            "run",      // state               
  • trunk/ippTools/src/pxchip.h

    r14023 r14091  
    3131                         psString workdir,
    3232                         psString label,
    33                          psString recipe,
     33                         psString reduction,
    3434                         psString expgroup,
    3535                         psString dvodb);
  • trunk/ippTools/src/pxinject.c

    r14037 r14091  
    115115    if (!workdir) {
    116116        psError(PS_ERR_UNKNOWN, true, "-workdir is required");
     117        return false;
     118    }
     119
     120    psString reduction = psMetadataLookupStr(&status, config->args, "-reduction");
     121    if (!status) {
     122        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -reduction");
     123        return false;
     124    }
     125    if (!reduction) {
     126        psError(PS_ERR_UNKNOWN, true, "-reduction is required");
    117127        return false;
    118128    }
     
    125135                "reg", // state
    126136                workdir,
    127                 "dirty"
     137                "dirty",
     138                reduction
    128139            )
    129140        ) {
  • trunk/ippTools/src/pxinjectConfig.c

    r14037 r14091  
    5353    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-workdir",  0,
    5454            "define workdir (required)", 0);
     55    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-reduction",  0,
     56            "define reduction class (required)", 0);
    5557    psMetadataAddBool(newExpArgs, PS_LIST_TAIL, "-simple",  0,
    5658            "use the simple output format", false);
  • trunk/ippTools/src/regtool.c

    r14059 r14091  
    629629            return false;
    630630        }
    631         psFree(rawExp);
    632631
    633632        // if this is a detrend image don't put it in the chip queue (and we're
     
    641640                }
    642641                psError(PS_ERR_UNKNOWN, false, "failed to change newExp.state for exp_id: %s", exp_id);
     642                psFree(rawExp);
    643643                psFree(output);
    644644                return false;
     
    655655            }
    656656            psError(PS_ERR_UNKNOWN, false, "failed to change newExp.state for exp_id: %s", exp_id);
     657            psFree(rawExp);
    657658            psFree(output);
    658659            return false;
     
    661662        // insert an entry into the chipPendingExp table
    662663        // this can only be run as the newExp's state has been set to stop
    663         if (!pxchipQueueByExpTag(config, exp_id, NULL, NULL, NULL, NULL, NULL)) {
     664        if (!pxchipQueueByExpTag(config,
     665                    exp_id, // exp_id is the string version, rawExp->exp_id isa int
     666                    rawExp->workdir,
     667                    NULL, // label
     668                    rawExp->reduction,
     669                    NULL, // expgroup
     670                    NULL  // dvodb
     671        )) {
    664672            // rollback
    665673            if (!psDBRollback(config->dbh)) {
     
    667675            }
    668676            psError(PS_ERR_UNKNOWN, false, "failed to queue chipPendingExp");
     677            psFree(rawExp);
    669678            psFree(output);
    670679            return false;
    671680        }
     681        psFree(rawExp);
    672682    }
    673683    psFree(output);
     
    924934    }
    925935
     936    psString workdir = psMetadataLookupStr(&status, config->args, "-workdir");
     937    if (!status) {
     938        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -workdir");
     939        return false;
     940    }
     941
     942    psString reduction = psMetadataLookupStr(&status, config->args, "-reduction");
     943    if (!status) {
     944        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -reduction");
     945        return false;
     946    }
     947
    926948    psString filter = psMetadataLookupStr(&status, config->args, "-filter");
    927949    if (!status) {
     
    10651087        exp_type,
    10661088        filelevel,
    1067         exp->workdir,
     1089        workdir ? workdir : exp->workdir,
     1090        reduction ? reduction : exp->reduction,
    10681091        filter,
    10691092        airmass,
  • trunk/ippTools/src/regtoolConfig.c

    r14059 r14091  
    176176    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-filelevel",  0,
    177177        "define the data partitioning level of this file", NULL);
    178     psMetadataAddStr(addprocessedimfileArgs, PS_LIST_TAIL, "-workdir",  0,
     178    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-workdir",  0,
    179179        "define the \"default\" workdir for this exposure", NULL);
     180    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-reduction",  0,
     181        "define the \"default\" reduction class for this exposure", NULL);
    180182    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-filter",  0,
    181183        "define filter ", NULL);
Note: See TracChangeset for help on using the changeset viewer.