IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37876


Ignore:
Timestamp:
Jan 23, 2015, 8:27:53 PM (11 years ago)
Author:
eugene
Message:

adding options to apply synthphot zero point offsets

Location:
branches/eam_branches/ipp-20150112/Ohana/src/relphot
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/Makefile

    r37037 r37876  
    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   \
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/include/relphot.h

    r37807 r37876  
    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} SynthZeroPoints;
    3253
    3354typedef struct {
     
    175196char   SKY_TABLE[DVO_MAX_PATH];
    176197int    SKY_DEPTH;  /** XXX EAM : depth of catalog tables, fix usage */
     198char  *SYNTH_ZERO_POINTS;
    177199
    178200// globals for parallel region operations
     
    508530int isGPC1stack (int photcode);
    509531int isGPC1warp  (int photcode);
    510 
    511 
     532int isGPC1synth (int photcode);
     533int whichGPC1filter (int photcode);
     534
     535
     536SynthZeroPoints *SynthZeroPointsLoad (char *filename);
     537
     538int relphot_synthphot (int hostID, char *hostpath);
     539int relphot_synthphot_parallel (SkyList *sky);
     540
     541int relphot_synthphot_catalog (Catalog *catalog, SynthZeroPoints *zpts);
     542int relphot_synthphot_average (Average *average, SecFilt *secfilt, Measure *measure, SynthZeroPoints *zpts);
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/src/args.c

    r37037 r37876  
    366366    mode = UPDATE_AVERAGES;
    367367  }
     368  SYNTH_ZERO_POINTS = NULL;
     369  if ((N = get_argument (argc, argv, "-synphot"))) {
     370    mode = SYNTH_PHOT;
     371    remove_argument (N, &argc, argv);
     372    SYNTH_ZERO_POINTS = strcreate (argv[N]);
     373    remove_argument (N, &argc, argv);
     374  }
    368375  if ((N = get_argument (argc, argv, "-apply-offsets"))) {
    369376    remove_argument (N, &argc, argv);
     
    465472    }
    466473    MODE = MODE_UPDATE_OBJECTS;
     474    remove_argument (N, &argc, argv);
     475  }
     476  SYNTH_ZERO_POINTS = NULL;
     477  if ((N = get_argument (argc, argv, "-synphot"))) {
     478    MODE = MODE_SYNTH_PHOT;
     479    remove_argument (N, &argc, argv);
     480    SYNTH_ZERO_POINTS = strcreate (argv[N]);
    467481    remove_argument (N, &argc, argv);
    468482  }
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/src/extra.c

    r37037 r37876  
    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
     
    3952  return FALSE;
    4053}
     54
     55int isGPC1synth (int photcode) {
     56
     57  if ((photcode >= 3001) && (photcode <= 3006)) return TRUE; // g-band
     58
     59  return FALSE;
     60}
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/src/relphot.c

    r37807 r37876  
    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
  • branches/eam_branches/ipp-20150112/Ohana/src/relphot/src/relphot_client.c

    r37037 r37876  
    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.