IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39041 for trunk


Ignore:
Timestamp:
Nov 5, 2015, 1:04:07 PM (11 years ago)
Author:
eugene
Message:

add zero point keyword option for diffs; add flag for best object; set best object flag in relphot

Location:
trunk/Ohana/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/include/addstar.h

    r38986 r39041  
    131131
    132132char    ZERO_POINT_OPTION[64];
     133char    ZERO_POINT_KEYWORD[64];
    133134float   ZERO_POINT_OFFSET;
    134135float   ZERO_POINT_ERROR;
  • trunk/Ohana/src/addstar/src/ConfigInit.c

    r38553 r39041  
    105105  if (!ScanConfig (config, "ZERO_POINT_OPTION", "%s",  0, ZERO_POINT_OPTION)) {
    106106      strcpy (ZERO_POINT_OPTION, "NOMINAL");
     107  }
     108  // if this config variable is not set, do not set any zero point offset
     109  if (!ScanConfig (config, "ZERO_POINT_KEYWORD", "%s",  0, ZERO_POINT_KEYWORD)) {
     110      strcpy (ZERO_POINT_KEYWORD, "ZPT_OBS");
    107111  }
    108112
  • trunk/Ohana/src/addstar/src/GetZeroPointExposure.c

    r29132 r39041  
    5353            Nhead = headerSets[i].extnum_head;
    5454
    55             if (!gfits_scan (headers[Nhead], "ZPT_OBS", "%f", 1, &ZPT_OBS)) {
     55            if (!gfits_scan (headers[Nhead], ZERO_POINT_KEYWORD, "%f", 1, &ZPT_OBS)) {
    5656                fprintf (stderr, "zero point not supplied in header\n");
    5757                continue;
     
    113113           
    114114            float ZPT_OBS, ZPT_ERR;
    115             if (!gfits_scan (headers[Nhead], "ZPT_OBS", "%f", 1, &ZPT_OBS)) {
     115            if (!gfits_scan (headers[Nhead], ZERO_POINT_KEYWORD, "%f", 1, &ZPT_OBS)) {
    116116                fprintf (stderr, "WARNING: zero point is not measured, no valid entries in headers\n");
    117117                return (FALSE);
  • trunk/Ohana/src/addstar/src/ReadImageHeader.c

    r37807 r39041  
    237237  if (!strcasecmp(ZERO_POINT_OPTION, "CHIP_HEADER")) {
    238238      float ZPT_OBS;
    239       if (!photcodeData || !gfits_scan (header, "ZPT_OBS", "%f", 1, &ZPT_OBS)) {
     239      if (!photcodeData || !gfits_scan (header, ZERO_POINT_KEYWORD, "%f", 1, &ZPT_OBS)) {
    240240          fprintf (stderr, "zero point not supplied in header\n");
    241241          ZERO_POINT_OFFSET = 0.0;
  • trunk/Ohana/src/libdvo/include/dvo.h

    r38986 r39041  
    191191  ID_OBJ_SUSPECT_STACK = 0x20000000, // suspect object in the stack (> 1 good or suspect stack, < 2 good)
    192192  ID_OBJ_BAD_STACK     = 0x40000000, // good-quality object in the stack (> 1 good stack)
     193  ID_OBJ_BEST_STACK    = 0x80000000, // the primary stack measurement are the best measurements
    193194} DVOAverageFlags;
    194195
  • trunk/Ohana/src/libdvo/include/dvodb.h

    r38986 r39041  
    309309      AVE_NMEAS,
    310310      AVE_NMISS,
     311      AVE_NLENSING,
     312      AVE_NLENSOBJ,
     313      AVE_NSTARPAR,
     314      AVE_NGALPHOT,
    311315      AVE_NPOS,
    312316      AVE_OBJ_FLAGS,
  • trunk/Ohana/src/libdvo/src/dbExtractAverages.c

    r38638 r39041  
    127127    case AVE_NMISS:
    128128      value.Int = average[0].Nmissing;
     129      break;
     130    case AVE_NLENSING:
     131      value.Int = average[0].Nlensing;
     132      break;
     133    case AVE_NLENSOBJ:
     134      value.Int = average[0].Nlensobj;
     135      break;
     136    case AVE_NGALPHOT:
     137      value.Int = average[0].Ngalphot;
     138      break;
     139    case AVE_NSTARPAR:
     140      value.Int = average[0].Nstarpar;
    129141      break;
    130142    case AVE_NPOS:
  • trunk/Ohana/src/libdvo/src/dbFields.c

    r38986 r39041  
    711711  if (!strcasecmp (fieldName, "NMEAS"))       ESCAPE (AVE_NMEAS,       OPIHI_INT);
    712712  if (!strcasecmp (fieldName, "NMISS"))       ESCAPE (AVE_NMISS,       OPIHI_INT);
     713  if (!strcasecmp (fieldName, "NLENSMEAS"))   ESCAPE (AVE_NLENSING,    OPIHI_INT);
     714  if (!strcasecmp (fieldName, "NLENSING"))    ESCAPE (AVE_NLENSING,    OPIHI_INT);
     715  if (!strcasecmp (fieldName, "NLENSOBJ"))    ESCAPE (AVE_NLENSOBJ,    OPIHI_INT);
     716  if (!strcasecmp (fieldName, "NSTARPAR"))    ESCAPE (AVE_NSTARPAR,    OPIHI_INT);
     717  if (!strcasecmp (fieldName, "NGALPHOT"))    ESCAPE (AVE_NGALPHOT,    OPIHI_INT);
    713718  if (!strcasecmp (fieldName, "NPOS"))        ESCAPE (AVE_NPOS,        OPIHI_INT);
    714719  if (!strcasecmp (fieldName, "NASTROM"))     ESCAPE (AVE_NPOS,        OPIHI_INT);
  • trunk/Ohana/src/relphot/src/setMrelCatalog.c

    r38986 r39041  
    674674  } // Nsecfilt loop
    675675
     676  // in PSPS, there will be a stackObject row with the primary values.  if all filter primary values which
     677  // exist are also best values, then this row will be the best entry
     678
     679  // the secfilt[Ns] entries are defined to be the Best values, so
     680
     681  // conversely, if any secfilt[Ns] values are not PRIMARY, then the PRIMARY row is not the BEST row
     682
     683  int PrimaryIsBest = TRUE;
     684  for (Ns = 0; Ns < Nphotcodes; Ns++) {
     685    if (!(secfilt[Ns].flags & ID_SECF_HAS_PS1_STACK)) continue; // no stack detection in PS1, nothing is best
     686    if (secfilt[Ns].flags & ID_SECF_STACK_PRIMARY) continue;    // primary stack detection is best
     687    PrimaryIsBest = FALSE;
     688  }
     689
     690  if (PrimaryIsBest) {
     691    average[0].flags |= ID_OBJ_BEST_STACK;
     692  }
     693
    676694  if (NstackGood >= 2) {
    677695    average[0].flags |= ID_OBJ_GOOD_STACK;
Note: See TracChangeset for help on using the changeset viewer.