IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34216


Ignore:
Timestamp:
Jul 27, 2012, 2:57:11 PM (14 years ago)
Author:
eugene
Message:

change stack detection ID to use image sourceID, imageID, detectionID

Location:
branches/eam_branches/ipp-20120627/Ohana/src/addstar
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120627/Ohana/src/addstar/include/addstar.h

    r33963 r34216  
    297297uint64_t CreatePSPSDetectionID(double tobs, int ccdid, int detID);
    298298uint64_t CreatePSPSObjectID(double ra, double dec);
     299uint64_t CreatePSPSStackDetectionID(int sourceID, int imageID, int detID);
    299300
    300301int altaz (double *alt, double *az, double ha, double dec, double latitude);
  • branches/eam_branches/ipp-20120627/Ohana/src/addstar/src/FilterStars.c

    r34194 r34216  
    108108      double mjd;
    109109      mjd = ohana_sec_to_mjd (image[0].tzero);
    110       stars[N].measure.extID = CreatePSPSDetectionID(mjd, image[0].ccdnum, stars[N].measure.detID);
     110      int isStack = ((image[0].photcode >= 11000) && (image[0].photcode <= 11400));
     111
     112      if (isStack) {
     113        stars[N].measure.extID = CreatePSPSStackDetectionID(image[0].sourceID, image[0].externID, stars[N].measure.detID);
     114      } else {
     115        stars[N].measure.extID = CreatePSPSDetectionID(mjd, image[0].ccdnum, stars[N].measure.detID);
     116      }
    111117    } else {
    112118      stars[N].measure.extID = 0;
  • branches/eam_branches/ipp-20120627/Ohana/src/addstar/src/psps_ids.c

    r27527 r34216  
    1919   
    2020uint64_t
     21CreatePSPSStackDetectionID(int sourceID, int imageID, int detID)
     22{
     23  // sourceID : ID of database + table that tracked the image (< 0x100 = 256)
     24  // imageID : external ID of the image which provided the detections (< 0x1000.0000 ~ 2.7e8)
     25  // detID : detection sequence in image (< 0x1000.0000 ~ 2.7e8)
     26
     27  assert (detID    < 0x10000000);
     28  assert (imageID  < 0x10000000);
     29  assert (sourceID < 0x100);
     30 
     31  uint64_t detectid = ((uint64_t)sourceID << 56) + ((uint64_t)imageID << 28) + (uint64_t)detID;
     32  return detectid;
     33}
     34   
     35uint64_t
    2136CreatePSPSObjectID(double ra, double dec)
    2237{
Note: See TracChangeset for help on using the changeset viewer.