IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 29, 2015, 6:52:41 AM (11 years ago)
Author:
eugene
Message:

merge changes from ipp-20150112

Location:
trunk
Files:
10 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/Ohana

    • Property svn:mergeinfo deleted
  • trunk/Ohana/src/relphot/Makefile

    r37037 r38062  
    5050$(SRC)/relphot_parallel_regions.$(ARCH).o \
    5151$(SRC)/relphot_parallel_images.$(ARCH).o \
     52$(SRC)/relphot_synthphot.$(ARCH).o       \
     53$(SRC)/relphot_synthphot_catalog.$(ARCH).o       \
     54$(SRC)/synthetic_zpts.$(ARCH).o  \
    5255$(SRC)/select_images.$(ARCH).o   \
    5356$(SRC)/assign_images.$(ARCH).o   \
     
    9396$(SRC)/relphot_objects.$(ARCH).o         \
    9497$(SRC)/relphot_client.$(ARCH).o  \
     98$(SRC)/relphot_synthphot.$(ARCH).o       \
     99$(SRC)/relphot_synthphot_catalog.$(ARCH).o       \
     100$(SRC)/synthetic_zpts.$(ARCH).o  \
    95101$(SRC)/client_logger.$(ARCH).o   \
    96102$(SRC)/setExclusions.$(ARCH).o   \
  • trunk/Ohana/src/relphot/include/relphot.h

    r37907 r38062  
    2222  PARALLEL_IMAGES,
    2323  APPLY_OFFSETS,
     24  SYNTH_PHOT,
    2425} RelphotMode;
    2526
     
    2930    MODE_UPDATE = 2,
    3031    MODE_UPDATE_OBJECTS = 3,
     32    MODE_SYNTH_PHOT = 4,
    3133} ModeType;
     34
     35// NOTE: this is only used in special cases where we limit photcode ranges
     36typedef enum {
     37  PS1_none,
     38  PS1_g = 1,
     39  PS1_r = 2,
     40  PS1_i = 3,
     41  PS1_z = 4,
     42  PS1_y = 5,
     43  PS1_w = 6,
     44} PS1filters;
     45
     46typedef struct {
     47  Header PHU;
     48  Header header[5]; // grizy (matches Nsec in photcodes)
     49  Matrix matrix[5];
     50  Coords coords;
     51  int Nx;
     52  int Ny;
     53} SynthZeroPoints;
    3254
    3355typedef struct {
     
    175197char   SKY_TABLE[DVO_MAX_PATH];
    176198int    SKY_DEPTH;  /** XXX EAM : depth of catalog tables, fix usage */
     199char  *SYNTH_ZERO_POINTS;
    177200
    178201// globals for parallel region operations
     
    509532int isGPC1stack (int photcode);
    510533int isGPC1warp  (int photcode);
    511 
    512 
     534int isGPC1synth (int photcode);
     535int whichGPC1filter (int photcode);
     536
     537
     538SynthZeroPoints *SynthZeroPointsLoad (char *filename);
     539
     540int relphot_synthphot (int hostID, char *hostpath);
     541int relphot_synthphot_parallel (SkyList *sky);
     542
     543int relphot_synthphot_catalog (Catalog *catalog, SynthZeroPoints *zpts);
     544int relphot_synthphot_average (Average *average, SecFilt *secfilt, Measure *measure, SynthZeroPoints *zpts);
  • trunk/Ohana/src/relphot/src/args.c

    r37907 r38062  
    372372    mode = UPDATE_AVERAGES;
    373373  }
     374  SYNTH_ZERO_POINTS = NULL;
     375  if ((N = get_argument (argc, argv, "-synthphot_means"))) {
     376    mode = SYNTH_PHOT;
     377    remove_argument (N, &argc, argv);
     378    myAssert (N < argc, "missing argument to -synthphot_means");
     379    SYNTH_ZERO_POINTS = strcreate (argv[N]);
     380    remove_argument (N, &argc, argv);
     381  }
    374382  if ((N = get_argument (argc, argv, "-apply-offsets"))) {
    375383    remove_argument (N, &argc, argv);
     
    398406
    399407  switch (mode) {
     408    case SYNTH_PHOT:
    400409    case UPDATE_AVERAGES:
    401410      if (argc != 1) relphot_usage();
     
    471480    }
    472481    MODE = MODE_UPDATE_OBJECTS;
     482    remove_argument (N, &argc, argv);
     483  }
     484  SYNTH_ZERO_POINTS = NULL;
     485  if ((N = get_argument (argc, argv, "-synthphot_means"))) {
     486    MODE = MODE_SYNTH_PHOT;
     487    remove_argument (N, &argc, argv);
     488    SYNTH_ZERO_POINTS = strcreate (argv[N]);
    473489    remove_argument (N, &argc, argv);
    474490  }
     
    644660  }
    645661
     662  if ((MODE == MODE_SYNTH_PHOT)  && (argc == 1)) return TRUE;
    646663  if ((MODE == MODE_UPDATE_OBJECTS)  && (argc == 1)) return TRUE;
    647664  if (argc != 2) relphot_client_usage ();
  • trunk/Ohana/src/relphot/src/extra.c

    r37907 r38062  
    11# include "relphot.h"
     2
     3// for now (20140710) I need to identify gpc1 chips explicitly.  generalize in the future
     4int whichGPC1filter (int photcode) {
     5
     6  if ((photcode > 10000) && (photcode < 10077)) return PS1_g; // g-band
     7  if ((photcode > 10100) && (photcode < 10177)) return PS1_r; // r-band
     8  if ((photcode > 10200) && (photcode < 10277)) return PS1_i; // i-band
     9  if ((photcode > 10300) && (photcode < 10377)) return PS1_z; // z-band
     10  if ((photcode > 10400) && (photcode < 10477)) return PS1_y; // y-band
     11  if ((photcode > 10500) && (photcode < 10577)) return PS1_w; // w-band
     12
     13  return PS1_none;
     14}
    215
    316// for now (20140710) I need to identify gpc1 chips explicitly.  generalize in the future
     
    5063  return FALSE;
    5164}
     65
     66int isGPC1synth (int photcode) {
     67
     68  if ((photcode >= 3001) && (photcode <= 3006)) return TRUE; // g-band
     69
     70  return FALSE;
     71}
  • trunk/Ohana/src/relphot/src/help.c

    r36630 r38062  
    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");
  • trunk/Ohana/src/relphot/src/initialize.c

    r37037 r38062  
    9797  args_client (argc, argv);
    9898
     99  if (MODE == MODE_SYNTH_PHOT) return;
     100
    99101  if (MODE == MODE_UPDATE_OBJECTS) {
    100102    char tmpline1[256];
  • trunk/Ohana/src/relphot/src/relphot.c

    r37807 r38062  
    1717      // DOES NOT LOAD THE IMAGE TABLE
    1818      relphot_objects (0, NULL);
     19      exit (0);
     20
     21    case SYNTH_PHOT:
     22      // set the mean magnitudes ONLY for SYNPHOT objects
     23      relphot_synthphot (0, NULL);
    1924      exit (0);
    2025
  • trunk/Ohana/src/relphot/src/relphot_client.c

    r37037 r38062  
    8787    }
    8888
     89    case MODE_SYNTH_PHOT:
     90      // set the mean magnitudes ONLY for SYNPHOT objects
     91      relphot_synthphot (HOST_ID, HOSTDIR);
     92      client_logger_message ("set synth photometry\n");
     93      break;
     94
    8995    default:
    9096      fprintf (stderr, "impossible!");
Note: See TracChangeset for help on using the changeset viewer.