IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29318


Ignore:
Timestamp:
Oct 4, 2010, 4:29:37 PM (16 years ago)
Author:
rhenders
Message:

Using id rather than expid

Location:
trunk/ippToPsps/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/src/ippToPspsBatchDetection.c

    r29295 r29318  
    5151
    5252    // FrameMeta values
    53     fits_write_col(this->fitsOut, TLONG, FRAMEMETA_FRAMEID, 1, 1, 1, &this->expId, &status);
     53    fits_write_col(this->fitsOut, TLONG, FRAMEMETA_FRAMEID, 1, 1, 1, &this->id, &status);
    5454    fits_write_col(this->fitsOut, TSTRING, FRAMEMETA_FRAMENAME, 1, 1, 1, &this->expName, &status);
    5555
    56     int8_t surveyID = -1;
    57     if (!ippToPspsConfig_getSurveyId(this->config, this->surveyType, &surveyID)) {return PS_EXIT_DATA_ERROR;}
    58     fits_write_col(this->fitsOut, TBYTE, FRAMEMETA_SURVEYID, 1, 1, 1, &surveyID, &status);
     56    fits_write_col(this->fitsOut, TBYTE, FRAMEMETA_SURVEYID, 1, 1, 1, &this->surveyID, &status);
    5957
    6058    int8_t filterID = -1;
     
    8381
    8482    // stuff for detections table
    85     time_t now;
    86     struct tm *ts;
    87     char timeStr[12];
    88     now = time(NULL);
    89     ts = gmtime(&now); // TODO should be UTC
    90     strftime(timeStr, sizeof(timeStr), "%Y-%m-%d", ts);
    91 
    9283    uint32_t s,d, invalidDvoRows, smfJumps, unmatched, totalDetections = 0;
    9384
     
    114105
    115106        filterIDs[s] = filterID;
    116         surveyIDs[s] = surveyID;
    117         strcpy(assocDate[s], timeStr);
     107        surveyIDs[s] = this->surveyID;
     108        strcpy(assocDate[s], this->todaysDate);
    118109    }
    119110
     
    178169
    179170            // create unique int from 'frameID' (aka exposure ID) and ccd number
    180             pspsImageId = (this->expId*100) + image->ccdnum;
     171            pspsImageId = (this->id*100) + image->ccdnum;
    181172
    182173            // now get DVO detections
     
    192183            imageFlags = (uint64_t)image->flags;
    193184            fits_write_col(this->fitsOut, TLONGLONG, IMAGEMETA_IMAGEID, 1, 1, 1, &pspsImageId, &status);
    194             fits_write_col(this->fitsOut, TLONG, IMAGEMETA_FRAMEID, 1, 1, 1, &this->expId, &status);
     185            fits_write_col(this->fitsOut, TLONG, IMAGEMETA_FRAMEID, 1, 1, 1, &this->id, &status);
    195186            fits_write_col(this->fitsOut, TSHORT, IMAGEMETA_CCDID, 1, 1, 1, &image->ccdnum, &status);
    196187            fits_write_col(this->fitsOut, TLONG, IMAGEMETA_PHOTOCALID, 1, 1, 1, &image->photcode, &status);
  • trunk/ippToPsps/src/ippToPspsBatchTest.c

    r29296 r29318  
    4545
    4646    // FrameMeta values
    47 //    fits_write_col(this->fitsOut, TLONG, FRAMEMETA_FRAMEID, 1, 1, 1, &this->expId, &status);
     47//    fits_write_col(this->fitsOut, TLONG, FRAMEMETA_FRAMEID, 1, 1, 1, &this->id, &status);
    4848
    4949    int8_t filterID = -1;
     
    177177
    178178            // create unique int from 'frameID' (aka exposure ID) and ccd number
    179             pspsImageId = (this->expId*100) + pImage->ccdnum;
     179            pspsImageId = (this->id*100) + pImage->ccdnum;
    180180
    181181            // now get DVO detections
Note: See TracChangeset for help on using the changeset viewer.