IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 8, 2007, 4:56:46 PM (19 years ago)
Author:
jhoblitt
Message:

add warpSkyfile.ignore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/src/ippdb.c

    r15421 r15530  
    95929592static void warpSkyfileRowFree(warpSkyfileRow *object);
    95939593
    9594 warpSkyfileRow *warpSkyfileRowAlloc(psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF64 good_frac, psS16 fault)
     9594warpSkyfileRow *warpSkyfileRowAlloc(psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF64 good_frac, bool ignore, psS16 fault)
    95959595{
    95969596    warpSkyfileRow  *_object;
     
    96079607    _object->bg_stdev = bg_stdev;
    96089608    _object->good_frac = good_frac;
     9609    _object->ignore = ignore;
    96099610    _object->fault = fault;
    96109611
     
    96639664        return false;
    96649665    }
     9666    if (!psMetadataAdd(md, PS_LIST_TAIL, "ignore", PS_DATA_BOOL, "Key", 0)) {
     9667        psError(PS_ERR_UNKNOWN, false, "failed to add item ignore");
     9668        psFree(md);
     9669        return false;
     9670    }
    96659671    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key", 0)) {
    96669672        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
     
    96819687}
    96829688
    9683 bool warpSkyfileInsert(psDB * dbh, psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF64 good_frac, psS16 fault)
     9689bool warpSkyfileInsert(psDB * dbh, psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF64 good_frac, bool ignore, psS16 fault)
    96849690{
    96859691    psMetadata *md = psMetadataAlloc();
     
    97219727    if (!psMetadataAdd(md, PS_LIST_TAIL, "good_frac", PS_DATA_F64, NULL, good_frac)) {
    97229728        psError(PS_ERR_UNKNOWN, false, "failed to add item good_frac");
     9729        psFree(md);
     9730        return false;
     9731    }
     9732    if (!psMetadataAdd(md, PS_LIST_TAIL, "ignore", PS_DATA_BOOL, NULL, ignore)) {
     9733        psError(PS_ERR_UNKNOWN, false, "failed to add item ignore");
    97239734        psFree(md);
    97249735        return false;
     
    97529763bool warpSkyfileInsertObject(psDB *dbh, warpSkyfileRow *object)
    97539764{
    9754     return warpSkyfileInsert(dbh, object->warp_id, object->skycell_id, object->tess_id, object->uri, object->path_base, object->bg, object->bg_stdev, object->good_frac, object->fault);
     9765    return warpSkyfileInsert(dbh, object->warp_id, object->skycell_id, object->tess_id, object->uri, object->path_base, object->bg, object->bg_stdev, object->good_frac, object->ignore, object->fault);
    97559766}
    97569767
     
    98659876        return false;
    98669877    }
     9878    if (!psMetadataAdd(md, PS_LIST_TAIL, "ignore", PS_DATA_BOOL, NULL, object->ignore)) {
     9879        psError(PS_ERR_UNKNOWN, false, "failed to add item ignore");
     9880        psFree(md);
     9881        return false;
     9882    }
    98679883    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
    98689884        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
     
    99199935        return false;
    99209936    }
     9937    bool ignore = psMetadataLookupBool(&status, md, "ignore");
     9938    if (!status) {
     9939        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ignore");
     9940        return false;
     9941    }
    99219942    psS16 fault = psMetadataLookupS16(&status, md, "fault");
    99229943    if (!status) {
     
    99259946    }
    99269947
    9927     return warpSkyfileRowAlloc(warp_id, skycell_id, tess_id, uri, path_base, bg, bg_stdev, good_frac, fault);
     9948    return warpSkyfileRowAlloc(warp_id, skycell_id, tess_id, uri, path_base, bg, bg_stdev, good_frac, ignore, fault);
    99289949}
    99299950psArray *warpSkyfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
Note: See TracChangeset for help on using the changeset viewer.