Changeset 34867
- Timestamp:
- Dec 21, 2012, 7:49:17 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20121219/Ohana/src/uniphot
- Files:
-
- 1 added
- 3 edited
-
Makefile (modified) (2 diffs)
-
include/setastrom.h (added)
-
src/astrom_correction.c (modified) (4 diffs)
-
src/initialize_setastrom.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/Ohana/src/uniphot/Makefile
r34749 r34867 23 23 setposangle: $(BIN)/setposangle.$(ARCH) 24 24 setposangle_client: $(BIN)/setposangle_client.$(ARCH) 25 setastrom: $(BIN)/setastrom.$(ARCH) 26 setastrom_client: $(BIN)/setastrom_client.$(ARCH) 25 27 26 28 install: $(DESTBIN)/uniphot $(DESTBIN)/setfwhm $(DESTBIN)/setphot $(DESTBIN)/setphot_client $(DESTBIN)/setposangle $(DESTBIN)/setposangle_client … … 99 101 $(BIN)/setposangle_client.$(ARCH): $(SETPOSANGLE_CLIENT) 100 102 103 SETASTROM = \ 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 115 SETASTROM_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 101 125 SETFWHM = \ 102 126 $(SRC)/setfwhm.$(ARCH).o \ -
branches/eam_branches/ipp-20121219/Ohana/src/uniphot/src/astrom_correction.c
r34866 r34867 7 7 // extensions have names of the form XYnn.Dx.Td 8 8 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) 12 12 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 14 16 typedef struct { 15 17 int Nknots; 16 opihi_flt*xk;17 opihi_flt*yk;18 opihi_flt*y2;18 double *xk; 19 double *yk; 20 double *y2; 19 21 char *name; 20 22 } 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 29 Spline ****splineset; 21 30 22 31 int load_astrom_correction (char *filename) { … … 26 35 FTable ftable; 27 36 28 FILE *f = NULL;29 30 37 /* open file for input */ 31 f = fopen (filename, "r");38 FILE *f = fopen (filename, "r"); 32 39 if (f == (FILE *) NULL) { 33 40 gprint (GP_ERR, "can't open file for read : %s\n", filename); … … 44 51 ftable.header = &theader; 45 52 53 int sub, dir, chip; 54 46 55 // we have a N-D array of splines: 47 56 // splineset[subset][dir][chip] … … 57 66 } 58 67 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; 62 71 63 72 if (!gfits_fread_ftable_data (f, &table, FALSE)) return (FALSE); -
branches/eam_branches/ipp-20121219/Ohana/src/uniphot/src/initialize_setastrom.c
r34866 r34867 53 53 } 54 54 55 // XXX I want to avoid running this on all data all the time56 // some options: gpc1 only (hardwired), require photcodes (fairly tedious),57 // exclude some photcodes?58 // XXX for now, hardwire gpc1 photcodes59 60 55 PARALLEL = FALSE; 61 56 if ((N = get_argument (argc, argv, "-parallel"))) {
Note:
See TracChangeset
for help on using the changeset viewer.
