IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 8, 2022, 5:04:42 PM (5 years ago)
Author:
eugene
Message:

merge changes from trunk (UKIRT addstar, relphot mods, dvomerge mods, ippCheck work, mlayer

Location:
branches/eam_branches/ipp-20220316
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316

  • branches/eam_branches/ipp-20220316/Ohana

  • branches/eam_branches/ipp-20220316/Ohana/src/relphot

  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/include/relphot.h

    r42112 r42166  
    721721int relphot_images (SkyList *skylist);
    722722
    723 void relphot_usage (void);
     723void relphot_usage (int argc, char **argv);
    724724void relphot_help (int argc, char **argv);
    725725
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/ResetOps.c

    r41946 r42166  
    123123
    124124  for (off_t i = 0; i < catalog->Naverage; i++) {
    125     catalog->average[i].psfQF     = NAN;        // force recalculation in setMrelCatalog
    126     catalog->average[i].psfQFperf = NAN;        // force recalculation in setMrelCatalog
    127     catalog->average[i].stargal   = NAN;        // force recalculation in setMrelCatalog
    128     catalog->average[i].photFlagsUpper = 0;     // reset (will be re-calculated)
    129     catalog->average[i].photFlagsLower = 0;     // reset (will be re-calculated)
    130     catalog->average[i].NwarpOK        = 0;     // reset (will be re-calculated)
     125    if (STAGES & STAGE_CHIP) {
     126      catalog->average[i].psfQF     = NAN;      // force recalculation in setMrelCatalog
     127      catalog->average[i].psfQFperf = NAN;      // force recalculation in setMrelCatalog
     128      catalog->average[i].stargal   = NAN;      // force recalculation in setMrelCatalog
     129      catalog->average[i].photFlagsUpper = 0;   // reset (will be re-calculated)
     130      catalog->average[i].photFlagsLower = 0;   // reset (will be re-calculated)
     131    }
     132   
     133    if (STAGES & STAGE_WARP) {
     134      catalog->average[i].NwarpOK        = 0;   // reset (will be re-calculated)
     135    }
    131136
    132137    // RESET_FLATCORR independent of RESET?
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/args.c

    r42112 r42166  
    203203    remove_argument (N, &argc, argv);
    204204    TEST_IMAGE1 = strtol(argv[N], &endptr, 0);
    205     if (*endptr) relphot_usage ();
     205    if (*endptr) relphot_usage (argc, argv);
    206206    remove_argument (N, &argc, argv);
    207207  }
    … …  
    211211    remove_argument (N, &argc, argv);
    212212    TEST_IMAGE2 = strtol(argv[N], &endptr, 0);
    213     if (*endptr) relphot_usage ();
     213    if (*endptr) relphot_usage (argc, argv);
    214214    remove_argument (N, &argc, argv);
    215215  }
    … …  
    584584    remove_argument (N, &argc, argv);
    585585    mode = PARALLEL_IMAGES;
    586     if (N >= argc) relphot_usage();
     586    if (N >= argc) relphot_usage(argc, argv);
    587587    IMAGE_TABLE = strcreate (argv[N]);
    588588    remove_argument (N, &argc, argv);
    589     if (!REGION_FILE) relphot_usage();
     589    if (!REGION_FILE) relphot_usage(argc, argv);
    590590  }
    591591
    … …  
    594594    remove_argument (N, &argc, argv);
    595595    mode = PARALLEL_REGIONS;
    596     if (!REGION_FILE) relphot_usage();
     596    if (!REGION_FILE) relphot_usage(argc, argv);
    597597    if ((N = get_argument (argc, argv, "-parallel-regions-manual"))) {
    598598      remove_argument (N, &argc, argv);
    … …  
    609609      // note: initialize sets PhotcodeList to the full set of average photcodes
    610610      // if the mode is UPDATE_AVERAGES
    611       if (argc != 1) relphot_usage();
    612       break;
     611      // if (argc != 1) relphot_usage(argc, argv);
     612      // break;
    613613     
     614      if (argc == 1) break; // if no photcodes are given, use them all?
     615
    614616    case UPDATE_IMAGES:
    615617    case PARALLEL_IMAGES:
    … …  
    623625    default:
    624626      fprintf (stderr, "no valid mode selected\n");
    625       relphot_usage();
     627      relphot_usage(argc, argv);
    626628      break;
    627629  }
    628   if (argc != 1) relphot_usage ();
     630  if (argc != 1) relphot_usage (argc, argv);
    629631
    630632  // if we supplied a file, we need to load it now
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/help.c

    r38062 r42166  
    11# include "relphot.h"
    22
    3 void relphot_usage (void) {
     3void relphot_usage (int argc, char **argv) {
    44  fprintf (stderr, "ERROR: USAGE: relphot (photcodes) -images\n");
    55  fprintf (stderr, "       or:    relphot -averages\n");
    … …  
    1111  fprintf (stderr, "       or:    -catalog (name)\n");
    1212  fprintf (stderr, "  use -h for more usage information\n");
     13
     14  fprintf (stderr, "unparsed arguments: ");
     15  for (int i = 0; i < argc; i++) {
     16    fprintf (stderr, "%s ", argv[i]);
     17  }
     18  fprintf (stderr, "\n");
     19
    1320  exit (2);
    1421}
    … …  
    1926  if (get_argument (argc, argv, "-help")) goto show_help;
    2027  if (get_argument (argc, argv, "-h"))    goto show_help;
    21   if (argc == 1) relphot_usage();
     28  if (argc == 1) relphot_usage(0, NULL);
    2229  return;
    2330
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/initialize.c

    r41647 r42166  
    99  if (!mode) exit (2);
    1010
    11   // UPDATE_AVERAGES always operates on all photcodes?
    12   if (mode == UPDATE_AVERAGES) {
     11  // UPDATE_AVERAGES used to always operate on all photcodes
     12  // now, if a list of photcodes are given that is used, otherwise
     13  // all will be used
     14  if (!photcodes) {
    1315    char tmpline1[256];
    1416    int Ns;
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/relphot_images.c

    r42112 r42166  
    132132 
    133133    // if (GRID_ZEROPT) dump_grid ();
     134    setMcal  (catalog);
     135    setMmos  (catalog);
     136    setMgrp  (catalog);
    134137
    135138    setMcal  (catalog);
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/setMrelCatalog.c

    r42010 r42166  
    266266      // overlaps).  Msys + measure.Mcal is our best guess of the true magnitude
    267267      Mcal = measureT[k].McalPSF; // check that this is zero for loaded REF value
     268      // but external reference photometry might not have Mcal set, so set to 0.0 in that case.
     269      if (isnan(Mcal)) Mcal = 0.0;
    268270    } else {
    269271      // getMcal returns image[].Mcal
    … …  
    412414
    413415    // XXX hardwired grizy = (01234) JHK = (567) w = (8)
    414     if ((Nsec < 5) || (Nsec == 8)) {
     416    if (Nsec < 5) {
    415417      secfilt[Nsec].Ncode = results->NexpPS1[Nsec];
    416418    } else {
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/setMrelFinal.c

    r41647 r42166  
    1111  int Nsecfilt = GetPhotcodeNsecfilt ();
    1212
     13  // this resets values only if -reset is used
    1314  ResetAverageAndMeasure (catalog);
    1415 
Note: See TracChangeset for help on using the changeset viewer.