IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34642 for trunk


Ignore:
Timestamp:
Nov 1, 2012, 10:22:47 AM (14 years ago)
Author:
eugene
Message:

add a -reset-zpts option if we really want to reset the zero points

Location:
trunk/Ohana/src/relphot
Files:
7 edited

Legend:

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

    r34260 r34642  
    137137int    NGRID;
    138138int    RESET;
     139int    RESET_ZEROPTS;
    139140int    UPDATE;
    140141int    SAVE_IMAGE_UPDATES;
  • trunk/Ohana/src/relphot/src/args.c

    r34260 r34642  
    163163  }
    164164
     165  RESET_ZEROPTS = FALSE;
     166  if ((N = get_argument (argc, argv, "-reset-zpts"))) {
     167    remove_argument (N, &argc, argv);
     168    RESET_ZEROPTS = TRUE;
     169  }
     170
    165171  UPDATE = FALSE;
    166172  if ((N = get_argument (argc, argv, "-update"))) {
     
    418424    remove_argument (N, &argc, argv);
    419425    RESET = TRUE;
     426  }
     427
     428  RESET_ZEROPTS = FALSE;
     429  if ((N = get_argument (argc, argv, "-reset-zpts"))) {
     430    remove_argument (N, &argc, argv);
     431    RESET_ZEROPTS = TRUE;
    420432  }
    421433
  • trunk/Ohana/src/relphot/src/load_catalogs.c

    r34405 r34642  
    134134    // KEEP_UBERCAL
    135135    // RESET (-reset)
     136    // RESET_ZEROPTS (-reset-zpts)
    136137    // TimeSelect -time
    137138    // DophotSelect
     
    150151    if (VERBOSE2)      { snprintf (tmpline, 1024, "%s -vv",             command);                    strcpy (command, tmpline); }
    151152    if (RESET)         { snprintf (tmpline, 1024, "%s -reset",          command);                    strcpy (command, tmpline); }
     153    if (RESET_ZEROPTS) { snprintf (tmpline, 1024, "%s -reset-zpts",     command);                    strcpy (command, tmpline); }
    152154    if (!KEEP_UBERCAL) { snprintf (tmpline, 1024, "%s -reset-ubercal",  command);                    strcpy (command, tmpline); }
    153155    if (DophotSelect)  { snprintf (tmpline, 1024, "%s -dophot %d",      command, DophotValue);       strcpy (command, tmpline); }
  • trunk/Ohana/src/relphot/src/reload_catalogs.c

    r34088 r34642  
    172172    // VERBOSE, VERBOSE2
    173173    // RESET
     174    // RESET_ZEROPTS
    174175    // TimeSelect
    175176    // AreaSelect
     
    182183    if (VERBOSE2)         { snprintf (tmpline, 1024, "%s -vv",                  command);                                         strcpy (command, tmpline); }
    183184    if (RESET)            { snprintf (tmpline, 1024, "%s -reset",               command);                                         strcpy (command, tmpline); }
     185    if (RESET_ZEROPTS)    { snprintf (tmpline, 1024, "%s -reset-zpts",          command);                                         strcpy (command, tmpline); }
    184186    if (UPDATE)           { snprintf (tmpline, 1024, "%s -update",              command);                                         strcpy (command, tmpline); }
    185187    if (!KEEP_UBERCAL)    { snprintf (tmpline, 1024, "%s -reset-ubercal",       command);                                         strcpy (command, tmpline); }
  • trunk/Ohana/src/relphot/src/relphot_objects.c

    r34429 r34642  
    162162    if (VERBOSE2)      { snprintf (tmpline, 1024, "%s -vv",             command);                    strcpy (command, tmpline); }
    163163    if (RESET)         { snprintf (tmpline, 1024, "%s -reset",          command);                    strcpy (command, tmpline); }
     164    if (RESET_ZEROPTS) { snprintf (tmpline, 1024, "%s -reset-zpts",     command);                    strcpy (command, tmpline); }
    164165    if (UPDATE)        { snprintf (tmpline, 1024, "%s -update",         command);                    strcpy (command, tmpline); }
    165166    if (!KEEP_UBERCAL) { snprintf (tmpline, 1024, "%s -reset-ubercal",  command);                    strcpy (command, tmpline); }
  • trunk/Ohana/src/relphot/src/select_images.c

    r34088 r34642  
    256256    }
    257257    if (RESET) {
    258       if (!KEEP_UBERCAL || !(image[nimage].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
    259         image[nimage].Mcal = 0.0;
    260         image[nimage].dMcal = NAN;
    261         image[nimage].flags &= ~ID_IMAGE_PHOTOM_UBERCAL;
     258      if (RESET_ZEROPTS) {
     259        if (!KEEP_UBERCAL || !(image[nimage].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
     260          image[nimage].Mcal = 0.0;
     261          image[nimage].dMcal = NAN;
     262          image[nimage].flags &= ~ID_IMAGE_PHOTOM_UBERCAL;
     263        }
    262264      }
    263265      image[nimage].flags &= ~ID_IMAGE_PHOTOM_POOR;
  • trunk/Ohana/src/relphot/src/setMrelFinal.c

    r34429 r34642  
    7575            }
    7676          } else {
    77             if (getImageEntry (m, 0) >= 0) {
     77            if (RESET_ZEROPTS && (getImageEntry (m, 0) >= 0)) {
    7878              catalog[0].measure[m].Mcal = 0.0;
    7979            }
Note: See TracChangeset for help on using the changeset viewer.