IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 6, 2017, 11:30:10 AM (10 years ago)
Author:
eugene
Message:

merging changes from czw dev branch (compare with r39924)

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/Ohana

  • trunk/Ohana/src/relphot/include/relphot.h

    r39648 r39926  
    309309int    RESET_ZEROPTS;
    310310int    REPAIR_WARPS;
     311int    PRESERVE_PS1;
    311312int    UPDATE;
    312313int    SAVE_IMAGE_UPDATES;
     
    616617int isTYCHO (int photcode);
    617618
     619int isHSCchip  (int photcode);
     620int isCFHchip  (int photcode);
     621
    618622int magStatsByRanking (StatDataSet *dataset, StatType *stats);
    619623
  • trunk/Ohana/src/relphot/src/args.c

    r39642 r39926  
    226226    remove_argument (N, &argc, argv);
    227227    REPAIR_WARPS = TRUE;
     228  }
     229
     230  PRESERVE_PS1 = FALSE;
     231  if ((N = get_argument (argc, argv, "-preserve-ps1"))) {
     232    remove_argument (N, &argc, argv);
     233    PRESERVE_PS1 = TRUE;
    228234  }
    229235
     
    672678  }
    673679
     680  PRESERVE_PS1 = FALSE;
     681  if ((N = get_argument (argc, argv, "-preserve-ps1"))) {
     682    remove_argument (N, &argc, argv);
     683    PRESERVE_PS1 = TRUE;
     684  }
     685
    674686  REPAIR_WARPS = FALSE;
    675687  if ((N = get_argument (argc, argv, "-repair-warps"))) {
  • trunk/Ohana/src/relphot/src/extra.c

    r38993 r39926  
    22
    33// for now (20140710) I need to identify gpc1 chips explicitly.  generalize in the future
     4// note that the 4000, 14000, 15000 sets are SIMTEST (*not* synthetic)
    45int whichGPC1filter (int photcode) {
    56
    6   if (((photcode > 10000) && (photcode < 10077)) || (photcode == 4100)) return PS1_g; // g-band
     7  if (((photcode > 10000) && (photcode < 10077)) || (photcode == 4100)) return PS1_g; // g-band 
    78  if (((photcode > 10100) && (photcode < 10177)) || (photcode == 4200)) return PS1_r; // r-band
    89  if (((photcode > 10200) && (photcode < 10277)) || (photcode == 4300)) return PS1_i; // i-band
     
    8384}
    8485
     86// for now (20160925) I need to identify HSC chips explicitly.  generalize in the future
     87int isHSCchip (int photcode) {
     88
     89  if ((photcode >= 20000) && (photcode <= 20111)) return TRUE; // g-band
     90  if ((photcode >= 21000) && (photcode <= 21111)) return TRUE; // r-band
     91  if ((photcode >= 22000) && (photcode <= 22111)) return TRUE; // i-band
     92  if ((photcode >= 23000) && (photcode <= 23111)) return TRUE; // z-band
     93  if ((photcode >= 24000) && (photcode <= 24111)) return TRUE; // y-band
     94
     95  return FALSE;
     96}
     97
     98// for now (20160925) I need to identify CFH chips explicitly.  generalize in the future
     99int isCFHchip (int photcode) {
     100
     101  if ((photcode >= 100) && (photcode <= 152)) return TRUE; // g-band
     102  if ((photcode >= 200) && (photcode <= 252)) return TRUE; // r-band
     103  if ((photcode >= 300) && (photcode <= 352)) return TRUE; // i-band
     104  if ((photcode >= 400) && (photcode <= 452)) return TRUE; // z-band
     105  if ((photcode >= 500) && (photcode <= 552)) return TRUE; // y-band
     106
     107  return FALSE;
     108}
     109
  • trunk/Ohana/src/relphot/src/reload_catalogs.c

    r39511 r39926  
    239239    if (RESET)             { strextend (&command, "-reset"); }
    240240    if (RESET_ZEROPTS)     { strextend (&command, "-reset-zpts"); }
     241    if (PRESERVE_PS1)      { strextend (&command, "-preserve-ps1"); }
    241242    if (UPDATE)            { strextend (&command, "-update"); }
    242243    if (IS_DIFF_DB)        { strextend (&command, "-is-diff-db"); }
  • trunk/Ohana/src/relphot/src/relphot_objects.c

    r39643 r39926  
    243243    if (RESET_ZEROPTS)     { strextend (&command, "-reset-zpts"); }
    244244    if (REPAIR_WARPS)      { strextend (&command, "-repair-warps"); }
     245    if (PRESERVE_PS1)      { strextend (&command, "-preserve-ps1"); }
    245246    if (IS_DIFF_DB)        { strextend (&command, "-is-diff-db"); }
    246247    if (UPDATE)            { strextend (&command, "-update"); }
  • trunk/Ohana/src/relphot/src/setMrelCatalog.c

    r39636 r39926  
    142142  int Galaxy2MASS = FALSE;
    143143  int haveTYCHO = FALSE;
     144  int haveHSC = FALSE;
     145  int haveCFH = FALSE;
    144146
    145147  float stargalmax = 0.0;
     
    163165   
    164166    if (isTYCHO(measureT[k].photcode)) { haveTYCHO = TRUE; }
     167    if (isHSCchip(measureT[k].photcode)) { haveHSC = TRUE; }
     168    if (isCFHchip(measureT[k].photcode)) { haveCFH = TRUE; }
    165169
    166170    if (is2MASS(measureT[k].photcode)) {
     
    317321  // now calculate the mean stats for the Nsec bands.
    318322  for (Nsec = 0; Nsec < Nsecfilt; Nsec++) {
    319     dvo_secfilt_init (&secfilt[Nsec], SECFILT_RESET_CHIP); // this does not reset astrometry or STACK bits
     323
     324    // if we detected this object in PS1, or do not request -preserve-ps1, keep the mean photometry values
     325    if (!PRESERVE_PS1 || !(secfilt[Nsec].flags & ID_SECF_HAS_PS1)) {
     326      dvo_secfilt_init (&secfilt[Nsec], SECFILT_RESET_CHIP); // this does not reset astrometry or STACK bits
     327    }
     328
     329    if (haveTYCHO) {
     330      secfilt[Nsec].flags |= ID_SECF_HAS_TYCHO;
     331    }
     332    if (haveHSC) {
     333      secfilt[Nsec].flags |= ID_SECF_HAS_HSC;
     334    }
     335    if (haveCFH) {
     336      secfilt[Nsec].flags |= ID_SECF_HAS_CFH;
     337    }
     338
     339    if (PRESERVE_PS1 && (secfilt[Nsec].flags & ID_SECF_HAS_PS1)) continue;
     340    // if -preserve-ps1 is set and this object has PS1 data, skip the rest of the steps:
    320341
    321342    // XXX hardwired grizy = (01234) JHK = (567) w = (8)
     
    324345    } else {
    325346      secfilt[Nsec].Ncode = results->Nmeas[Nsec]; // 2MASS data if it exists
    326     }
    327 
    328     if (haveTYCHO) {
    329       secfilt[Nsec].flags |= ID_SECF_HAS_TYCHO;
    330347    }
    331348
Note: See TracChangeset for help on using the changeset viewer.