IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34867


Ignore:
Timestamp:
Dec 21, 2012, 7:49:17 AM (14 years ago)
Author:
eugene
Message:

working on setastrom

Location:
branches/eam_branches/ipp-20121219/Ohana/src/uniphot
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/Ohana/src/uniphot/Makefile

    r34749 r34867  
    2323setposangle: $(BIN)/setposangle.$(ARCH)
    2424setposangle_client: $(BIN)/setposangle_client.$(ARCH)
     25setastrom: $(BIN)/setastrom.$(ARCH)
     26setastrom_client: $(BIN)/setastrom_client.$(ARCH)
    2527
    2628install: $(DESTBIN)/uniphot $(DESTBIN)/setfwhm $(DESTBIN)/setphot $(DESTBIN)/setphot_client $(DESTBIN)/setposangle $(DESTBIN)/setposangle_client
     
    99101$(BIN)/setposangle_client.$(ARCH): $(SETPOSANGLE_CLIENT)
    100102
     103SETASTROM = \
     104$(SRC)/setastrom.$(ARCH).o          \
     105$(SRC)/initialize_setastrom.$(ARCH).o \
     106$(SRC)/astrom_correction.$(ARCH).o \
     107$(SRC)/update_dvo_setastrom.$(ARCH).o \
     108$(SRC)/update_catalog_setastrom.$(ARCH).o \
     109$(SRC)/SetSignals.$(ARCH).o         \
     110$(SRC)/Shutdown.$(ARCH).o           
     111
     112$(SETASTROM): $(INC)/setastrom.h
     113$(BIN)/setastrom.$(ARCH): $(SETASTROM)
     114
     115SETASTROM_CLIENT = \
     116$(SRC)/setastrom_client.$(ARCH).o           \
     117$(SRC)/update_dvo_setastrom.$(ARCH).o \
     118$(SRC)/update_catalog_setastrom.$(ARCH).o \
     119$(SRC)/astrom_correction.$(ARCH).o \
     120$(SRC)/initialize_setastrom_client.$(ARCH).o
     121
     122$(SETASTROM_CLIENT): $(INC)/setastrom.h
     123$(BIN)/setastrom_client.$(ARCH): $(SETASTROM_CLIENT)
     124
    101125SETFWHM =                           \
    102126$(SRC)/setfwhm.$(ARCH).o            \
  • branches/eam_branches/ipp-20121219/Ohana/src/uniphot/src/astrom_correction.c

    r34866 r34867  
    77// extensions have names of the form XYnn.Dx.Td
    88
    9 // where nn = 00 - 77, the chip number
    10 // x is X or Y, the correction direction
    11 // d is 0 or 1, pre or post camera correction
     9// where nn = 00 - 77, the chip number 
     10// x is X or Y, the correction direction (dir)
     11// d is 0 or 1, pre or post camera correction (sub)
    1212
    13 // the interpolating spline has valu
     13// these are stored in an N-D array of (Spline *) splineset[sub][dir][chip]
     14
     15// the interpolating spline information: this is based on the spline used by opihi/cmd.data/spline.c
    1416typedef struct {
    1517  int Nknots;
    16   opihi_flt *xk;
    17   opihi_flt *yk;
    18   opihi_flt *y2;
     18  double *xk;
     19  double *yk;
     20  double *y2;
    1921  char *name;
    2022} Spline;
     23
     24# define N_SUB 2
     25# define N_DIR 2
     26# define N_CHIP 78
     27// note that we are allocating pointers for XY00 - XY77, but only the octal elements are set (and not the 00,07,70,77 ones)
     28
     29Spline ****splineset;
    2130
    2231int load_astrom_correction (char *filename) {
     
    2635  FTable ftable;
    2736
    28   FILE *f = NULL;
    29 
    3037  /* open file for input */
    31   f = fopen (filename, "r");
     38  FILE *f = fopen (filename, "r");
    3239  if (f == (FILE *) NULL) {
    3340    gprint (GP_ERR, "can't open file for read : %s\n", filename);
     
    4451  ftable.header = &theader;
    4552
     53  int sub, dir, chip;
     54
    4655  // we have a N-D array of splines:
    4756  // splineset[subset][dir][chip]
     
    5766  }
    5867
    59   for () {
    60     /* load data for this header */
    61     if (!gfits_load_header (f, &theader)) return (FALSE);
     68  while (TRUE) {
     69    // load data for this header : if not found, assume we hit the end of the file
     70    if (!gfits_load_header (f, &theader)) break;
    6271   
    6372    if (!gfits_fread_ftable_data (f, &table, FALSE)) return (FALSE);
  • branches/eam_branches/ipp-20121219/Ohana/src/uniphot/src/initialize_setastrom.c

    r34866 r34867  
    5353  }
    5454
    55   // XXX I want to avoid running this on all data all the time
    56   // some options: gpc1 only (hardwired), require photcodes (fairly tedious),
    57   // exclude some photcodes?
    58   // XXX for now, hardwire gpc1 photcodes
    59 
    6055  PARALLEL = FALSE;
    6156  if ((N = get_argument (argc, argv, "-parallel"))) {
Note: See TracChangeset for help on using the changeset viewer.