IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 25, 2016, 6:40:08 AM (10 years ago)
Author:
eugene
Message:

set bits for HSC and CFH if available; add option to preserve ps1 mean photometry

Location:
branches/czw_branch/20160809/Ohana/src/relphot
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20160809/Ohana/src/relphot/include/relphot.h

    r39648 r39721  
    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
  • branches/czw_branch/20160809/Ohana/src/relphot/src/args.c

    r39642 r39721  
    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"))) {
  • branches/czw_branch/20160809/Ohana/src/relphot/src/extra.c

    r38993 r39721  
    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
  • branches/czw_branch/20160809/Ohana/src/relphot/src/reload_catalogs.c

    r39511 r39721  
    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"); }
  • branches/czw_branch/20160809/Ohana/src/relphot/src/relphot_objects.c

    r39643 r39721  
    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"); }
  • branches/czw_branch/20160809/Ohana/src/relphot/src/setMrelCatalog.c

    r39636 r39721  
    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++) {
     323
     324    // if we detected this object in PS1, keep the mean photometry
     325    if (PRESERVE_PS1) {
     326      if (secfilt[Nsec].flags & ID_SECF_HAS_PS1) continue;
     327    }
     328
    319329    dvo_secfilt_init (&secfilt[Nsec], SECFILT_RESET_CHIP); // this does not reset astrometry or STACK bits
    320330
     
    328338    if (haveTYCHO) {
    329339      secfilt[Nsec].flags |= ID_SECF_HAS_TYCHO;
     340    }
     341    if (haveHSC) {
     342      secfilt[Nsec].flags |= ID_SECF_HAS_HSC;
     343    }
     344    if (haveCFH) {
     345      secfilt[Nsec].flags |= ID_SECF_HAS_CFH;
    330346    }
    331347
Note: See TracChangeset for help on using the changeset viewer.