IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 6, 2009, 3:48:25 PM (17 years ago)
Author:
eugene
Message:

fixed up addtool

File:
1 edited

Legend:

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

    r25299 r25789  
    2828#include "pxtools.h"
    2929#include "pxadd.h"
    30 
    31 bool pxaddSetSearchArgs (psMetadata *md) {
    32 
    33     psMetadataAddS64(md,  PS_LIST_TAIL, "-add_id",            0, "search by add_id", 0);
    34     psMetadataAddS64(md,  PS_LIST_TAIL, "-cam_id",             0, "search by cam_id", 0);
    35 
    36 /*     psMetadataAddStr(md,  PS_LIST_TAIL, "-exp_name",           0, "search by exp_name", NULL); */
    37 /*     psMetadataAddStr(md,  PS_LIST_TAIL, "-inst",               0, "search for camera", NULL); */
    38 /*     psMetadataAddStr(md,  PS_LIST_TAIL, "-telescope",          0, "search for telescope", NULL); */
    39 /*     psMetadataAddTime(md, PS_LIST_TAIL, "-dateobs_begin",      0, "search for exposures by time (>=)", NULL); */
    40 /*     psMetadataAddTime(md, PS_LIST_TAIL, "-dateobs_end",        0, "search for exposures by time (<)", NULL); */
    41 /*     psMetadataAddStr(md,  PS_LIST_TAIL, "-exp_tag",            0, "search by exp_tag", NULL); */
    42 /*     psMetadataAddStr(md,  PS_LIST_TAIL, "-exp_type",           0, "search by exp_type", NULL); */
    43 /*     psMetadataAddStr(md,  PS_LIST_TAIL, "-comment",            0, "search by comment", NULL); */
    44 /*     psMetadataAddStr(md,  PS_LIST_TAIL, "-filelevel",          0, "search by filelevel", NULL); */
    45 /*     psMetadataAddStr(md,  PS_LIST_TAIL, "-filter",             0, "search for filter", NULL); */
    46 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-airmass_min",        0, "define min airmass", NAN); */
    47 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-airmass_max",        0, "define max airmass", NAN); */
    48 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-ra_min",             0, "define min RA (degrees) ", NAN); */
    49 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-ra_max",             0, "define max RA (degrees) ", NAN); */
    50 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-decl_min",           0, "define min DEC (degrees)", NAN); */
    51 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-decl_max",           0, "define max DEC (degrees)", NAN); */
    52 /*     psMetadataAddF32(md,  PS_LIST_TAIL, "-exp_time_min",       0, "define min exposure time", NAN); */
    53 /*     psMetadataAddF32(md,  PS_LIST_TAIL, "-exp_time_max",       0, "define max exposure time", NAN); */
    54 /*     psMetadataAddF32(md,  PS_LIST_TAIL, "-sat_pixel_frac_min", 0, "define max fraction of saturated pixels", NAN); */
    55 /*     psMetadataAddF32(md,  PS_LIST_TAIL, "-sat_pixel_frac_max", 0, "define max fraction of saturated pixels", NAN); */
    56 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-bg_min",             0, "define min background", NAN); */
    57 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-bg_max",             0, "define max background", NAN); */
    58 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-bg_stdev_min",       0, "define min background standard deviation", NAN); */
    59 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-bg_stdev_max",       0, "define max background standard deviation", NAN); */
    60 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-bg_mean_stdev_min",  0, "define min background mean standard deviation (across imfiles)", NAN); */
    61 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-bg_mean_stdev_max",  0, "define max background mean standard deviation (across imfiles)", NAN); */
    62 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-alt_min",            0, "define min altitude", NAN); */
    63 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-alt_max",            0, "define max altitude", NAN); */
    64 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-az_min",             0, "define min azimuth ", NAN); */
    65 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-az_max",             0, "define max azimuth ", NAN); */
    66 /*     psMetadataAddF32(md,  PS_LIST_TAIL, "-ccd_temp_min",       0, "define min ccd tempature", NAN); */
    67 /*     psMetadataAddF32(md,  PS_LIST_TAIL, "-ccd_temp_max",       0, "define max ccd tempature", NAN); */
    68 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-posang_min",         0, "define min rotator position angle", NAN); */
    69 /*     psMetadataAddF64(md,  PS_LIST_TAIL, "-posang_max",         0, "define max rotator position angle", NAN); */
    70 /*     psMetadataAddStr(md,  PS_LIST_TAIL, "-object",             0, "search by exposure object", NULL); */
    71 /*     psMetadataAddF32(md,  PS_LIST_TAIL, "-sun_angle_min",      0, "define min solar angle", NAN); */
    72 /*     psMetadataAddF32(md,  PS_LIST_TAIL, "-sun_angle_max",      0, "define max solar angle", NAN); */
    73 
    74     return true;
    75 }
    76 
    77 bool pxaddGetSearchArgs (pxConfig *config, psMetadata *where) {
    78 
    79     PXOPT_COPY_S64(config->args,     where, "-add_id",             "addRun.add_id",        "==");
    80 /*     PXOPT_COPY_S64(config->args,     where, "-cam_id",             "camRun.cam_id",        "=="); */
    81 /*     PXOPT_COPY_S64(config->args,   where, "-chip_id",            "chipRun.chip_id",   "=="); */
    82 /*     PXOPT_COPY_S64(config->args,   where, "-exp_id",             "rawExp.exp_id",     "=="); */
    83 /*     PXOPT_COPY_STR(config->args,   where, "-exp_name",           "rawExp.exp_name",   "=="); */
    84 /*     PXOPT_COPY_STR(config->args,   where, "-inst",               "rawExp.camera",     "=="); */
    85 /*     PXOPT_COPY_STR(config->args,   where, "-telescope",          "rawExp.telescope",  "=="); */
    86 /*     PXOPT_COPY_TIME(config->args,  where, "-dateobs_begin",      "rawExp.dateobs",    ">="); */
    87 /*     PXOPT_COPY_TIME(config->args,  where, "-dateobs_end",        "rawExp.dateobs",    "<="); */
    88 /*     PXOPT_COPY_STR(config->args,   where, "-exp_tag",            "rawExp.exp_tag",    "=="); */
    89 /*     PXOPT_COPY_STR(config->args,   where, "-exp_type",           "rawExp.exp_type",   "=="); */
    90 /*     PXOPT_COPY_STR(config->args,   where, "-comment",            "rawExp.comment",    "LIKE"); */
    91 /*     PXOPT_COPY_STR(config->args,   where, "-filelevel",          "rawExp.filelevel",  "=="); */
    92 /*     PXOPT_COPY_STR(config->args,   where, "-filter",             "rawExp.filter",         "=="); */
    93 /*     PXOPT_COPY_F64(config->args,   where, "-airmass_min",        "rawExp.airmass",        ">="); */
    94 /*     PXOPT_COPY_F64(config->args,   where, "-airmass_max",        "rawExp.airmass",        "<"); */
    95 /*     PXOPT_COPY_RADEC(config->args, where, "-ra_min",             "rawExp.ra",             ">="); */
    96 /*     PXOPT_COPY_RADEC(config->args, where, "-ra_max",             "rawExp.ra",             "<"); */
    97 /*     PXOPT_COPY_RADEC(config->args, where, "-decl_min",           "rawExp.decl",           ">="); */
    98 /*     PXOPT_COPY_RADEC(config->args, where, "-decl_max",           "rawExp.decl",           "<"); */
    99 /*     PXOPT_COPY_F32(config->args,   where, "-exp_time_min",       "rawExp.exp_time",       ">="); */
    100 /*     PXOPT_COPY_F32(config->args,   where, "-exp_time_max",       "rawExp.exp_time",       "<"); */
    101 /*     PXOPT_COPY_F32(config->args,   where, "-sat_pixel_frac_min", "rawExp.sat_pixel_frac", ">="); */
    102 /*     PXOPT_COPY_F32(config->args,   where, "-sat_pixel_frac_max", "rawExp.sat_pixel_frac", "<"); */
    103 /*     PXOPT_COPY_F64(config->args,   where, "-bg_min",             "rawExp.bg",             ">="); */
    104 /*     PXOPT_COPY_F64(config->args,   where, "-bg_max",             "rawExp.bg",             "<"); */
    105 /*     PXOPT_COPY_F64(config->args,   where, "-bg_stdev_min",       "rawExp.bg_stdev",       ">="); */
    106 /*     PXOPT_COPY_F64(config->args,   where, "-bg_stdev_max",       "rawExp.bg_stdev",       "<"); */
    107 /*     PXOPT_COPY_F64(config->args,   where, "-bg_mean_stdev_min",  "rawExp.bg_mean_stdev",  ">="); */
    108 /*     PXOPT_COPY_F64(config->args,   where, "-bg_mean_stdev_max",  "rawExp.bg_mean_stdev",  "<"); */
    109 /*     PXOPT_COPY_F64(config->args,   where, "-alt_min",            "rawExp.alt",            ">="); */
    110 /*     PXOPT_COPY_F64(config->args,   where, "-alt_max",            "rawExp.alt",            "<"); */
    111 /*     PXOPT_COPY_F64(config->args,   where, "-az_min",             "rawExp.az",             ">="); */
    112 /*     PXOPT_COPY_F64(config->args,   where, "-az_max",             "rawExp.az",             "<"); */
    113 /*     PXOPT_COPY_F32(config->args,   where, "-ccd_temp_min",       "rawExp.ccd_temp",       ">="); */
    114 /*     PXOPT_COPY_F32(config->args,   where, "-ccd_temp_max",       "rawExp.ccd_temp",       "<"); */
    115 /*     PXOPT_COPY_F64(config->args,   where, "-posang_min",         "rawExp.posang",         ">="); */
    116 /*     PXOPT_COPY_F64(config->args,   where, "-posang_max",         "rawExp.posang",         "<"); */
    117 /*     PXOPT_COPY_STR(config->args,   where, "-object",             "rawExp.object",         "=="); */
    118 /*     PXOPT_COPY_F32(config->args,   where, "-sun_angle_min",      "rawExp.sun_angle",      ">="); */
    119 /*     PXOPT_COPY_F32(config->args,   where, "-sun_angle_max",      "rawExp.sun_angle",      "<"); */
    120 
    121     return true;
    122 }
    12330
    12431bool pxaddRunSetState(pxConfig *config, psS64 add_id, const char *state, psS64 magicked)
     
    236143        }
    237144    }
    238     //    fprintf(stderr,"%s",query);
     145
    239146    // queue the exp
    240     // XXX chip_id is being cast here work around psS64 have a different type
    241     // different on 32/64
     147    // Note: cam_id is being cast here work around psS64 have a different type different
     148    // on 32/64
    242149    if (!p_psDBRunQueryF(config->dbh, query,
    243150                         "new", // state
Note: See TracChangeset for help on using the changeset viewer.