IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37957


Ignore:
Timestamp:
Mar 5, 2015, 2:05:50 PM (11 years ago)
Author:
eugene
Message:

fix minor issues with synthphot

Location:
branches/eam_branches/ipp-20150112/Ohana/src/relphot
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/include/relphot.h

    r37876 r37957  
    5050  Coords coords;
    5151  int Nx;
     52  int Ny;
    5253} SynthZeroPoints;
    5354
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/src/args.c

    r37876 r37957  
    367367  }
    368368  SYNTH_ZERO_POINTS = NULL;
    369   if ((N = get_argument (argc, argv, "-synphot"))) {
     369  if ((N = get_argument (argc, argv, "-synthphot_means"))) {
    370370    mode = SYNTH_PHOT;
    371371    remove_argument (N, &argc, argv);
     372    myAssert (N < argc, "missing argument to -synthphot_means");
    372373    SYNTH_ZERO_POINTS = strcreate (argv[N]);
    373374    remove_argument (N, &argc, argv);
     
    399400
    400401  switch (mode) {
     402    case SYNTH_PHOT:
    401403    case UPDATE_AVERAGES:
    402404      if (argc != 1) relphot_usage();
     
    475477  }
    476478  SYNTH_ZERO_POINTS = NULL;
    477   if ((N = get_argument (argc, argv, "-synphot"))) {
     479  if ((N = get_argument (argc, argv, "-synthphot_means"))) {
    478480    MODE = MODE_SYNTH_PHOT;
    479481    remove_argument (N, &argc, argv);
     
    646648  }
    647649
     650  if ((MODE == MODE_SYNTH_PHOT)  && (argc == 1)) return TRUE;
    648651  if ((MODE == MODE_UPDATE_OBJECTS)  && (argc == 1)) return TRUE;
    649652  if (argc != 2) relphot_client_usage ();
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/src/help.c

    r36630 r37957  
    55  fprintf (stderr, "       or:    relphot -averages\n");
    66  fprintf (stderr, "       or:    relphot -apply-offsets\n");
     7  fprintf (stderr, "       or:    relphot -synthphot_means\n");
    78  fprintf (stderr, "       or:    relphot (photcodes) -parallel-regions -region-hosts (RegionFile)\n");
    89  fprintf (stderr, "       or:    relphot (photcodes) -parallel-images (ImageTable) -region-hosts (RegionFile)\n\n");
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/src/initialize.c

    r37037 r37957  
    9797  args_client (argc, argv);
    9898
     99  if (MODE == MODE_SYNTH_PHOT) return;
     100
    99101  if (MODE == MODE_UPDATE_OBJECTS) {
    100102    char tmpline1[256];
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/src/relphot_synthphot.c

    r37876 r37957  
    9191  }   
    9292
     93  // ensure that the path for the zero point is absolute
     94  {
     95    char *tmppath = abspath (SYNTH_ZERO_POINTS, DVO_MAX_PATH);
     96    free (SYNTH_ZERO_POINTS);
     97    SYNTH_ZERO_POINTS = tmppath;
     98  }
     99
    93100  int i;
    94101  for (i = 0; i < table->Nhosts; i++) {
     
    99106    table->hosts[i].pathname = tmppath;
    100107
    101     // options / arguments that can affect relphot_client -synthphot:
     108    // options / arguments that can affect relphot_client -synthphot_means:
    102109    // VERBOSE, VERBOSE2
    103110
    104111    char command[1024];
    105     snprintf (command, 1024, "relphot_client -synthphot %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f",
     112    snprintf (command, 1024, "relphot_client -synthphot_means %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f",
    106113              SYNTH_ZERO_POINTS, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    107114
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/src/relphot_synthphot_catalog.c

    r37877 r37957  
    5050  // need to look up the (X,Y) coords from this (R,D) location
    5151  double X, Y;
    52   RD_to_XY (&X, &Y, average->R, average->D, &zpts->coords);
     52  double R = ohana_normalize_angle_to_midpoint (average->R, 0.0);
     53  RD_to_XY (&X, &Y, R, average->D, &zpts->coords);
     54  if (X < 0) return FALSE;
     55  if (Y < 0) return FALSE;
     56  if (X >= zpts->Nx) return FALSE;
     57  if (Y >= zpts->Ny) return FALSE;
    5358
    5459  int Xpix = X;
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/src/synthetic_zpts.c

    r37876 r37957  
    4747  GetCoords (&zpts->coords, &zpts->PHU);
    4848  zpts->Nx = zpts->matrix[0].Naxis[0];
     49  zpts->Ny = zpts->matrix[0].Naxis[1];
    4950
    5051  return zpts;
Note: See TracChangeset for help on using the changeset viewer.