IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33230


Ignore:
Timestamp:
Feb 10, 2012, 7:34:05 AM (14 years ago)
Author:
eugene
Message:

fixing "update" function names

Location:
branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src
Files:
1 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/setphot_client.c

    r33227 r33230  
    2424  FlatCorrectionTable *flatcorrTable = FlatCorrectionLoad (flatcorrFile);
    2525
    26   update_setphot(image, Nimage, flatcorrTable);
     26  update_dvo_setphot_client (image, Nimage, flatcorrTable);
    2727
    2828  exit (0);
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot_client.c

    r33227 r33230  
    44// we want to load a subset of image data for this operation.  we only need:
    55// imageID, photom_map_id, Mcal, dMcal, flags. 
    6 int update_setphot (Image *image, off_t Nimage, FlatCorrectionTable *flatcorr) {
     6int update_dvo_setphot_client (Image *image, off_t Nimage, FlatCorrectionTable *flatcorr) {
    77
    88  SkyRegion UserPatch;
     
    8181  return (TRUE);
    8282}     
    83 
    84 void update_catalog_setphot_client (Catalog *catalog, Image *image, off_t *index, off_t Nimage, FlatCorrectionTable *flatcorr) {
    85 
    86   off_t i, j, found;
    87 
    88   found = 0;   
    89   for (i = 0; i < catalog[0].Naverage; i++) {
    90 
    91     off_t m = catalog[0].average[i].measureOffset;
    92     for (j = 0; j < catalog[0].average[i].Nmeasure; j++, m++) {
    93       off_t idx = catalog[0].measure[m].imageID;
    94       if (idx <= 0) continue; // detections with imageID == 0 do not have a valid image (eg, ref photcode)
    95 
    96       off_t id = index[idx];
    97       float Mcal = image[id].Mcal;
    98       float dMcal = image[id].dMcal;
    99       float Mcal_offset = 0.0;
    100 
    101       // if we know about a flat-field correction, then we need to apply the sub-chip correction
    102       int flat_id = image[id].photom_map_id;
    103       if (flat_id > 0) {
    104           Mcal_offset = FlatCorrectionOffset (flatcorr, flat_id, catalog[0].measure[m].Xccd, catalog[0].measure[m].Yccd);
    105       }
    106 
    107       catalog[0].measure[m].Mcal = Mcal - Mcal_offset;
    108       catalog[0].measure[m].dMcal = dMcal;
    109 
    110       // if we are setting the zero points from an UBERCAL database, and this detection is from one of those images,
    111       // then tag the measurement as well
    112       if (UBERCAL && (image[id].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
    113         catalog[0].measure[m].dbFlags |=  ID_MEAS_PHOTOM_UBERCAL;
    114       }
    115 
    116       found ++;
    117     }
    118   }
    119 
    120   if (found) {
    121     fprintf (stderr, "found "OFF_T_FMT" matches\n", found);
    122   }
    123 }
Note: See TracChangeset for help on using the changeset viewer.