IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40369


Ignore:
Timestamp:
Mar 15, 2018, 5:08:26 PM (8 years ago)
Author:
watersc1
Message:

Update to allow HSC data to be processed by setphot. The setphot.c change should NOT be merged to the trunk. The others are safe

Location:
branches/czw_branch/20170908/Ohana/src/uniphot/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20170908/Ohana/src/uniphot/src/cam_zpt_correction.c

    r40129 r40369  
    286286  // table->offset[seq][ix][iy] with dM values for image[seq]
    287287
     288  // Set up HSC/GPC1 distinguishing limits
     289
     290  int minCodeGPC1 = 10000;
     291  int maxCodeGPC1 = 10576;
     292
     293  int minCodeHSC  = 20000;
     294  int maxCodeHSC  = 26111;
     295
     296  int isGPC1 = FALSE;
     297  int isHSC  = FALSE;
     298   
    288299  // loop over the flatcorr images and match from image[seq] to newcorr:
    289300  for (i = 0; i < flatcorr->Nimage; i++) {
     
    302313    int photcode = flatcorr->image[i].photcode;
    303314
     315    if ((photcode >= minCodeGPC1)&&(photcode <= maxCodeGPC1)) {
     316      isGPC1 = TRUE;
     317      isHSC  = FALSE;
     318    }
     319    else if ((photcode >= minCodeHSC)&&(photcode <= maxCodeHSC)) {
     320      isGPC1 = FALSE;
     321      isHSC  = TRUE;
     322    }
     323    if (!(isGPC1) && !(isHSC)) { continue; }
     324
     325    int iy, ix, filter;
     326
     327   
    304328    // find the chip and filter from photcode:
    305     int iy = photcode % 10;
    306     int ix = (int)(photcode / 10) % 10;
    307     int filter = (int)(photcode / 100) % 10;
     329    if (isGPC1) {
     330      iy = photcode % 10;
     331      ix = (int)(photcode / 10) % 10;
     332      filter = (int)(photcode / 100) % 10;
     333    }
     334    else if (isHSC) {
     335      iy = 0;
     336      ix = (int) photcode % 112;
     337      filter = (int)(photcode / 1000) % 10;
     338    }
    308339             
    309340    myAssert (ix     < newcorr->Nx, "oops");
  • branches/czw_branch/20170908/Ohana/src/uniphot/src/match_camcorr_to_images.c

    r40129 r40369  
    5555      }
    5656      else if (isHSC) {
    57         int ix = photcode % 112;
    5857        int filter = (int)(photcode / 1000) % 10;
    59 
     58        int ix = photcode - 20000 - filter * 1000;
     59       
    6060        seq = ix + filter * camcorr->Nchips + j * camcorr->Nflats;
    6161      }
  • branches/czw_branch/20170908/Ohana/src/uniphot/src/setphot.c

    r40129 r40369  
    7373    // we are going to deprecate the flatcorr imaage lookup
    7474    // match_flatcorr_to_images (image, Nimage, &flatcorrTable);
    75     match_camcorr_to_images (image, Nimage, camcorr);
     75  match_camcorr_to_images (image, Nimage, camcorr);
    7676    //  }
    7777
Note: See TracChangeset for help on using the changeset viewer.