- Timestamp:
- Nov 30, 2012, 10:06:05 AM (13 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 52 edited
- 15 copied
-
addstar/test/delstar.dvo (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/addstar/test/delstar.dvo )
-
delstar/Makefile (modified) (5 diffs)
-
delstar/doc/delete_photcodes.txt (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/delstar/doc/delete_photcodes.txt )
-
delstar/include/delstar.h (modified) (5 diffs)
-
delstar/src/ConfigInit.c (modified) (3 diffs)
-
delstar/src/args.c (modified) (5 diffs)
-
delstar/src/delete_image_photcodes.c (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/delstar/src/delete_image_photcodes.c )
-
delstar/src/delete_imagefile.c (modified) (3 diffs)
-
delstar/src/delete_imagename.c (modified) (2 diffs)
-
delstar/src/delete_photcodes.c (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/delstar/src/delete_photcodes.c )
-
delstar/src/delstar.c (modified) (2 diffs)
-
delstar/src/delstar_client.c (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/delstar/src/delstar_client.c )
-
getstar/src/ConfigInit.c (modified) (3 diffs)
-
kapa2/test/boxfont.sh (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/kapa2/test/boxfont.sh )
-
libautocode/def/measure-ps1-v4.d (modified) (2 diffs)
-
libautocode/def/measure.d (modified) (2 diffs)
-
libdvo/doc/notes.txt (modified) (1 diff)
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/include/dvodb.h (modified) (1 diff)
-
libdvo/src/LoadPhotcodes.c (modified) (1 diff)
-
libdvo/src/dbExtractMeasures.c (modified) (2 diffs)
-
libdvo/src/dbFields.c (modified) (3 diffs)
-
libdvo/src/dvo_catalog.c (modified) (3 diffs)
-
libdvo/src/dvo_catalog_split.c (modified) (3 diffs)
-
libdvo/src/dvo_convert_PS1_DEV_1.c (modified) (6 diffs)
-
libdvo/src/dvo_convert_PS1_DEV_2.c (modified) (6 diffs)
-
libdvo/src/dvo_convert_PS1_REF.c (modified) (3 diffs)
-
libdvo/src/dvo_convert_PS1_V1.c (modified) (7 diffs)
-
libdvo/src/dvo_convert_PS1_V2.c (modified) (6 diffs)
-
libdvo/src/dvo_convert_PS1_V3.c (modified) (6 diffs)
-
libdvo/src/dvo_convert_PS1_V4.c (modified) (4 diffs)
-
libdvo/src/dvo_convert_elixir.c (modified) (7 diffs)
-
libdvo/src/dvo_convert_loneos.c (modified) (6 diffs)
-
libdvo/src/dvo_convert_panstarrs_DEV_0.c (modified) (6 diffs)
-
libdvo/src/dvo_convert_panstarrs_DEV_1.c (modified) (6 diffs)
-
libdvo/src/fits_db.c (modified) (1 diff)
-
markrock/src/ConfigInit.c (modified) (3 diffs)
-
markstar/src/ConfigInit.c (modified) (3 diffs)
-
opihi/cmd.astro (modified) (1 prop)
-
opihi/cmd.data/box.c (modified) (1 diff)
-
opihi/dvo/avextract.c (modified) (2 diffs)
-
opihi/dvo/avmatch.c (modified) (1 diff)
-
opihi/dvo/dvo_host_utils.c (modified) (4 diffs)
-
opihi/dvo/mextract.c (modified) (4 diffs)
-
opihi/dvo/mmatch.c (modified) (1 diff)
-
opihi/dvo/remote.c (modified) (2 diffs)
-
opihi/include/dvoshell.h (modified) (1 diff)
-
photdbc/src/ConfigInit.c (modified) (3 diffs)
-
relastro/src/ConfigInit.c (modified) (3 diffs)
-
relastro/src/ImageOps.c (modified) (1 diff)
-
relastro/src/UpdateObjects.c (modified) (1 diff)
-
relastro/src/args.c (modified) (1 diff)
-
relphot/src/ConfigInit.c (modified) (3 diffs)
-
relphot/src/StarOps.c (modified) (13 diffs)
-
relphot/src/setMrelFinal.c (modified) (2 diffs)
-
shell/src/bbc.jpegs (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/shell/src/bbc.jpegs )
-
uniphot/Makefile (modified) (2 diffs)
-
uniphot/include/setposangle.h (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/uniphot/include/setposangle.h )
-
uniphot/src/ImageSubsetSetPosangle.c (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/uniphot/src/ImageSubsetSetPosangle.c )
-
uniphot/src/initialize_setphot.c (modified) (1 diff)
-
uniphot/src/initialize_setphot_client.c (modified) (1 diff)
-
uniphot/src/initialize_setposangle.c (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/uniphot/src/initialize_setposangle.c )
-
uniphot/src/load_images_setposangle.c (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/uniphot/src/load_images_setposangle.c )
-
uniphot/src/setposangle.c (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/uniphot/src/setposangle.c )
-
uniphot/src/setposangle_client.c (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/uniphot/src/setposangle_client.c )
-
uniphot/src/update_catalog_setposangle.c (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/uniphot/src/update_catalog_setposangle.c )
-
uniphot/src/update_dvo_setposangle.c (copied) (copied from branches/eam_branches/ipp-20120905/Ohana/src/uniphot/src/update_dvo_setposangle.c )
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/delstar/Makefile
r16040 r34749 1 default: delstar 1 default: delstar delstar_client 2 2 help: 3 3 @echo "make options: addstar (default)" … … 18 18 19 19 delstar: $(BIN)/delstar.$(ARCH) 20 install: $(DESTBIN)/delstar 20 delstar_client: $(BIN)/delstar_client.$(ARCH) 21 22 install: $(DESTBIN)/delstar $(DESTBIN)/delstar_client 21 23 22 24 DELSTAR = \ … … 27 29 $(SRC)/delete_imagename.$(ARCH).o \ 28 30 $(SRC)/delete_imagefile.$(ARCH).o \ 31 $(SRC)/delete_image_photcodes.$(ARCH).o \ 32 $(SRC)/delete_photcodes.$(ARCH).o \ 29 33 $(SRC)/delete_times.$(ARCH).o \ 30 34 $(SRC)/gimages.$(ARCH).o \ … … 33 37 $(SRC)/parse_time.$(ARCH).o \ 34 38 $(SRC)/check_permissions.$(ARCH).o \ 39 $(SRC)/Shutdown.$(ARCH).o 40 41 DELSTAR_CLIENT = \ 42 $(SRC)/delstar_client.$(ARCH).o \ 43 $(SRC)/SetSignals.$(ARCH).o \ 44 $(SRC)/ConfigInit.$(ARCH).o \ 45 $(SRC)/args.$(ARCH).o \ 46 $(SRC)/delete_photcodes.$(ARCH).o \ 35 47 $(SRC)/Shutdown.$(ARCH).o 36 48 … … 42 54 $(DELSTAR): $(INC)/delstar.h 43 55 $(BIN)/delstar.$(ARCH) : $(DELSTAR) 56 57 $(DELSTAR_CLIENT): $(INC)/delstar.h 58 $(BIN)/delstar_client.$(ARCH) : $(DELSTAR_CLIENT) -
trunk/Ohana/src/delstar/include/delstar.h
r27435 r34749 12 12 13 13 /* global variables set in parameter file */ 14 char ImageCat[256]; 15 char ImageTemplate[256]; 16 char CatTemplate[256]; 17 char GSCFILE[256]; 18 char CATDIR[256]; 14 char ImageCat[DVO_MAX_PATH]; 15 char ImageTemplate[DVO_MAX_PATH]; 16 char CatTemplate[DVO_MAX_PATH]; 17 char GSCFILE[DVO_MAX_PATH]; 18 19 char *CATDIR; 20 19 21 char CATMODE[16]; /* raw, mef, split, mysql */ 20 22 char CATFORMAT[16]; /* internal, elixir, loneos, panstarrs */ 23 24 char *IMAGENAME; 25 21 26 double NSIGMA; 22 27 double ALPHA; … … 24 29 int ORPHAN; 25 30 int MISSED; 26 char SKY_TABLE[ 256];31 char SKY_TABLE[DVO_MAX_PATH]; 27 32 int SKY_DEPTH; /** XXX EAM : depth of catalog tables, fix usage */ 33 34 int PARALLEL; 35 int PARALLEL_MANUAL; 36 int PARALLEL_SERIAL; 37 38 int HOST_ID; 39 char *HOSTDIR; 28 40 29 41 time_t START; … … 31 43 PhotCode *PHOTCODE; 32 44 45 char *PHOTCODE_LIST; 46 33 47 int MODE; 34 enum {MODE_ IMAGENAME, MODE_IMAGEFILE, MODE_TIME, MODE_ORPHAN, MODE_MISSED};48 enum {MODE_NONE, MODE_IMAGENAME, MODE_IMAGEFILE, MODE_TIME, MODE_ORPHAN, MODE_MISSED, MODE_PHOTCODES}; 35 49 36 50 char DateKeyword[64], DateMode[64], UTKeyword[64], MJDKeyword[64], JDKeyword[64]; 51 52 SkyRegion UserPatch; 37 53 38 54 /*** delstar prototypes ***/ … … 46 62 int Shutdown PROTO((char *format, ...)) OHANA_FORMAT(printf, 1, 2); 47 63 void TrapSignal PROTO((int sig)); 48 int args PROTO((int *argc, char **argv));64 int args PROTO((int argc, char **argv)); 49 65 void check_permissions PROTO((char *basefile)); 50 void delete_imagefile PROTO((FITS_DB *db , char *filename));51 void delete_imagename PROTO((FITS_DB *db , char *name));66 void delete_imagefile PROTO((FITS_DB *db)); 67 void delete_imagename PROTO((FITS_DB *db)); 52 68 void delete_times PROTO((FITS_DB *db)); 53 69 int edge_check PROTO((double *x1, double *y1, double *x2, double *y2)); … … 72 88 73 89 void set_db (FITS_DB *in); 90 91 int args_client (int argc, char **argv); 92 93 void SortAveMeasMatch (off_t *MEAS, off_t *AVE, off_t N); 94 95 int delete_photcodes (int hostID, char *hostpath); 96 int delete_photcodes_parallel (SkyList *sky); 97 int delete_photcodes_catalog (Catalog *catalog, PhotCode **photcodes, int Nphotcodes); 98 int delete_image_photcodes (FITS_DB *db); -
trunk/Ohana/src/delstar/src/ConfigInit.c
r25757 r34749 5 5 char *config, *file; 6 6 char CatdirPhotcodeFile[256]; 7 char MasterPhotcodeFile[256];8 7 9 8 /*** load configuration info ***/ … … 20 19 ScanConfig (config, "ALPHA", "%lf", 0, &ALPHA); 21 20 ScanConfig (config, "GSCFILE", "%s", 0, GSCFILE); 22 ScanConfig (config, "CATDIR", "%s", 0, CATDIR);23 21 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 24 22 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); 25 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile);26 23 27 sprintf (ImageCat, "%s/Images.dat", CATDIR); 24 // force CATDIR to be absolute (so parallel mode will work) 25 char *tmpcatdir = NULL; 26 ALLOCATE (tmpcatdir, char, DVO_MAX_PATH); 27 ScanConfig (config, "CATDIR", "%s", 0, tmpcatdir); 28 CATDIR = abspath (tmpcatdir, DVO_MAX_PATH); 29 free (tmpcatdir); 30 31 snprintf (ImageCat, DVO_MAX_PATH, "%s/Images.dat", CATDIR); 28 32 29 33 ScanConfig (config, "DATE-KEYWORD", "%s", 0, DateKeyword); … … 45 49 /* XXX this does not yet write out the master photcode table */ 46 50 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR); 47 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {48 fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);51 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) { 52 fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile); 49 53 exit (1); 50 54 } -
trunk/Ohana/src/delstar/src/args.c
r34088 r34749 4 4 5 5 fprintf (stderr, "USAGE:\n"); 6 fprintf (stderr, " delstar (filename)\n");7 fprintf (stderr, " delstar -name ( filename)\n");6 fprintf (stderr, " delstar -file (filename)\n"); 7 fprintf (stderr, " delstar -name (imagename)\n"); 8 8 fprintf (stderr, " delstar -time (start) (stop/range)\n"); 9 9 fprintf (stderr, " delstar -orphan (region)\n"); … … 22 22 } 23 23 24 int args (int *argc, char **argv) { 24 void delstar_client_usage () { 25 fprintf (stderr, "USAGE: delstar_client [options]\n"); 26 exit (2); 27 } 28 29 int args (int argc, char **argv) { 25 30 26 31 int N; … … 28 33 29 34 /* check for help request */ 30 if (get_argument ( *argc, argv, "-help") ||31 get_argument ( *argc, argv, "-h")) {35 if (get_argument (argc, argv, "-help") || 36 get_argument (argc, argv, "-h")) { 32 37 help (); 33 38 } 34 39 35 40 VERBOSE = FALSE; 36 if ((N = get_argument ( *argc, argv, "-v"))) {41 if ((N = get_argument (argc, argv, "-v"))) { 37 42 VERBOSE = TRUE; 38 remove_argument (N, argc, argv); 39 } 40 41 MODE = MODE_IMAGEFILE; 42 if ((N = get_argument (*argc, argv, "-name"))) { 43 if (MODE != MODE_IMAGEFILE) usage(); 43 remove_argument (N, &argc, argv); 44 } 45 46 // region of interest 47 UserPatch.Rmin = 0; 48 UserPatch.Rmax = 360; 49 UserPatch.Dmin = -90; 50 UserPatch.Dmax = +90; 51 if ((N = get_argument (argc, argv, "-region"))) { 52 remove_argument (N, &argc, argv); 53 UserPatch.Rmin = atof (argv[N]); 54 remove_argument (N, &argc, argv); 55 UserPatch.Rmax = atof (argv[N]); 56 remove_argument (N, &argc, argv); 57 UserPatch.Dmin = atof (argv[N]); 58 remove_argument (N, &argc, argv); 59 UserPatch.Dmax = atof (argv[N]); 60 remove_argument (N, &argc, argv); 61 } 62 63 // XXX for the moment, make this selection manual. it needs to be automatic 64 // based on the state of the SkyTable 65 PARALLEL = FALSE; 66 if ((N = get_argument (argc, argv, "-parallel"))) { 67 PARALLEL = TRUE; 68 remove_argument (N, &argc, argv); 69 } 70 // this is a test mode : rather than launching the remote jobs and waiting for completion, 71 // delstar will simply list the remote command and wait for the user to signal completion 72 PARALLEL_MANUAL = FALSE; 73 if ((N = get_argument (argc, argv, "-parallel-manual"))) { 74 PARALLEL = TRUE; // -parallel-manual implies -parallel 75 PARALLEL_MANUAL = TRUE; 76 remove_argument (N, &argc, argv); 77 } 78 // this is a test mode : rather than launching the delstar_client jobs remotely, they are 79 // run in serial via 'system' 80 PARALLEL_SERIAL = FALSE; 81 if ((N = get_argument (argc, argv, "-parallel-serial"))) { 82 if (PARALLEL_MANUAL) { 83 fprintf (stderr, "ERROR: cannot mix -parallel-manual and -parallel-serial\n"); 84 exit (1); 85 } 86 PARALLEL = TRUE; // -parallel-serial implies -parallel 87 PARALLEL_SERIAL = TRUE; 88 remove_argument (N, &argc, argv); 89 } 90 91 IMAGENAME = NULL; 92 MODE = MODE_NONE; 93 if ((N = get_argument (argc, argv, "-name"))) { 94 if (MODE != MODE_NONE) usage(); 44 95 MODE = MODE_IMAGENAME; 45 remove_argument (N, argc, argv); 46 } 47 if ((N = get_argument (*argc, argv, "-orphan"))) { 48 if (MODE != MODE_IMAGEFILE) usage(); 96 remove_argument (N, &argc, argv); 97 IMAGENAME = strcreate (argv[N]); 98 remove_argument (N, &argc, argv); 99 } 100 if ((N = get_argument (argc, argv, "-file"))) { 101 if (MODE != MODE_NONE) usage(); 102 MODE = MODE_IMAGENAME; 103 remove_argument (N, &argc, argv); 104 IMAGENAME = strcreate (argv[N]); 105 remove_argument (N, &argc, argv); 106 } 107 if ((N = get_argument (argc, argv, "-orphan"))) { 108 if (MODE != MODE_NONE) usage(); 49 109 MODE = MODE_ORPHAN; 50 remove_argument (N, argc, argv);51 } 52 if ((N = get_argument ( *argc, argv, "-missed"))) {53 if (MODE != MODE_ IMAGEFILE) usage();110 remove_argument (N, &argc, argv); 111 } 112 if ((N = get_argument (argc, argv, "-missed"))) { 113 if (MODE != MODE_NONE) usage(); 54 114 MODE = MODE_MISSED; 55 remove_argument (N, argc, argv); 56 } 57 if ((N = get_argument (*argc, argv, "-time"))) { 58 if (MODE != MODE_IMAGEFILE) usage(); 115 remove_argument (N, &argc, argv); 116 } 117 if ((N = get_argument (argc, argv, "-photcodes"))) { 118 if (MODE != MODE_NONE) usage(); 119 MODE = MODE_PHOTCODES; 120 remove_argument (N, &argc, argv); 121 PHOTCODE_LIST = strcreate(argv[N]); 122 remove_argument (N, &argc, argv); 123 } 124 if ((N = get_argument (argc, argv, "-time"))) { 125 if (MODE != MODE_NONE) usage(); 59 126 MODE = MODE_TIME; 60 remove_argument (N, argc, argv);127 remove_argument (N, &argc, argv); 61 128 62 129 if (!ohana_str_to_time (argv[N], &START)) usage (); 63 remove_argument (N, argc, argv);130 remove_argument (N, &argc, argv); 64 131 65 132 /* interpret second value */ … … 71 138 END = START + trange; 72 139 } 73 remove_argument (N, argc, argv);140 remove_argument (N, &argc, argv); 74 141 goto goodtime; 75 142 } … … 81 148 END = tmp; 82 149 } 83 remove_argument (N, argc, argv);150 remove_argument (N, &argc, argv); 84 151 goto goodtime; 85 152 } 86 153 usage (); 87 154 } 155 88 156 goodtime: 89 157 90 /* restrict to a single photcode (not compatible with -image) */158 /* restrict to a single photcode (not compatible with -image) 91 159 PHOTCODE = NULL; 92 if ((N = get_argument ( *argc, argv, "-photcode"))) {93 remove_argument (N, argc, argv);160 if ((N = get_argument (argc, argv, "-photcode"))) { 161 remove_argument (N, &argc, argv); 94 162 PHOTCODE = GetPhotcodebyName (argv[N]); 95 remove_argument (N, argc, argv); 96 } 97 98 if ((MODE == MODE_TIME) && (*argc != 1)) usage (); 99 if ((MODE != MODE_TIME) && (*argc != 2)) usage (); 163 remove_argument (N, &argc, argv); 164 }*/ 165 166 if (argc != 1) usage (); 100 167 return (TRUE); 101 168 } 169 170 int args_client (int argc, char **argv) { 171 172 int N; 173 174 // by definition, the client is not parallel 175 PARALLEL = FALSE; 176 PARALLEL_MANUAL = FALSE; 177 PARALLEL_SERIAL = FALSE; 178 179 HOST_ID = 0; 180 if ((N = get_argument (argc, argv, "-hostID"))) { 181 remove_argument (N, &argc, argv); 182 HOST_ID = atoi (argv[N]); 183 remove_argument (N, &argc, argv); 184 } 185 if (!HOST_ID) delstar_client_usage(); 186 187 HOSTDIR = NULL; 188 if ((N = get_argument (argc, argv, "-hostdir"))) { 189 remove_argument (N, &argc, argv); 190 HOSTDIR = strcreate (argv[N]); 191 remove_argument (N, &argc, argv); 192 } 193 if (!HOSTDIR) delstar_client_usage(); 194 195 /* check for help request */ 196 if (get_argument (argc, argv, "-help") || 197 get_argument (argc, argv, "-h")) { 198 help (); 199 } 200 201 VERBOSE = FALSE; 202 if ((N = get_argument (argc, argv, "-v"))) { 203 VERBOSE = TRUE; 204 remove_argument (N, &argc, argv); 205 } 206 207 /* specify portion of the sky */ 208 UserPatch.Rmin = 0; 209 UserPatch.Rmax = 360; 210 UserPatch.Dmin = -90; 211 UserPatch.Dmax = +90; 212 if ((N = get_argument (argc, argv, "-region"))) { 213 remove_argument (N, &argc, argv); 214 UserPatch.Rmin = atof (argv[N]); 215 remove_argument (N, &argc, argv); 216 UserPatch.Rmax = atof (argv[N]); 217 remove_argument (N, &argc, argv); 218 UserPatch.Dmin = atof (argv[N]); 219 remove_argument (N, &argc, argv); 220 UserPatch.Dmax = atof (argv[N]); 221 remove_argument (N, &argc, argv); 222 } 223 224 MODE = MODE_NONE; 225 if ((N = get_argument (argc, argv, "-photcodes"))) { 226 if (MODE != MODE_NONE) delstar_client_usage(); 227 MODE = MODE_PHOTCODES; 228 remove_argument (N, &argc, argv); 229 PHOTCODE_LIST = strcreate(argv[N]); 230 remove_argument (N, &argc, argv); 231 } 232 233 if (MODE == MODE_NONE) delstar_client_usage (); 234 return (TRUE); 235 } -
trunk/Ohana/src/delstar/src/delete_imagefile.c
r27435 r34749 1 1 # include "delstar.h" 2 2 3 void delete_imagefile (FITS_DB *db , char *filename) {3 void delete_imagefile (FITS_DB *db) { 4 4 5 5 off_t i, Nimlist; … … 16 16 17 17 /* load information about file - time/photcode */ 18 image = gimages ( filename);18 image = gimages (IMAGENAME); 19 19 20 20 /* need to define method to get the mosaic (look up from table) */ … … 54 54 // XXX EAM : load image data above, find mosaic? 55 55 imlist = find_images_data (db, image, &Nimlist); 56 if (!Nimlist) Shutdown ("image %s not found in db", filename);56 if (!Nimlist) Shutdown ("image %s not found in db", IMAGENAME); 57 57 58 58 gfits_vtable_from_ftable (&db[0].ftable, &db[0].vtable, imlist, Nimlist); -
trunk/Ohana/src/delstar/src/delete_imagename.c
r29001 r34749 1 1 # include "delstar.h" 2 2 3 void delete_imagename (FITS_DB *db , char *name) {3 void delete_imagename (FITS_DB *db) { 4 4 5 5 off_t i, j, k; … … 25 25 26 26 /* find image in db by name */ 27 imlist = find_images_name (db, name, &Nimlist);28 if (!Nimlist) Shutdown ("image %s not found in db", name);27 imlist = find_images_name (db, IMAGENAME, &Nimlist); 28 if (!Nimlist) Shutdown ("image %s not found in db", IMAGENAME); 29 29 30 30 for (k = 0; k < Nimlist; k++) { -
trunk/Ohana/src/delstar/src/delstar.c
r6428 r34749 8 8 SetSignals (); 9 9 ConfigInit (&argc, argv); 10 args ( &argc, argv);10 args (argc, argv); 11 11 12 12 set_db (&db); … … 20 20 switch (MODE) { 21 21 case MODE_IMAGEFILE: 22 delete_imagefile (&db , argv[1]);22 delete_imagefile (&db); 23 23 break; 24 24 case MODE_IMAGENAME: 25 delete_imagename (&db , argv[1]);25 delete_imagename (&db); 26 26 break; 27 27 case MODE_TIME: 28 28 delete_times (&db); 29 29 break; 30 case MODE_PHOTCODES: { 31 if (!delete_image_photcodes (&db)) exit (1); 32 33 if (!delete_photcodes (0, NULL)) { 34 fprintf (stderr, "failure deleting measurements\n"); 35 exit (1); 36 } 37 exit (0); 38 } 30 39 case MODE_ORPHAN: 31 40 fprintf (stderr, "delete orphans not available\n"); -
trunk/Ohana/src/getstar/src/ConfigInit.c
r25757 r34749 5 5 char *config, *file; 6 6 char CatdirPhotcodeFile[256]; 7 char MasterPhotcodeFile[256];8 7 9 8 /*** load configuration info ***/ … … 21 20 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 22 21 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); 23 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile);24 22 if (!ScanConfig (config, "SKY_DEPTH", "%d", 0, &SKY_DEPTH)) { 25 23 SKY_DEPTH = 2; … … 34 32 /* XXX this does not yet write out the master photcode table */ 35 33 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR); 36 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {37 fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);34 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) { 35 fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile); 38 36 exit (1); 39 37 } -
trunk/Ohana/src/libautocode/def/measure-ps1-v4.d
r34405 r34749 2 2 EXTNAME DVO_MEASURE_PS1_V4 3 3 TYPE BINTABLE 4 SIZE 1 764 SIZE 184 5 5 DESCRIPTION DVO Detection Measurement Table 6 6 … … 29 29 FIELD Xccd, X_CCD, float, X coord on chip, pixels 30 30 FIELD Yccd, Y_CCD, float, Y coord on chip, pixels 31 32 FIELD Xoff, X_OFF, float, X correction in chip coords, pixels 33 FIELD Yoff, Y_OFF, float, Y correction in chip coords, pixels 31 34 32 35 # could these be packed into fewer bits? -
trunk/Ohana/src/libautocode/def/measure.d
r34405 r34749 2 2 EXTNAME DVO_MEASURE 3 3 TYPE BINTABLE 4 SIZE 1 764 SIZE 184 5 5 DESCRIPTION DVO Detection Measurement Table 6 6 … … 29 29 FIELD Xccd, X_CCD, float, X coord on chip, pixels 30 30 FIELD Yccd, Y_CCD, float, Y coord on chip, pixels 31 32 FIELD Xoff, X_OFF, float, X correction in chip coords, pixels 33 FIELD Yoff, Y_OFF, float, Y correction in chip coords, pixels 31 34 32 35 # could these be packed into fewer bits? -
trunk/Ohana/src/libdvo/doc/notes.txt
r34260 r34749 17 17 18 18 4) create a DVOTableFormat entry for the new format 19 (libdvo/include/dvo.h). the naming conve tion is DVO_FORMAT_FOO.19 (libdvo/include/dvo.h). the naming convention is DVO_FORMAT_FOO. 20 20 21 21 5) add an entry for the new format in dvo_catalog_catformat -
trunk/Ohana/src/libdvo/include/dvo.h
r34717 r34749 175 175 ID_OBJ_GOOD = 0x04000000, // good-quality measurement in our data (eg,PS) 176 176 ID_OBJ_GOOD_ALT = 0x08000000, // good-quality measurement in external data (eg, 2MASS) 177 ID_OBJ_GOOD_STACK = 0x10000000, // good-quality object in the stack (> 1 good stack) 178 ID_OBJ_SUSPECT_STACK = 0x20000000, // suspect object in the stack (> 1 good or suspect stack, < 2 good) 179 ID_OBJ_BAD_STACK = 0x40000000, // good-quality object in the stack (> 1 good stack) 177 180 } DVOAverageFlags; 178 181 -
trunk/Ohana/src/libdvo/include/dvodb.h
r34620 r34749 122 122 MEAS_XCCD_ERR, 123 123 MEAS_YCCD_ERR, 124 MEAS_XOFF, 125 MEAS_YOFF, 124 126 MEAS_POS_SYS_ERR, 125 127 MEAS_XMOSAIC, -
trunk/Ohana/src/libdvo/src/LoadPhotcodes.c
r28246 r34749 11 11 } 12 12 13 if (!master_file) return FALSE; 14 13 15 /* next try to load the photcodes from the master text photcode file */ 14 16 /* automatically (or on demand?) save the text file to the FITS version */ -
trunk/Ohana/src/libdvo/src/dbExtractMeasures.c
r34405 r34749 385 385 value.Flt = FromShortDegrees(measure[0].theta); 386 386 break; 387 388 case MEAS_POSANGLE: /* OK */ 389 value.Flt = FromShortDegrees(measure[0].posangle); 390 break; 391 case MEAS_PLATESCALE: /* OK */ 392 value.Flt = measure[0].pltscale; 393 break; 394 387 395 case MEAS_MXX: /* OK */ 388 396 value.Flt = FromShortPixels(measure[0].Mxx); … … 435 443 # endif 436 444 break; 445 case MEAS_XOFF: /* OK */ 446 value.Flt = measure[0].Xoff; 447 break; 448 case MEAS_YOFF: /* OK */ 449 value.Flt = measure[0].Yoff; 450 break; 437 451 case MEAS_XCCD_ERR: /* OK */ 438 452 value.Flt = FromShortPixels(measure[0].dXccd); -
trunk/Ohana/src/libdvo/src/dbFields.c
r34620 r34749 217 217 if (!strcasecmp (fieldName, "XCCD:ERR")) ESCAPE (MEAS_XCCD_ERR, MAG_NONE, OPIHI_FLT); 218 218 if (!strcasecmp (fieldName, "YCCD:ERR")) ESCAPE (MEAS_YCCD_ERR, MAG_NONE, OPIHI_FLT); 219 if (!strcasecmp (fieldName, "XOFF")) ESCAPE (MEAS_XOFF, MAG_NONE, OPIHI_FLT); 220 if (!strcasecmp (fieldName, "YOFF")) ESCAPE (MEAS_YOFF, MAG_NONE, OPIHI_FLT); 219 221 if (!strcasecmp (fieldName, "POS_SYS_ERR")) ESCAPE (MEAS_POS_SYS_ERR, MAG_NONE, OPIHI_FLT); 220 222 if (!strcasecmp (fieldName, "XMOSAIC")) ESCAPE (MEAS_XMOSAIC, MAG_NONE, OPIHI_FLT); … … 228 230 if (!strcasecmp (fieldName, "CATID")) ESCAPE (MEAS_CAT_ID, MAG_NONE, OPIHI_INT); 229 231 if (!strcasecmp (fieldName, "IMAGEID")) ESCAPE (MEAS_IMAGE_ID, MAG_NONE, OPIHI_INT); 232 if (!strcasecmp (fieldName, "EXTERNID")) ESCAPE (MEAS_EXTERN_ID, MAG_NONE, OPIHI_INT); 230 233 if (!strcasecmp (fieldName, "PSF_QF")) ESCAPE (MEAS_PSF_QF, MAG_NONE, OPIHI_FLT); 231 234 if (!strcasecmp (fieldName, "PSF_QF_PERFECT")) ESCAPE (MEAS_PSF_QF_PERFECT, MAG_NONE, OPIHI_FLT); … … 237 240 if (!strcasecmp (fieldName, "SKY")) ESCAPE (MEAS_SKY, MAG_NONE, OPIHI_FLT); 238 241 if (!strcasecmp (fieldName, "SKY_ERR")) ESCAPE (MEAS_dSKY, MAG_NONE, OPIHI_FLT); 239 if (!strcasecmp (fieldName, "externID")) ESCAPE (MEAS_EXTERN_ID, MAG_NONE, OPIHI_INT);240 242 if (!strcasecmp (fieldName, "MCAL_OFFSET")) ESCAPE (MEAS_MCAL_OFFSET, MAG_NONE, OPIHI_FLT); 241 243 if (!strcasecmp (fieldName, "FLAT")) ESCAPE (MEAS_FLAT, MAG_NONE, OPIHI_FLT); -
trunk/Ohana/src/libdvo/src/dvo_catalog.c
r34620 r34749 83 83 average->dP = 0; 84 84 85 average->ChiSqAve = 0.0;86 average->ChiSqPM = 0.0;87 average->ChiSqPar = 0.0;85 average->ChiSqAve = NAN; 86 average->ChiSqPM = NAN; 87 average->ChiSqPar = NAN; 88 88 average->Tmean = 0; 89 89 average->Trange = 0; 90 90 91 average->psfQF = 0.0;92 average->psfQFperf = 0.0;91 average->psfQF = NAN; 92 average->psfQFperf = NAN; 93 93 94 94 average->stargal = 0.0; … … 161 161 measure->Xccd = NAN; 162 162 measure->Yccd = NAN; 163 measure->Xoff = 0.0; 164 measure->Yoff = 0.0; 163 165 164 166 measure->Sky = NAN; … … 176 178 177 179 measure->psfQF = NAN; 180 measure->psfQFperf = NAN; 178 181 measure->psfChisq = NAN; 179 182 measure->psfNdof = 0; -
trunk/Ohana/src/libdvo/src/dvo_catalog_split.c
r33963 r34749 83 83 return (FALSE); 84 84 } 85 off_t fullsize = catalog->header.datasize; 85 86 86 87 // write the PHU matrix; this is probably a NOP, do I have to keep it in? … … 91 92 return (FALSE); 92 93 } 94 fullsize += matrix.datasize; 93 95 gfits_free_matrix (&matrix); 94 96 … … 98 100 return (FALSE); 99 101 } 102 fullsize += ftable->datasize + ftable->header->datasize; 103 104 // if the output file will be completely re-written, truncate to total datasize 105 if ((start == 0) && (Nrows == Ntotal)) { 106 int fd = fileno (catalog->f); 107 if (ftruncate (fd, fullsize)) { 108 perror ("dvo_catalog_save_subset: "); 109 return (FALSE); 110 } 111 } 112 100 113 return (TRUE); 101 114 } -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c
r34620 r34749 11 11 12 12 for (i = 0; i < Nvalues; i++) { 13 dvo_measure_init (&out[i]); 13 14 out[i].dR = in[i].dR; 14 15 out[i].dD = in[i].dD; … … 40 41 out[i].photFlags = in[i].photFlags; 41 42 42 // changed or addedfor PS1_DEV_243 // changed for PS1_DEV_2 43 44 out[i].Map = in[i].Mgal; 44 out[i].dMcal = 0; 45 46 // changed or added for PS1_V1 45 46 // changed for PS1_V1 47 47 out[i].photFlags = in[i].photFlags | (in[i].dophot << 16); 48 out[i].t_msec = 0;49 out[i].extID = 0;50 out[i].objID = 0;51 out[i].catID = 0;52 out[i].Mxx = 0.0;53 out[i].Mxy = 0.0;54 out[i].Myy = 0.0;55 out[i].posangle = 0;56 out[i].pltscale = 0;57 out[i].psfNdof = 0;58 out[i].psfNpix = 0;59 60 // added for PS1_V461 out[i].Mkron = NAN;62 out[i].dMkron = NAN;63 out[i].FluxPSF = NAN;64 out[i].dFluxPSF = NAN;65 out[i].FluxKron = NAN;66 out[i].dFluxKron = NAN;67 out[i].psfQFperf = NAN;68 48 } 69 49 return (out); … … 125 105 126 106 for (i = 0; i < Nvalues; i++) { 107 dvo_average_init (&out[i]); 108 127 109 out[i].R = in[i].R; 128 110 out[i].D = in[i].D; … … 138 120 out[i].catID = in[i].catID; 139 121 140 // changed or addedfor PS1_DEV_2122 // changed for PS1_DEV_2 141 123 out[i].Nmeasure = in[i].Nm; 142 124 out[i].Nmissing = in[i].Nn; 143 125 out[i].measureOffset = in[i].offset; 144 126 out[i].missingOffset = in[i].missing; 145 out[i].Nextend = 0; 146 out[i].extendOffset = 0; 147 148 // changed or added for PS1_V1 127 128 // changed for PS1_V1 149 129 out[i].flags = in[i].code; 150 out[i].ChiSqAve = NAN; 151 out[i].ChiSqPM = NAN; 152 out[i].ChiSqPar = NAN; 153 out[i].Tmean = 0; 154 out[i].Trange = 0; 155 out[i].Npos = 0.0; 156 out[i].extID = 0; 157 158 // added in PS1_V3 159 out[i].photFlagsUpper = 0; 160 out[i].photFlagsLower = 0; 161 162 // added for PS1_V4 (Xp dropped in V4 onward, was not really used anyway) 163 out[i].psfQF = NAN; 164 out[i].psfQFperf = NAN; 165 out[i].stargal = NAN; 130 131 // PS1_V4 : Xp dropped in V4 onward, was not really used anyway 166 132 } 167 133 return (out); … … 210 176 211 177 for (i = 0; i < Nvalues; i++) { 178 dvo_secfilt_init (&out[i]); 179 212 180 out[i].M = in[i].M; 213 181 out[i].dM = in[i].dM; … … 215 183 out[i].Ncode = in[i].Ncode; 216 184 out[i].Nused = in[i].Nused; 217 218 // changed or added for PS1_V1219 out[i].M_20 = 0;220 out[i].M_80 = 0;221 222 // changed or added for PS1_V2223 out[i].flags = 0;224 225 // added in PS1_V3226 out[i].Map = 0;227 out[i].Mstdev = 0;228 out[i].ubercalDist = 0;229 230 // added for PS1_V4231 out[i].Mkron = NAN;232 out[i].dMkron = NAN;233 out[i].FluxPSF = NAN;234 out[i].dFluxPSF = NAN;235 out[i].FluxKron = NAN;236 out[i].dFluxKron = NAN;237 out[i].stackDetectID = 0;238 185 } 239 186 return (out); -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c
r34620 r34749 11 11 12 12 for (i = 0; i < Nvalues; i++) { 13 dvo_measure_init (&out[i]); 13 14 out[i].dR = in[i].dR; 14 15 out[i].dD = in[i].dD; … … 41 42 out[i].dbFlags = in[i].dbFlags; 42 43 43 // changed or addedfor PS1_V144 // changed for PS1_V1 44 45 out[i].photFlags = in[i].photFlags | (in[i].dophot << 16); 45 out[i].t_msec = 0;46 out[i].extID = 0;47 out[i].objID = 0;48 out[i].catID = 0;49 out[i].Mxx = 0.0;50 out[i].Mxy = 0.0;51 out[i].Myy = 0.0;52 out[i].posangle = 0;53 out[i].pltscale = 0;54 out[i].psfNdof = 0;55 out[i].psfNpix = 0;56 57 // added for PS1_V458 out[i].Mkron = NAN;59 out[i].dMkron = NAN;60 out[i].FluxPSF = NAN;61 out[i].dFluxPSF = NAN;62 out[i].FluxKron = NAN;63 out[i].dFluxKron = NAN;64 out[i].psfQFperf = NAN;65 46 } 66 47 return (out); … … 121 102 122 103 for (i = 0; i < Nvalues; i++) { 104 dvo_average_init (&out[i]); 105 123 106 out[i].R = in[i].R; 124 107 out[i].D = in[i].D; … … 140 123 out[i].catID = in[i].catID; 141 124 142 // changed or addedfor PS1_V1125 // changed for PS1_V1 143 126 out[i].flags = in[i].code; 144 out[i].ChiSqAve = NAN;145 out[i].ChiSqPM = NAN;146 out[i].ChiSqPar = NAN;147 out[i].Tmean = 0;148 out[i].Trange = 0;149 out[i].Npos = 0.0;150 out[i].extID = 0;151 152 // added in PS1_V3153 out[i].photFlagsUpper = 0;154 out[i].photFlagsLower = 0;155 156 // added for PS1_V4 (Xp dropped in V4 onward, was not really used anyway)157 out[i].psfQF = NAN;158 out[i].psfQFperf = NAN;159 out[i].stargal = NAN;160 127 } 161 128 return (out); … … 204 171 205 172 for (i = 0; i < Nvalues; i++) { 173 dvo_secfilt_init (&out[i]); 174 206 175 out[i].M = in[i].M; 207 176 out[i].dM = in[i].dM; … … 209 178 out[i].Ncode = in[i].Ncode; 210 179 out[i].Nused = in[i].Nused; 211 212 // changed or added for PS1_V1213 out[i].M_20 = 0;214 out[i].M_80 = 0;215 216 // changed or added for PS1_V2217 out[i].flags = 0;218 219 // added in PS1_V3220 out[i].Map = 0;221 out[i].Mstdev = 0;222 out[i].ubercalDist = 0;223 224 // added for PS1_V4225 out[i].Mkron = NAN;226 out[i].dMkron = NAN;227 out[i].FluxPSF = NAN;228 out[i].dFluxPSF = NAN;229 out[i].FluxKron = NAN;230 out[i].dFluxKron = NAN;231 out[i].stackDetectID = 0;232 180 } 233 181 return (out); -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c
r34620 r34749 11 11 12 12 for (i = 0; i < Nvalues; i++) { 13 dvo_measure_init (&out[i]); 14 13 15 out[i].dR = in[i].dR; 14 16 out[i].dD = in[i].dD; 15 17 out[i].M = in[i].M; 16 out[i].Mcal = 0.0;17 out[i].Map = NAN;18 18 out[i].dM = in[i].dM; 19 out[i].dMcal = 0.0;20 19 out[i].dt = in[i].dt; 21 out[i].airmass = NAN;22 out[i].az = NAN;23 out[i].Xccd = NAN;24 out[i].Yccd = NAN;25 out[i].Sky = NAN;26 out[i].dSky = NAN;27 20 out[i].t = in[i].t; 28 out[i].t_msec = 0;29 21 out[i].averef = in[i].averef; 30 out[i].detID = 0;31 out[i].imageID = 0;32 22 out[i].objID = in[i].objID; 33 23 out[i].catID = in[i].catID; 34 out[i].extID = 0;35 24 out[i].psfQF = 1.0; // we do not save a value, but some operations (relphot/average) filter on this value.. 36 out[i].psfChisq = NAN;37 out[i].psfNdof = 0;38 out[i].psfNpix = 0;39 out[i].crNsigma = NAN;40 out[i].extNsigma = NAN;41 out[i].FWx = 0;42 out[i].FWy = 0;43 out[i].theta = 0;44 out[i].Mxx = 0;45 out[i].Mxy = 0;46 out[i].Myy = 0;47 out[i].dXccd = 0;48 out[i].dYccd = 0;49 out[i].posangle = 0;50 out[i].pltscale = NAN;51 25 out[i].photcode = in[i].photcode; 52 out[i].dbFlags = 0;53 out[i].photFlags = 0;54 55 // added for PS1_V456 out[i].Mkron = NAN;57 out[i].dMkron = NAN;58 out[i].FluxPSF = NAN;59 out[i].dFluxPSF = NAN;60 out[i].FluxKron = NAN;61 out[i].dFluxKron = NAN;62 out[i].psfQFperf = NAN;63 26 } 64 27 return (out); … … 96 59 97 60 for (i = 0; i < Nvalues; i++) { 61 dvo_average_init (&out[i]); 62 98 63 out[i].R = in[i].R; 99 64 out[i].D = in[i].D; 100 65 out[i].dR = in[i].dR; 101 66 out[i].dD = in[i].dD; 102 out[i].uR = NAN;103 out[i].uD = NAN;104 out[i].duR = NAN;105 out[i].duD = NAN;106 out[i].P = NAN;107 out[i].dP = NAN;108 out[i].ChiSqAve = NAN;109 out[i].ChiSqPM = NAN;110 out[i].ChiSqPar = NAN;111 out[i].Tmean = 0;112 out[i].Trange = 0;113 out[i].Npos = 0;114 67 out[i].Nmeasure = in[i].Nmeasure; 115 68 out[i].Nmissing = in[i].Nmissing; 116 out[i].Nextend = 0;117 69 out[i].measureOffset = in[i].measureOffset; 118 70 out[i].missingOffset = in[i].missingOffset; 119 out[i].extendOffset = 0;120 out[i].flags = 0;121 71 out[i].objID = in[i].objID; 122 72 out[i].catID = in[i].catID; 123 out[i].extID = 0;124 125 // added in PS1_V3126 out[i].photFlagsUpper = 0;127 out[i].photFlagsLower = 0;128 129 // added for PS1_V4 (Xp dropped in V4 onward, was not really used anyway)130 out[i].psfQF = NAN;131 out[i].psfQFperf = NAN;132 out[i].stargal = NAN;133 73 } 134 74 return (out); … … 167 107 168 108 for (i = 0; i < Nvalues; i++) { 109 dvo_secfilt_init (&out[i]); 110 169 111 out[i].M = in[i].M; 170 112 out[i].dM = in[i].dM; 171 out[i].Xm = NAN_S_SHORT;172 out[i].Ncode = 0;173 out[i].Nused = 0;174 out[i].M_20 = 0;175 out[i].M_80 = 0;176 177 // changed or added for PS1_V2178 out[i].flags = 0;179 180 // added in PS1_V3181 out[i].Map = 0;182 out[i].Mstdev = 0;183 out[i].ubercalDist = 0;184 185 // added for PS1_V4186 out[i].Mkron = NAN;187 out[i].dMkron = NAN;188 out[i].FluxPSF = NAN;189 out[i].dFluxPSF = NAN;190 out[i].FluxKron = NAN;191 out[i].dFluxKron = NAN;192 out[i].stackDetectID = 0;193 113 } 194 114 return (out); -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c
r34620 r34749 11 11 12 12 for (i = 0; i < Nvalues; i++) { 13 dvo_measure_init (&out[i]); 14 13 15 out[i].dR = in[i].dR; 14 16 out[i].dD = in[i].dD; … … 52 54 out[i].dbFlags = in[i].dbFlags; 53 55 out[i].photFlags = in[i].photFlags; 54 55 // added for PS1_V456 out[i].Mkron = NAN;57 out[i].dMkron = NAN;58 out[i].FluxPSF = NAN;59 out[i].dFluxPSF = NAN;60 out[i].FluxKron = NAN;61 out[i].dFluxKron = NAN;62 out[i].psfQFperf = NAN;63 56 } 64 57 return (out); … … 128 121 129 122 for (i = 0; i < Nvalues; i++) { 123 dvo_average_init (&out[i]); 124 130 125 out[i].R = in[i].R; 131 126 out[i].D = in[i].D; … … 139 134 out[i].dP = in[i].dP; 140 135 out[i].ChiSqAve = in[i].ChiSq; 141 out[i].ChiSqPM = NAN;142 out[i].ChiSqPar = NAN;143 out[i].Tmean = 0;144 out[i].Trange = 0;145 136 out[i].Npos = in[i].Npos; 146 137 out[i].Nmeasure = in[i].Nmeasure; … … 154 145 out[i].catID = in[i].catID; 155 146 out[i].extID = in[i].extID; 156 157 // added in PS1_V3158 out[i].photFlagsUpper = 0;159 out[i].photFlagsLower = 0;160 161 // added for PS1_V4 (Xp dropped in V4 onward, was not really used anyway)162 out[i].psfQF = NAN;163 out[i].psfQFperf = NAN;164 out[i].stargal = NAN;165 147 } 166 148 return (out); … … 210 192 211 193 for (i = 0; i < Nvalues; i++) { 194 dvo_secfilt_init (&out[i]); 195 212 196 out[i].M = in[i].M; 213 197 out[i].dM = in[i].dM; … … 217 201 out[i].M_20 = in[i].M_20; 218 202 out[i].M_80 = in[i].M_80; 219 220 // changed or added for PS1_V2221 out[i].flags = 0;222 223 // added in PS1_V3224 out[i].Map = 0;225 out[i].Mstdev = 0;226 out[i].ubercalDist = 0;227 228 // added for PS1_V4229 out[i].Mkron = NAN;230 out[i].dMkron = NAN;231 out[i].FluxPSF = NAN;232 out[i].dFluxPSF = NAN;233 out[i].FluxKron = NAN;234 out[i].dFluxKron = NAN;235 out[i].stackDetectID = 0;236 203 } 237 204 return (out); -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c
r34620 r34749 11 11 12 12 for (i = 0; i < Nvalues; i++) { 13 dvo_measure_init (&out[i]); 14 13 15 out[i].dR = in[i].dR; 14 16 out[i].dD = in[i].dD; … … 53 55 out[i].dbFlags = in[i].dbFlags; 54 56 out[i].photFlags = in[i].photFlags; 55 56 // added for PS1_V457 out[i].Mkron = NAN;58 out[i].dMkron = NAN;59 out[i].FluxPSF = NAN;60 out[i].dFluxPSF = NAN;61 out[i].FluxKron = NAN;62 out[i].dFluxKron = NAN;63 out[i].psfQFperf = NAN;64 57 } 65 58 return (out); … … 129 122 130 123 for (i = 0; i < Nvalues; i++) { 124 dvo_average_init (&out[i]); 125 131 126 out[i].R = in[i].R; 132 127 out[i].D = in[i].D; … … 155 150 out[i].catID = in[i].catID; 156 151 out[i].extID = in[i].extID; 157 158 // added in PS1_V3159 out[i].photFlagsUpper = 0;160 out[i].photFlagsLower = 0;161 162 // added for PS1_V4 (Xp dropped in V4 onward, was not really used anyway)163 out[i].psfQF = NAN;164 out[i].psfQFperf = NAN;165 out[i].stargal = NAN;166 152 } 167 153 return (out); … … 215 201 216 202 for (i = 0; i < Nvalues; i++) { 203 dvo_secfilt_init (&out[i]); 204 217 205 out[i].M = in[i].M; 218 206 out[i].dM = in[i].dM; … … 223 211 out[i].M_20 = in[i].M_20; 224 212 out[i].M_80 = in[i].M_80; 225 226 // added in PS1_V3227 out[i].Map = 0;228 out[i].Mstdev = 0;229 out[i].ubercalDist = 0;230 231 // added for PS1_V4232 out[i].Mkron = NAN;233 out[i].dMkron = NAN;234 out[i].FluxPSF = NAN;235 out[i].dFluxPSF = NAN;236 out[i].FluxKron = NAN;237 out[i].dFluxKron = NAN;238 out[i].stackDetectID = 0;239 213 } 240 214 return (out); -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V3.c
r34620 r34749 11 11 12 12 for (i = 0; i < Nvalues; i++) { 13 dvo_measure_init (&out[i]); 14 13 15 out[i].dR = in[i].dR; 14 16 out[i].dD = in[i].dD; … … 53 55 out[i].dbFlags = in[i].dbFlags; 54 56 out[i].photFlags = in[i].photFlags; 55 56 // added for PS1_V457 out[i].Mkron = NAN;58 out[i].dMkron = NAN;59 out[i].FluxPSF = NAN;60 out[i].dFluxPSF = NAN;61 out[i].FluxKron = NAN;62 out[i].dFluxKron = NAN;63 out[i].psfQFperf = NAN;64 57 } 65 58 return (out); … … 129 122 130 123 for (i = 0; i < Nvalues; i++) { 124 dvo_average_init (&out[i]); 125 131 126 out[i].R = in[i].R; 132 127 out[i].D = in[i].D; … … 157 152 out[i].catID = in[i].catID; 158 153 out[i].extID = in[i].extID; 159 160 // added for PS1_V4 (Xp dropped in V4 onward, was not really used anyway)161 out[i].psfQF = NAN;162 out[i].psfQFperf = NAN;163 out[i].stargal = NAN;164 154 } 165 155 return (out); … … 215 205 216 206 for (i = 0; i < Nvalues; i++) { 207 dvo_secfilt_init (&out[i]); 208 217 209 out[i].M = in[i].M; 218 210 out[i].Map = in[i].Map; … … 226 218 out[i].Mstdev = in[i].Mstdev; 227 219 out[i].ubercalDist = in[i].ubercalDist; 228 229 // added for PS1_V4230 out[i].Mkron = NAN;231 out[i].dMkron = NAN;232 out[i].FluxPSF = NAN;233 out[i].dFluxPSF = NAN;234 out[i].FluxKron = NAN;235 out[i].dFluxKron = NAN;236 out[i].stackDetectID = 0;237 220 } 238 221 return (out); -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c
r34620 r34749 9 9 10 10 ALLOCATE_ZERO (out, Measure, Nvalues); 11 12 for (i = 0; i < Nvalues; i++) { 13 dvo_measure_init (&out[i]); 14 15 out[i].dR = in[i].dR; 16 out[i].dD = in[i].dD; 17 out[i].M = in[i].M; 18 out[i].Mcal = in[i].Mcal; 19 out[i].Map = in[i].Map; 20 out[i].Mkron = in[i].Mkron; 21 out[i].dMkron = in[i].dMkron; 22 out[i].dM = in[i].dM; 23 out[i].dMcal = in[i].dMcal; 24 out[i].dt = in[i].dt; 25 out[i].FluxPSF = in[i].FluxPSF; 26 out[i].dFluxPSF = in[i].dFluxPSF; 27 out[i].FluxKron = in[i].FluxKron; 28 out[i].dFluxKron = in[i].dFluxKron; 29 out[i].airmass = in[i].airmass; 30 out[i].az = in[i].az; 31 out[i].Xccd = in[i].Xccd; 32 out[i].Yccd = in[i].Yccd; 33 out[i].Xoff = in[i].Xoff; 34 out[i].Yoff = in[i].Yoff; 35 out[i].Sky = in[i].Sky; 36 out[i].dSky = in[i].dSky; 37 out[i].t = in[i].t; 38 out[i].t_msec = in[i].t_msec; 39 out[i].averef = in[i].averef; 40 out[i].detID = in[i].detID; 41 out[i].imageID = in[i].imageID; 42 out[i].objID = in[i].objID; 43 out[i].catID = in[i].catID; 44 out[i].extID = in[i].extID; 45 out[i].psfQF = in[i].psfQF; 46 out[i].psfQFperf = in[i].psfQFperf; 47 out[i].psfChisq = in[i].psfChisq; 48 out[i].psfNdof = in[i].psfNdof; 49 out[i].psfNpix = in[i].psfNpix; 50 out[i].crNsigma = in[i].crNsigma; 51 out[i].extNsigma = in[i].extNsigma; 52 out[i].FWx = in[i].FWx; 53 out[i].FWy = in[i].FWy; 54 out[i].theta = in[i].theta; 55 out[i].Mxx = in[i].Mxx; 56 out[i].Mxy = in[i].Mxy; 57 out[i].Myy = in[i].Myy; 58 out[i].dXccd = in[i].dXccd; 59 out[i].dYccd = in[i].dYccd; 60 out[i].dRsys = in[i].dRsys; 61 out[i].posangle = in[i].posangle; 62 out[i].pltscale = in[i].pltscale; 63 out[i].photcode = in[i].photcode; 64 out[i].dbFlags = in[i].dbFlags; 65 out[i].photFlags = in[i].photFlags; 66 } 67 return (out); 68 } 69 70 Measure_PS1_V4 *MeasureInternalTo_PS1_V4 (Measure *in, off_t Nvalues) { 71 72 off_t i; 73 Measure_PS1_V4 *out; 74 75 ALLOCATE_ZERO (out, Measure_PS1_V4, Nvalues); 11 76 12 77 for (i = 0; i < Nvalues; i++) { … … 64 129 } 65 130 66 Measure_PS1_V4 *MeasureInternalTo_PS1_V4 (Measure *in, off_t Nvalues) {67 68 off_t i;69 Measure_PS1_V4 *out;70 71 ALLOCATE_ZERO (out, Measure_PS1_V4, Nvalues);72 73 for (i = 0; i < Nvalues; i++) {74 out[i].dR = in[i].dR;75 out[i].dD = in[i].dD;76 out[i].M = in[i].M;77 out[i].Mcal = in[i].Mcal;78 out[i].Map = in[i].Map;79 out[i].Mkron = in[i].Mkron;80 out[i].dMkron = in[i].dMkron;81 out[i].dM = in[i].dM;82 out[i].dMcal = in[i].dMcal;83 out[i].dt = in[i].dt;84 out[i].FluxPSF = in[i].FluxPSF;85 out[i].dFluxPSF = in[i].dFluxPSF;86 out[i].FluxKron = in[i].FluxKron;87 out[i].dFluxKron = in[i].dFluxKron;88 out[i].airmass = in[i].airmass;89 out[i].az = in[i].az;90 out[i].Xccd = in[i].Xccd;91 out[i].Yccd = in[i].Yccd;92 out[i].Sky = in[i].Sky;93 out[i].dSky = in[i].dSky;94 out[i].t = in[i].t;95 out[i].t_msec = in[i].t_msec;96 out[i].averef = in[i].averef;97 out[i].detID = in[i].detID;98 out[i].imageID = in[i].imageID;99 out[i].objID = in[i].objID;100 out[i].catID = in[i].catID;101 out[i].extID = in[i].extID;102 out[i].psfQF = in[i].psfQF;103 out[i].psfQFperf = in[i].psfQFperf;104 out[i].psfChisq = in[i].psfChisq;105 out[i].psfNdof = in[i].psfNdof;106 out[i].psfNpix = in[i].psfNpix;107 out[i].crNsigma = in[i].crNsigma;108 out[i].extNsigma = in[i].extNsigma;109 out[i].FWx = in[i].FWx;110 out[i].FWy = in[i].FWy;111 out[i].theta = in[i].theta;112 out[i].Mxx = in[i].Mxx;113 out[i].Mxy = in[i].Mxy;114 out[i].Myy = in[i].Myy;115 out[i].dXccd = in[i].dXccd;116 out[i].dYccd = in[i].dYccd;117 out[i].dRsys = in[i].dRsys;118 out[i].posangle = in[i].posangle;119 out[i].pltscale = in[i].pltscale;120 out[i].photcode = in[i].photcode;121 out[i].dbFlags = in[i].dbFlags;122 out[i].photFlags = in[i].photFlags;123 }124 return (out);125 }126 127 131 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used 128 132 Average *Average_PS1_V4_ToInternal (Average_PS1_V4 *in, off_t Nvalues, SecFilt **primary) { … … 134 138 135 139 for (i = 0; i < Nvalues; i++) { 140 dvo_average_init (&out[i]); 141 136 142 out[i].R = in[i].R; 137 143 out[i].D = in[i].D; … … 221 227 222 228 for (i = 0; i < Nvalues; i++) { 229 dvo_secfilt_init (&out[i]); 230 223 231 out[i].M = in[i].M; 224 232 out[i].Map = in[i].Map; -
trunk/Ohana/src/libdvo/src/dvo_convert_elixir.c
r34620 r34749 10 10 11 11 for (i = 0; i < Nvalues; i++) { 12 dvo_measure_init (&out[i]); 12 13 out[i].FWx = in[i].FWx; 13 14 out[i].t = in[i].t; … … 28 29 29 30 // added for PANSTARRS_DEV_0 30 out[i].Xccd = 0; // determine on-the-fly 31 out[i].Yccd = 0; // determine on-the-fly 32 out[i].dXccd = 0; 33 out[i].dYccd = 0; 34 out[i].az = 0; 35 out[i].Sky = 0; 36 out[i].dSky = 0; 37 out[i].psfQF = 0; 38 out[i].psfChisq = 0; 39 out[i].crNsigma = 0; 40 out[i].extNsigma = 0; 41 out[i].detID = 0; // determine on-the-fly 42 out[i].imageID = 0; // determine on-the-fly 43 44 // changed or added for PS1_DEV_1 (2008.02.26) 31 // out[i].Xccd = 0; // determine on-the-fly 32 // out[i].Yccd = 0; // determine on-the-fly 33 // out[i].detID = 0; // determine on-the-fly 34 // out[i].imageID = 0; // determine on-the-fly 35 36 // changed for PS1_DEV_1 (2008.02.26) 45 37 out[i].dbFlags = in[i].flags; 46 out[i].detID = 0; 47 out[i].imageID = 0; 48 49 // changed or added for PS1_DEV_2 38 39 // changed for PS1_DEV_2 50 40 out[i].Map = in[i].Mgal; 51 out[i].dMcal = 0; 52 53 // changed or added for PS1_V1 41 42 // changed for PS1_V1 54 43 out[i].photFlags = in[i].dophot << 16; 55 out[i].t_msec = 0;56 out[i].extID = 0;57 out[i].objID = 0;58 out[i].catID = 0;59 out[i].Mxx = 0.0;60 out[i].Mxy = 0.0;61 out[i].Myy = 0.0;62 out[i].posangle = 0;63 out[i].pltscale = 0;64 out[i].psfNdof = 0;65 out[i].psfNpix = 0;66 67 // added for PS1_V468 out[i].Mkron = NAN;69 out[i].dMkron = NAN;70 out[i].FluxPSF = NAN;71 out[i].dFluxPSF = NAN;72 out[i].FluxKron = NAN;73 out[i].dFluxKron = NAN;74 out[i].psfQFperf = NAN;75 44 } 76 45 return (out); … … 126 95 127 96 for (i = 0; i < Nvalues; i++) { 97 dvo_average_init (&out[i]); 98 dvo_secfilt_init (&primary[0][i]); 99 128 100 out[i].R = in[i].R; 129 101 out[i].D = in[i].D; … … 134 106 primary[0][i].Xm = in[i].Xm; 135 107 136 primary[0][i].Ncode = 0;137 primary[0][i].Nused = 0;138 139 108 // added for PANSTARRS_DEV_0 140 out[i].dR = 0; 141 out[i].dD = 0; 142 out[i].uR = 0; 143 out[i].uD = 0; 144 out[i].duR = 0; 145 out[i].duD = 0; 146 out[i].P = 0; 147 out[i].dP = 0; 148 out[i].objID = 0; // determine on-the-fly 149 out[i].catID = 0; // determine on-the-fly 109 // out[i].objID = 0; // determine on-the-fly 110 // out[i].catID = 0; // determine on-the-fly 150 111 151 112 // changed or added for PS1_DEV_2 … … 154 115 out[i].measureOffset = in[i].offset; 155 116 out[i].missingOffset = in[i].missing; 156 out[i].Nextend = 0;157 out[i].extendOffset = 0;158 117 159 118 // changed or added for PS1_V1 160 119 out[i].flags = in[i].code; 161 out[i].ChiSqAve = NAN;162 out[i].ChiSqPM = NAN;163 out[i].ChiSqPar = NAN;164 out[i].Tmean = 0;165 out[i].Trange = 0;166 out[i].Npos = 0.0;167 out[i].extID = 0;168 169 // added in PS1_V3170 out[i].photFlagsUpper = 0;171 out[i].photFlagsLower = 0;172 173 // added for PS1_V4 (Xp dropped in V4 onward, was not really used anyway)174 out[i].psfQF = NAN;175 out[i].psfQFperf = NAN;176 out[i].stargal = NAN;177 120 } 178 121 return (out); … … 217 160 218 161 for (i = 0; i < Nvalues; i++) { 162 dvo_secfilt_init (&out[i]); 163 219 164 out[i].Xm = in[i].Xm; 220 165 … … 222 167 out[i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 223 168 out[i].dM = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM * 0.001; 224 out[i].Ncode = 0;225 out[i].Nused = 0;226 227 // changed or added for PS1_V1228 out[i].M_20 = 0;229 out[i].M_80 = 0;230 231 // changed or added for PS1_V2232 out[i].flags = 0;233 234 // added in PS1_V3235 out[i].Map = 0;236 out[i].Mstdev = 0;237 out[i].ubercalDist = 0;238 239 // added for PS1_V4240 out[i].Mkron = NAN;241 out[i].dMkron = NAN;242 out[i].FluxPSF = NAN;243 out[i].dFluxPSF = NAN;244 out[i].FluxKron = NAN;245 out[i].dFluxKron = NAN;246 out[i].stackDetectID = 0;247 169 } 248 170 return (out); -
trunk/Ohana/src/libdvo/src/dvo_convert_loneos.c
r34620 r34749 10 10 11 11 for (i = 0; i < Nvalues; i++) { 12 dvo_measure_init (&out[i]); 12 13 out[i].t = in[i].t; 13 14 … … 16 17 out[i].dbFlags = (in[i].averef & 0xff000000) >> 24; 17 18 out[i].t = in[i].t; 18 out[i].dt = 0;19 out[i].airmass = 0;20 out[i].FWy = 0;21 out[i].FWx = 0;22 out[i].theta = 0;23 19 24 20 // changed for PANSTARRS_DEV_0 … … 32 28 33 29 // added for PANSTARRS_DEV_0 34 out[i].Xccd = 0; // determine on-the-fly 35 out[i].Yccd = 0; // determine on-the-fly 36 out[i].dXccd = 0; 37 out[i].dYccd = 0; 38 out[i].az = 0; 39 out[i].Sky = 0; 40 out[i].dSky = 0; 41 out[i].psfQF = 0; 42 out[i].psfChisq = 0; 43 out[i].crNsigma = 0; 44 out[i].extNsigma = 0; 45 out[i].detID = 0; // determine on-the-fly 46 out[i].imageID = 0; // determine on-the-fly 47 48 // changed or added for PS1_DEV_1 (2008.02.26) 49 out[i].detID = 0; 50 out[i].imageID = 0; 51 52 // changed or added for PS1_DEV_2 53 out[i].dMcal = 0; 30 // out[i].Xccd = 0; // determine on-the-fly 31 // out[i].Yccd = 0; // determine on-the-fly 32 // out[i].detID = 0; // determine on-the-fly 33 // out[i].imageID = 0; // determine on-the-fly 54 34 55 35 // changed or added for PS1_V1 56 36 out[i].photFlags = in[i].dophot << 16; 57 out[i].t_msec = 0;58 out[i].extID = 0;59 out[i].objID = 0;60 out[i].catID = 0;61 out[i].Mxx = 0.0;62 out[i].Mxy = 0.0;63 out[i].Myy = 0.0;64 out[i].posangle = 0;65 out[i].pltscale = 0;66 out[i].psfNdof = 0;67 out[i].psfNpix = 0;68 69 // added for PS1_V470 out[i].Mkron = NAN;71 out[i].dMkron = NAN;72 out[i].FluxPSF = NAN;73 out[i].dFluxPSF = NAN;74 out[i].FluxKron = NAN;75 out[i].dFluxKron = NAN;76 out[i].psfQFperf = NAN;77 37 } 78 38 return (out); … … 117 77 118 78 for (i = 0; i < Nvalues; i++) { 79 dvo_average_init (&out[i]); 80 dvo_secfilt_init (&primary[0][i]); 81 119 82 out[i].R = in[i].R; 120 83 out[i].D = in[i].D; 121 122 // added for ELIXIR123 primary[0][i].dM = NAN;124 84 125 85 // changed for PANSTARRS_DEV_0 (moved from Average to Measure) 126 86 primary[0][i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 127 87 primary[0][i].Xm = in[i].Xm; 128 primary[0][i].Ncode = 0;129 primary[0][i].Nused = 0;130 88 131 89 // added for PANSTARRS_DEV_0 132 out[i].dR = 0; 133 out[i].dD = 0; 134 out[i].uR = 0; 135 out[i].uD = 0; 136 out[i].duR = 0; 137 out[i].duD = 0; 138 out[i].P = 0; 139 out[i].dP = 0; 140 out[i].objID = 0; // determine on-the-fly 141 out[i].catID = 0; // determine on-the-fly 90 // out[i].objID = 0; // determine on-the-fly 91 // out[i].catID = 0; // determine on-the-fly 142 92 143 93 // changed or added for PS1_DEV_2 … … 146 96 out[i].measureOffset = in[i].offset; 147 97 out[i].missingOffset = in[i].missing; 148 out[i].Nextend = 0;149 out[i].extendOffset = 0;150 98 151 99 // changed or added for PS1_V1 152 100 out[i].flags = in[i].code; 153 out[i].ChiSqAve = NAN; 154 out[i].ChiSqPM = NAN; 155 out[i].ChiSqPar = NAN; 156 out[i].Tmean = 0; 157 out[i].Trange = 0; 158 out[i].Npos = 0.0; 159 out[i].extID = 0; 160 161 // added in PS1_V3 162 out[i].photFlagsUpper = 0; 163 out[i].photFlagsLower = 0; 164 165 // added for PS1_V4 (Xp dropped in V4 onward, was not really used anyway) 166 out[i].psfQF = NAN; 167 out[i].psfQFperf = NAN; 168 out[i].stargal = NAN; 101 102 // PS1_V4 : (Xp dropped in V4 onward, was not really used anyway) 169 103 } 170 104 return (out); … … 208 142 209 143 for (i = 0; i < Nvalues; i++) { 144 dvo_secfilt_init (&out[i]); 145 210 146 out[i].Xm = in[i].Xm; 211 147 212 // added for ELIXIR213 out[i].dM = NAN;214 215 148 // added or changed for PANSTARRS_DEV_0 216 149 out[i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 217 out[i].Ncode = 0;218 out[i].Nused = 0;219 220 // changed or added for PS1_V1221 out[i].M_20 = 0;222 out[i].M_80 = 0;223 224 // changed or added for PS1_V2225 out[i].flags = 0;226 227 // added in PS1_V3228 out[i].Map = 0;229 out[i].Mstdev = 0;230 out[i].ubercalDist = 0;231 232 // added for PS1_V4233 out[i].Mkron = NAN;234 out[i].dMkron = NAN;235 out[i].FluxPSF = NAN;236 out[i].dFluxPSF = NAN;237 out[i].FluxKron = NAN;238 out[i].dFluxKron = NAN;239 out[i].stackDetectID = 0;240 150 } 241 151 return (out); -
trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c
r34620 r34749 10 10 11 11 for (i = 0; i < Nvalues; i++) { 12 dvo_measure_init (&out[i]); 12 13 out[i].dR = in[i].dR; 13 14 out[i].dD = in[i].dD; … … 35 36 // magnitudes. Most uses of Mgal in the past were actually aperture (isophotal) mags 36 37 37 // changed or addedfor PS1_DEV_1 (2008.02.26)38 // changed for PS1_DEV_1 (2008.02.26) 38 39 out[i].psfQF = (in[i].psfQF == NAN_S_SHORT) ? NAN : in[i].psfQF; 39 40 out[i].dbFlags = in[i].flags; 40 41 out[i].detID = in[i].detID_lo; 41 42 out[i].imageID = in[i].imageID_lo; 42 out[i].psfChisq = 0; 43 out[i].crNsigma = 0; 44 out[i].extNsigma = 0; 45 46 // changed or added for PS1_DEV_2 43 44 // changed for PS1_DEV_2 47 45 out[i].Map = in[i].Mgal; 48 out[i].dMcal = 0; 49 50 // changed or added for PS1_V1 46 47 // changed for PS1_V1 51 48 out[i].photFlags = in[i].dophot << 16; 52 out[i].t_msec = 0;53 out[i].extID = 0;54 out[i].objID = 0;55 out[i].catID = 0;56 out[i].Mxx = 0.0;57 out[i].Mxy = 0.0;58 out[i].Myy = 0.0;59 out[i].posangle = 0;60 out[i].pltscale = 0;61 out[i].psfNdof = 0;62 out[i].psfNpix = 0;63 64 // added for PS1_V465 out[i].Mkron = NAN;66 out[i].dMkron = NAN;67 out[i].FluxPSF = NAN;68 out[i].dFluxPSF = NAN;69 out[i].FluxKron = NAN;70 out[i].dFluxKron = NAN;71 out[i].psfQFperf = NAN;72 49 } 73 50 return (out); … … 132 109 133 110 for (i = 0; i < Nvalues; i++) { 111 dvo_average_init (&out[i]); 112 134 113 out[i].R = in[i].R; 135 114 out[i].D = in[i].D; … … 145 124 out[i].catID = in[i].catID; 146 125 147 // changed or addedfor PS1_DEV_2126 // changed for PS1_DEV_2 148 127 out[i].Nmeasure = in[i].Nm; 149 128 out[i].Nmissing = in[i].Nn; 150 129 out[i].measureOffset = in[i].offset; 151 130 out[i].missingOffset = in[i].missing; 152 out[i].Nextend = 0; 153 out[i].extendOffset = 0; 154 155 // changed or added for PS1_V1 131 132 // changed for PS1_V1 156 133 out[i].flags = in[i].code; 157 out[i].ChiSqAve = NAN;158 out[i].ChiSqPM = NAN;159 out[i].ChiSqPar = NAN;160 out[i].Tmean = 0;161 out[i].Trange = 0;162 out[i].Npos = 0.0;163 out[i].extID = 0;164 165 // added in PS1_V3166 out[i].photFlagsUpper = 0;167 out[i].photFlagsLower = 0;168 169 // added for PS1_V4 (Xp dropped in V4 onward, was not really used anyway)170 out[i].psfQF = NAN;171 out[i].psfQFperf = NAN;172 out[i].stargal = NAN;173 134 } 174 135 return (out); … … 219 180 220 181 for (i = 0; i < Nvalues; i++) { 182 dvo_secfilt_init (&out[i]); 183 221 184 out[i].M = in[i].M; 222 185 out[i].dM = in[i].dM; … … 224 187 out[i].Ncode = in[i].Ncode; 225 188 out[i].Nused = in[i].Nused; 226 227 // changed or added for PS1_V1228 out[i].M_20 = 0;229 out[i].M_80 = 0;230 231 // changed or added for PS1_V2232 out[i].flags = 0;233 234 // added in PS1_V3235 out[i].Map = 0;236 out[i].Mstdev = 0;237 out[i].ubercalDist = 0;238 239 // added for PS1_V4240 out[i].Mkron = NAN;241 out[i].dMkron = NAN;242 out[i].FluxPSF = NAN;243 out[i].dFluxPSF = NAN;244 out[i].FluxKron = NAN;245 out[i].dFluxKron = NAN;246 out[i].stackDetectID = 0;247 189 } 248 190 return (out); -
trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c
r34620 r34749 10 10 11 11 for (i = 0; i < Nvalues; i++) { 12 dvo_measure_init (&out[i]); 12 13 out[i].dR = in[i].dR; 13 14 out[i].dD = in[i].dD; … … 40 41 out[i].detID = in[i].detID_lo; 41 42 out[i].imageID = in[i].imageID_lo; 42 out[i].psfChisq = 0; 43 out[i].crNsigma = 0; 44 out[i].extNsigma = 0; 45 46 // changed or added for PS1_DEV_2 43 44 // changed for PS1_DEV_2 47 45 out[i].Map = in[i].Mgal; 48 out[i].dMcal = 0; 49 50 // changed or added for PS1_V1 46 47 // changed for PS1_V1 51 48 out[i].photFlags = in[i].dophot << 16; 52 out[i].t_msec = 0;53 out[i].extID = 0;54 out[i].objID = 0;55 out[i].catID = 0;56 out[i].Mxx = 0.0;57 out[i].Mxy = 0.0;58 out[i].Myy = 0.0;59 out[i].posangle = 0;60 out[i].pltscale = 0;61 out[i].psfNdof = 0;62 out[i].psfNpix = 0;63 64 // added for PS1_V465 out[i].Mkron = NAN;66 out[i].dMkron = NAN;67 out[i].FluxPSF = NAN;68 out[i].dFluxPSF = NAN;69 out[i].FluxKron = NAN;70 out[i].dFluxKron = NAN;71 out[i].psfQFperf = NAN;72 49 } 73 50 return (out); … … 132 109 133 110 for (i = 0; i < Nvalues; i++) { 111 dvo_average_init (&out[i]); 112 134 113 out[i].R = in[i].R; 135 114 out[i].D = in[i].D; … … 145 124 out[i].catID = in[i].catID; 146 125 147 // changed or addedfor PS1_DEV_2126 // changed for PS1_DEV_2 148 127 out[i].Nmeasure = in[i].Nm; 149 128 out[i].Nmissing = in[i].Nn; 150 129 out[i].measureOffset = in[i].offset; 151 130 out[i].missingOffset = in[i].missing; 152 out[i].Nextend = 0; 153 out[i].extendOffset = 0; 154 155 // changed or added for PS1_V1 131 132 // changed for PS1_V1 156 133 out[i].flags = in[i].code; 157 out[i].ChiSqAve = NAN;158 out[i].ChiSqPM = NAN;159 out[i].ChiSqPar = NAN;160 out[i].Tmean = 0;161 out[i].Trange = 0;162 out[i].Npos = 0.0;163 out[i].extID = 0;164 165 // added in PS1_V3166 out[i].photFlagsUpper = 0;167 out[i].photFlagsLower = 0;168 169 // added for PS1_V4 (Xp dropped in V4 onward, was not really used anyway)170 out[i].psfQF = NAN;171 out[i].psfQFperf = NAN;172 out[i].stargal = NAN;173 134 } 174 135 return (out); … … 219 180 220 181 for (i = 0; i < Nvalues; i++) { 182 dvo_secfilt_init (&out[i]); 183 221 184 out[i].M = in[i].M; 222 185 out[i].dM = in[i].dM; … … 224 187 out[i].Ncode = in[i].Ncode; 225 188 out[i].Nused = in[i].Nused; 226 227 // changed or added for PS1_V1228 out[i].M_20 = 0;229 out[i].M_80 = 0;230 231 // changed or added for PS1_V2232 out[i].flags = 0;233 234 // added in PS1_V3235 out[i].Map = 0;236 out[i].Mstdev = 0;237 out[i].ubercalDist = 0;238 239 // added for PS1_V4240 out[i].Mkron = NAN;241 out[i].dMkron = NAN;242 out[i].FluxPSF = NAN;243 out[i].dFluxPSF = NAN;244 out[i].FluxKron = NAN;245 out[i].dFluxKron = NAN;246 out[i].stackDetectID = 0;247 189 } 248 190 return (out); -
trunk/Ohana/src/libdvo/src/fits_db.c
r29938 r34749 159 159 make_backup (db[0].filename); 160 160 Fseek (db[0].f, 0, SEEK_SET); 161 162 int fd = fileno (db->f); 163 if (ftruncate (fd, 0)) { 164 perror ("gfits_db_save: "); 165 return (FALSE); 166 } 161 167 162 168 if (!gfits_fwrite_header (db[0].f, &db[0].header)) { -
trunk/Ohana/src/markrock/src/ConfigInit.c
r25757 r34749 5 5 char *config, *file; 6 6 char CatdirPhotcodeFile[256]; 7 char MasterPhotcodeFile[256];8 7 9 8 /*** load configuration info ***/ … … 21 20 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 22 21 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); 23 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile);24 22 25 23 /* unique to markrock */ … … 44 42 /* XXX this does not yet write out the master photcode table */ 45 43 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR); 46 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {47 fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);44 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) { 45 fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile); 48 46 exit (1); 49 47 } -
trunk/Ohana/src/markstar/src/ConfigInit.c
r25757 r34749 5 5 char *config, *file; 6 6 char CatdirPhotcodeFile[256]; 7 char MasterPhotcodeFile[256];8 7 9 8 /*** load configuration info ***/ … … 21 20 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 22 21 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); 23 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile);24 22 25 23 sprintf (ImageCat, "%s/Images.dat", CATDIR); … … 54 52 /* XXX this does not yet write out the master photcode table */ 55 53 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR); 56 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {57 fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);54 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) { 55 fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile); 58 56 exit (1); 59 57 } -
trunk/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/Ohana/src/opihi/cmd.astro merged: 34654,34735,34747
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.data/box.c
r27790 r34749 149 149 usage: 150 150 gprint (GP_ERR, "USAGE: box [-ticks NNNN] [-axis NNNN] [-labels NNNN]\n"); 151 152 gprint (GP_ERR, " additional options:\n"); 153 gprint (GP_ERR, " -fn (font) (size) : set font used for box\n"); 154 gprint (GP_ERR, " -lw (weight) : set box line weight\n"); 155 gprint (GP_ERR, " -c (color) : set box color\n"); 156 gprint (GP_ERR, " \n"); 157 gprint (GP_ERR, " for the descriptions below:\n"); 158 gprint (GP_ERR, " -x refers to the bottom x-axis, \n"); 159 gprint (GP_ERR, " -y refers to the left y-axis, \n"); 160 gprint (GP_ERR, " +x refers to the top x-axis, \n"); 161 gprint (GP_ERR, " +y refers to the right y-axis, \n"); 162 gprint (GP_ERR, " \n"); 163 gprint (GP_ERR, " -ticks [NNNN] : turn on (1), off (0), or use default for ticks\n"); 164 gprint (GP_ERR, " -labels [NNNN] : turn on (1), off (0), or use default for label\n"); 165 gprint (GP_ERR, " -axis [NNNN] : turn on (1), off (0), or use default for axis\n"); 166 gprint (GP_ERR, " the order for the NNNN values in the above options is: -x, -y, +x, +y\n"); 167 gprint (GP_ERR, " \n"); 168 gprint (GP_ERR, " -tickpad : set the spacing between the ticks and the tick text \n"); 169 gprint (GP_ERR, " \n"); 170 gprint (GP_ERR, " the following set the spacing between the label and the given axis:\n"); 171 gprint (GP_ERR, " -labelpadx, -labelpady, +labelpadx, +labelpady\n"); 172 gprint (GP_ERR, " \n"); 173 gprint (GP_ERR, " -pad : set the spacing between the plot section boundary and the axes\n"); 174 gprint (GP_ERR, " alternatively, set each axis independently with:\n"); 175 gprint (GP_ERR, " -xpad, -ypad, +xpad, +ypad\n"); 176 151 177 return (FALSE); 152 178 } -
trunk/Ohana/src/opihi/dvo/avextract.c
r34405 r34749 137 137 // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results 138 138 if (PARALLEL && !HOST_ID) { 139 int status = HostTableParallelOps (argc, argv, RESULT_FILE, 0, VERBOSE);139 int status = HostTableParallelOps (argc, argv, RESULT_FILE, TRUE, 0, VERBOSE); 140 140 141 141 dbFreeFields (fields, Nfields); … … 325 325 gprint (GP_ERR, " <photcode>:nphot : number of measurements used for average magnitude in this photcode\n"); 326 326 327 // gprint (GP_ERR, " <photcode>:ap : catalog aperture magnitude for photcode\n"); 328 // gprint (GP_ERR, " <photcode>:aper : catalog aperture magnitude for photcode\n"); 329 // gprint (GP_ERR, " <photcode>:aveerr : average error (stdev)\n"); 330 // gprint (GP_ERR, " <photcode>:aperinst : aperture flux\n"); 331 // gprint (GP_ERR, " <photcode>:aper_inst : aperture flux\n"); 332 333 gprint (GP_ERR, " <photcode>:kron : kron flux\n"); 334 // gprint (GP_ERR, " <photcode>:kronerr : kron error\n"); 335 gprint (GP_ERR, " <photcode>:photflags : photometry flags for measurements\n"); 336 gprint (GP_ERR, " <photcode>:flags : photometry flags for measurements\n"); 337 gprint (GP_ERR, " <photcode>:stdev : standard deviation of measurements\n"); 338 gprint (GP_ERR, " <photcode>:20 : 20 percentile psf mag\n"); 339 gprint (GP_ERR, " <photcode>:80 : 80 percentile psf mag\n"); 340 gprint (GP_ERR, " <photcode>:ucdist : distance to ubercalibrated exposure (in exposure overlaps)\n"); 341 gprint (GP_ERR, " <photcode>:stackDetectID : PSPS ID for stack detection\n"); 342 gprint (GP_ERR, " <photcode>:fluxpsf : psf flux\n"); 343 gprint (GP_ERR, " <photcode>:fluxpsferr : psf flux error\n"); 344 gprint (GP_ERR, " <photcode>:fluxkron : kron flux\n"); 345 gprint (GP_ERR, " <photcode>:fluxkronerr : kron flux error\n"); 346 327 347 // gprint (GP_ERR, " type : dophot type (unused)\n"); 328 348 // gprint (GP_ERR, " typefrac : dophot type fraction (unused)\n"); -
trunk/Ohana/src/opihi/dvo/avmatch.c
r34461 r34749 95 95 96 96 // I need to pass the RA & DEC vectors to the remote clients... 97 int status = HostTableParallelOps (argc, argv, RESULT_FILE, RAvec->Nelements, VERBOSE);97 int status = HostTableParallelOps (argc, argv, RESULT_FILE, TRUE, RAvec->Nelements, VERBOSE); 98 98 if (vec) free (vec); 99 99 -
trunk/Ohana/src/opihi/dvo/dvo_host_utils.c
r34260 r34749 79 79 } 80 80 81 // bundle the arguments into a command and pass to dvo_client. this implementation 82 // expects there to be a result file from the clients, and to load this into vectors in 83 // the main shell. 'Nelements' is a temp hack : for most commands, the result vectors are 84 // concatenated, but for avmatch, the vectors are merged by index into a pre-known 85 // length. this is probably not a solution to a general problem.. 86 int HostTableParallelOps (int argc, char **argv, char *ResultFile, int Nelements, int VERBOSE) { 81 // bundle the arguments into a command and pass to dvo_client. 82 83 // the normal ending step expects there to be a result file from the clients, and to load 84 // this into vectors in the main shell. 'Nelements' is a temp hack : for most commands, 85 // the result vectors are concatenated, but for avmatch, the vectors are merged by index 86 // into a pre-known length. this is probably not a solution to a general problem.. 87 88 // an alternative ending step ignores the result files and instead saves the names into 89 // the list 'result:n' for the user to access as desired 90 int HostTableParallelOps (int argc, char **argv, char *ResultFile, int ReadVectors, int Nelements, int VERBOSE) { 87 91 88 92 int i; … … 153 157 } 154 158 159 // create the result file list 160 char name[256]; 161 snprintf (name, 256, "RESULT_FILE:n"); 162 set_int_variable (name, table->Nhosts); 163 snprintf (name, 256, "RESULT_DATA:n"); 164 set_int_variable (name, table->Nhosts); 165 snprintf (name, 256, "RESULT_STATUS:n"); 166 set_int_variable (name, table->Nhosts); 167 155 168 // load fields from file 156 169 int Nvec = 0; 157 170 Vector **vec = NULL; 158 171 for (i = 0; i < table->Nhosts; i++) { 172 173 snprintf (name, 256, "RESULT_FILE:%d", i); 174 set_str_variable (name, table->hosts[i].results); 175 176 // DATA : 0 (unread), 1 (read) 177 snprintf (name, 256, "RESULT_DATA:%d", i); 178 set_int_variable (name, 0); 179 180 // STATUS : 0 (normal exit), -1 (crash), N (failure exit status) 181 snprintf (name, 256, "RESULT_STATUS:%d", i); 182 set_int_variable (name, table->hosts[i].status); 183 159 184 if (table->hosts[i].status) continue; 185 186 if (ReadVectors) { 187 int Ninvec = 0; 188 Vector **invec = ReadVectorTableFITS (table->hosts[i].results, "RESULT", &Ninvec); 189 if (!invec) { 190 // failed to read the file, now what? 191 gprint (GP_ERR, "failed to read remote result file : %s\n", table->hosts[i].results); 192 free (table->hosts[i].results); 193 table->hosts[i].results = NULL; 194 continue; 195 } 196 free (table->hosts[i].results); 197 table->hosts[i].results = NULL; 198 set_int_variable (name, 1); // result file has been read 199 200 if (Nelements == 0) { 201 vec = MergeVectors (vec, &Nvec, invec, Ninvec); 202 if (vec != invec) { 203 FreeVectorArray (invec, Ninvec); 204 } 205 } else { 206 vec = MergeVectorsByIndex (vec, &Nvec, invec, Ninvec, Nelements); 207 FreeVectorArray (invec, Ninvec); 208 } 209 } 210 } 211 212 // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere) 213 if (ResultFile) { 214 int status = WriteVectorTableFITS (ResultFile, "RESULT", vec, Nvec, FALSE, NULL); 215 if (!status) { 216 gprint (GP_ERR, "failed to write result file %s\n", ResultFile); 217 return FALSE; 218 } 219 } 220 221 for (i = 0; i < Nvec; i++) { 222 AssignVector (vec[i], vec[i]->name, ANYVECTOR, TRUE); 223 } 224 free (vec); 225 226 free (table); 227 return TRUE; 228 } 229 230 // re-gather the remote results files: this can be used in case one of the clients failed, 231 // and has since been re-run 232 int HostTableReloadResults (char *uniquer, int VERBOSE) { 233 234 int i; 235 236 // load the list of hosts 237 SkyTable *sky = GetSkyTable(); 238 if (!sky) { 239 gprint (GP_ERR, "failed to load sky table for database\n"); 240 return FALSE; 241 } 242 243 char *CATDIR = GetCATDIR (); 244 if (!CATDIR) { 245 gprint (GP_ERR, "failed to get CATDIR for database\n"); 246 return FALSE; 247 } 248 249 HostTable *table = HostTableLoad (CATDIR, sky->hosts); 250 if (!table) { 251 gprint (GP_ERR, "ERROR: failure reading Host Table %s for database %s\n", sky->hosts, CATDIR); 252 return FALSE; 253 } 254 255 // load fields from file 256 int Nvec = 0; 257 Vector **vec = NULL; 258 for (i = 0; i < table->Nhosts; i++) { 259 // ensure that the paths are absolute path names 260 char *tmppath = abspath (table->hosts[i].pathname, DVO_MAX_PATH); 261 free (table->hosts[i].pathname); 262 table->hosts[i].pathname = tmppath; 263 264 // need to save the results filename with the uniquer 265 // XXX a bit of a waste (but only 1024 * 60 bytes or so 266 ALLOCATE (table->hosts[i].results, char, DVO_MAX_PATH); 267 snprintf (table->hosts[i].results, DVO_MAX_PATH, "%s/dvo.results.%s.fits", table->hosts[i].pathname, uniquer); 160 268 161 269 int Ninvec = 0; … … 171 279 table->hosts[i].results = NULL; 172 280 173 if (Nelements == 0) { 174 vec = MergeVectors (vec, &Nvec, invec, Ninvec); 175 if (vec != invec) { 176 FreeVectorArray (invec, Ninvec); 177 } 178 } else { 179 vec = MergeVectorsByIndex (vec, &Nvec, invec, Ninvec, Nelements); 281 // fprintf (stderr, "%s : %d\n", table->hosts[i].pathname, invec[0]->Nelements); 282 283 vec = MergeVectors (vec, &Nvec, invec, Ninvec); 284 if (vec != invec) { 180 285 FreeVectorArray (invec, Ninvec); 181 }182 }183 184 // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)185 if (ResultFile) {186 int status = WriteVectorTableFITS (ResultFile, "RESULT", vec, Nvec, FALSE, NULL);187 if (!status) {188 gprint (GP_ERR, "failed to write result file %s\n", ResultFile);189 return FALSE;190 286 } 191 287 } … … 199 295 return TRUE; 200 296 } 201 202 // re-gather the remote results files: this can be used in case one of the clients failed,203 // and has since been re-run204 int HostTableReloadResults (char *uniquer, int VERBOSE) {205 206 int i;207 208 // load the list of hosts209 SkyTable *sky = GetSkyTable();210 if (!sky) {211 gprint (GP_ERR, "failed to load sky table for database\n");212 return FALSE;213 }214 215 char *CATDIR = GetCATDIR ();216 if (!CATDIR) {217 gprint (GP_ERR, "failed to get CATDIR for database\n");218 return FALSE;219 }220 221 HostTable *table = HostTableLoad (CATDIR, sky->hosts);222 if (!table) {223 gprint (GP_ERR, "ERROR: failure reading Host Table %s for database %s\n", sky->hosts, CATDIR);224 return FALSE;225 }226 227 // load fields from file228 int Nvec = 0;229 Vector **vec = NULL;230 for (i = 0; i < table->Nhosts; i++) {231 // ensure that the paths are absolute path names232 char *tmppath = abspath (table->hosts[i].pathname, DVO_MAX_PATH);233 free (table->hosts[i].pathname);234 table->hosts[i].pathname = tmppath;235 236 // need to save the results filename with the uniquer237 // XXX a bit of a waste (but only 1024 * 60 bytes or so238 ALLOCATE (table->hosts[i].results, char, DVO_MAX_PATH);239 snprintf (table->hosts[i].results, DVO_MAX_PATH, "%s/dvo.results.%s.fits", table->hosts[i].pathname, uniquer);240 241 int Ninvec = 0;242 Vector **invec = ReadVectorTableFITS (table->hosts[i].results, "RESULT", &Ninvec);243 if (!invec) {244 // failed to read the file, now what?245 gprint (GP_ERR, "failed to read remote result file : %s\n", table->hosts[i].results);246 free (table->hosts[i].results);247 table->hosts[i].results = NULL;248 continue;249 }250 free (table->hosts[i].results);251 table->hosts[i].results = NULL;252 253 // fprintf (stderr, "%s : %d\n", table->hosts[i].pathname, invec[0]->Nelements);254 255 vec = MergeVectors (vec, &Nvec, invec, Ninvec);256 if (vec != invec) {257 FreeVectorArray (invec, Ninvec);258 }259 }260 261 for (i = 0; i < Nvec; i++) {262 AssignVector (vec[i], vec[i]->name, ANYVECTOR, TRUE);263 }264 free (vec);265 266 free (table);267 return TRUE;268 } -
trunk/Ohana/src/opihi/dvo/mextract.c
r34260 r34749 108 108 // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results 109 109 if (PARALLEL && !HOST_ID) { 110 int status = HostTableParallelOps (argc, argv, RESULT_FILE, 0, VERBOSE);110 int status = HostTableParallelOps (argc, argv, RESULT_FILE, TRUE, 0, VERBOSE); 111 111 112 112 dbFreeFields (fields, Nfields); … … 313 313 gprint (GP_ERR, " Npos : number of measurments used for astrometry\n"); 314 314 315 gprint (GP_ERR, " objflags : object flags\n"); 316 gprint (GP_ERR, " photflags : detection flags from image analysis\n"); 317 gprint (GP_ERR, " dbflags : detection flags from database analysis\n"); 315 gprint (GP_ERR, " objflags : object flags [alias: obj_flags]\n"); 316 gprint (GP_ERR, " secflags : average photometry flags [aliases: obj_phot_flags, sec_flags, secfilt_flags]\n"); 317 gprint (GP_ERR, " photflags : detection flags from image analysis [alias: phot_flags]\n"); 318 gprint (GP_ERR, " dbflags : detection flags from database analysis [alias: db_flags]\n"); 318 319 319 320 gprint (GP_ERR, " obj_flags : object flags\n"); … … 321 322 gprint (GP_ERR, " db_flags : detection flags from database analysis\n"); 322 323 324 gprint (GP_ERR, " airmass : airmass of detection\n"); 325 gprint (GP_ERR, " meas_airmass : airmass of exposure\n"); 326 gprint (GP_ERR, " alt : altitude of detection\n"); 327 gprint (GP_ERR, " az : azimuth of detection\n"); 328 gprint (GP_ERR, " exptime : exposure time [s]\n"); 329 gprint (GP_ERR, " photcode : photcode \n"); 330 gprint (GP_ERR, " photcode:equiv : equivalent average photcode \n"); 331 gprint (GP_ERR, " photcode:c : zero point of photcode \n"); 332 gprint (GP_ERR, " photcode:klam : airmass slope of photcode \n"); 333 gprint (GP_ERR, " time : time of exposure [Seconds since Jan 1, 1970/\n"); 334 gprint (GP_ERR, " fwhm : fwhm (average) of fitted PSF [pixels]\n"); 335 gprint (GP_ERR, " fwhm_maj : fwhm (major axis) of fitted PSF [pixels]\n"); 336 gprint (GP_ERR, " fwhm_min : fwhm (minor axis) of fitted PSF [pixels]\n"); 337 gprint (GP_ERR, " theta : position angle of fitted PSF\n"); 338 gprint (GP_ERR, " posangle : position angle of detector at measurement [degrees]\n"); 339 gprint (GP_ERR, " platescale : plate scale of detector at measurement [arcsec/pixel] (negative = sky parity)\n"); 340 341 gprint (GP_ERR, " Mxx : second moment in X [pixels^2]\n"); 342 gprint (GP_ERR, " Mxy : second moment cross term [pixels^2]\n"); 343 gprint (GP_ERR, " Myy : second moment in Y [pixels^2]\n"); 344 345 gprint (GP_ERR, " xccd : ccd x position\n"); 346 gprint (GP_ERR, " yccd : ccd y position\n"); 347 gprint (GP_ERR, " xoff : ccd x correction\n"); 348 gprint (GP_ERR, " yoff : ccd y correction\n"); 349 gprint (GP_ERR, " xccd:err : ccd x position error\n"); 350 gprint (GP_ERR, " yccd:err : ccd y position error\n"); 351 352 gprint (GP_ERR, " pos_sys_err : systematic position error\n"); 353 354 gprint (GP_ERR, " xmosaic : mosaic x position\n"); 355 gprint (GP_ERR, " ymosaic : mosaic y position\n"); 356 357 gprint (GP_ERR, " xchip : chip x position (= ccd position)\n"); 358 gprint (GP_ERR, " ychip : chip y position (= ccd position)\n"); 359 gprint (GP_ERR, " xfpa : fpa x position (= mosaic position)\n"); 360 gprint (GP_ERR, " yfpa : fpa y position (= mosaic position)\n"); 361 362 gprint (GP_ERR, " detID : ID of detection (unique on source image)\n"); 363 gprint (GP_ERR, " objID : object ID (32 bit, unique in catalog)\n"); 364 gprint (GP_ERR, " catID : catalog ID (32 bit)\n"); 365 gprint (GP_ERR, " imageID : ID of source image (32 bit)\n"); 366 gprint (GP_ERR, " externID : externID of source image (32 bit)\n"); 367 368 gprint (GP_ERR, " psf_qf : PSF quality factor (psf-weighted mask fraction)\n"); 369 gprint (GP_ERR, " psf_qf_perfect : PSF quality factor, perfect mask version (psf-weighted mask fraction)\n"); 370 371 gprint (GP_ERR, " psf_chisq : PSF fit chi square\n"); 372 gprint (GP_ERR, " psf_ndof : PSF number of degrees of freedom\n"); 373 gprint (GP_ERR, " psf_npix : PSF number of pixels\n"); 374 375 gprint (GP_ERR, " cr_nsigma : Nsigma deviation towards cosmic ray\n"); 376 gprint (GP_ERR, " ext_nsigma : Nsigma deviation towards extended source\n"); 377 378 gprint (GP_ERR, " sky : sky model flux at measurement location\n"); 379 gprint (GP_ERR, " sky_err : sky model stdev at measurement location\n"); 380 381 gprint (GP_ERR, " Mcal_offset : difference wrt nominal zero point (clouds are positive)\n"); 382 gprint (GP_ERR, " flat : flat-field correction (measure.Mcal - image.Mcal)\n"); 383 384 gprint (GP_ERR, " center_offset : distance to image center\n"); 385 gprint (GP_ERR, " flux : PSF flux\n"); 386 gprint (GP_ERR, " flux_err : PSF flux error\n"); 387 gprint (GP_ERR, " flux_psf : PSF flux\n"); 388 gprint (GP_ERR, " flux_psf_err : PSF flux error\n"); 389 gprint (GP_ERR, " flux_kron : KRON flux\n"); 390 gprint (GP_ERR, " flux_kron_err : KRON flux error\n"); 391 392 gprint (GP_ERR, " --- the following fields are selected by giving a photcode with the attached ending\n"); 323 393 gprint (GP_ERR, " <photcode>:ave : average magnitude for photcode (or equivalent)\n"); 324 394 gprint (GP_ERR, " <photcode>:ref : reference magnitude system for photcode (or equivalent)\n"); … … 335 405 gprint (GP_ERR, " <photcode>:ncode : number of measurements in photcode\n"); 336 406 gprint (GP_ERR, " <photcode>:nphot : number of measurements used for average magnitude\n"); 337 gprint (GP_ERR, " airmass : airmass of detection\n"); 338 gprint (GP_ERR, " alt : altitude of detection\n"); 339 gprint (GP_ERR, " az : azimuth of detection\n"); 340 gprint (GP_ERR, " exptime : exposure time [s]\n"); 341 gprint (GP_ERR, " photcode : photcode \n"); 342 gprint (GP_ERR, " photcode:equiv : equivalent average photcode \n"); 343 gprint (GP_ERR, " time : time of exposure [Seconds since Jan 1, 1970/\n"); 344 gprint (GP_ERR, " fwhm : fwhm (average) of fitted PSF [pixels]\n"); 345 gprint (GP_ERR, " fwhm_maj : fwhm (major axis) of fitted PSF [pixels]\n"); 346 gprint (GP_ERR, " fwhm_min : fwhm (minor axis) of fitted PSF [pixels]\n"); 347 gprint (GP_ERR, " theta : position angle of fitted PSF\n"); 348 gprint (GP_ERR, " posangle : position angle of detector at measurement [degrees]\n"); 349 gprint (GP_ERR, " platescale : plate scale of detector at measurement [arcsec/pixel] \n"); 350 351 gprint (GP_ERR, " psf_qf : PSF quality factor (psf-weighted mask fraction)\n"); 352 gprint (GP_ERR, " psf_chisq : PSF fit chi square\n"); 353 gprint (GP_ERR, " psf_ndof : PSF number of degrees of freedom\n"); 354 gprint (GP_ERR, " psf_npix : PSF number of pixels\n"); 355 356 gprint (GP_ERR, " cr_nsigma : Nsigma deviation towards cosmic ray\n"); 357 gprint (GP_ERR, " ext_nsigma : Nsigma deviation towards extended source\n"); 358 359 gprint (GP_ERR, " Mxx : second moment in X [pixels^2]\n"); 360 gprint (GP_ERR, " Mxy : second moment cross term [pixels^2]\n"); 361 gprint (GP_ERR, " Myy : second moment in Y [pixels^2]\n"); 362 363 gprint (GP_ERR, " xccd : ccd x position\n"); 364 gprint (GP_ERR, " yccd : ccd y position\n"); 365 gprint (GP_ERR, " xccd:err : ccd x position error\n"); 366 gprint (GP_ERR, " yccd:err : ccd y position error\n"); 367 gprint (GP_ERR, " xmosaic : mosaic x position\n"); 368 gprint (GP_ERR, " ymosaic : mosaic y position\n"); 369 gprint (GP_ERR, " xchip : chip x position (= ccd position)\n"); 370 gprint (GP_ERR, " ychip : chip y position (= ccd position)\n"); 371 gprint (GP_ERR, " xfpa : fpa x position (= mosaic position)\n"); 372 gprint (GP_ERR, " yfpa : fpa y position (= mosaic position)\n"); 373 374 gprint (GP_ERR, " detID : ID of detection (unique on source image)\n"); 375 gprint (GP_ERR, " objID : object ID (32 bit, unique in catalog)\n"); 376 gprint (GP_ERR, " catID : catalog ID (32 bit)\n"); 377 gprint (GP_ERR, " imageID : ID of source image (32 bit)\n"); 378 gprint (GP_ERR, " externID : externID of source image (32 bit)\n"); 379 380 gprint (GP_ERR, " Mcal_offset : difference wrt nominal zero point (clouds are positive)\n"); 381 gprint (GP_ERR, " flat : flat-field correction (measure.Mcal - image.Mcal)\n"); 407 408 gprint (GP_ERR, " <photcode>:aperinst : instrumental aperture magnitude\n"); 409 gprint (GP_ERR, " <photcode>:aper_inst : instrumental aperture magnitude\n"); 410 gprint (GP_ERR, " <photcode>:kron : kron mag\n"); 411 gprint (GP_ERR, " <photcode>:kroninst : instrumental kron mag\n"); 412 gprint (GP_ERR, " <photcode>:kron_inst : instrumental kron mag\n"); 413 gprint (GP_ERR, " <photcode>:kronerr : kron mag error\n"); 414 415 gprint (GP_ERR, " <photcode>:photflags : photometry flags for measurements\n"); 416 gprint (GP_ERR, " <photcode>:flags : photometry flags for measurements\n"); 417 gprint (GP_ERR, " <photcode>:fluxpsf : average psf flux\n"); 418 gprint (GP_ERR, " <photcode>:fluxpsferr : average psf flux error\n"); 419 gprint (GP_ERR, " <photcode>:fluxkron : average kron flux\n"); 420 gprint (GP_ERR, " <photcode>:fluxkronerr : average kron flux error\n"); 421 382 422 return (FALSE); 383 423 } -
trunk/Ohana/src/opihi/dvo/mmatch.c
r34463 r34749 124 124 125 125 // call the remote client 126 int status = HostTableParallelOps (targc, targv, RESULT_FILE, 0, VERBOSE);126 int status = HostTableParallelOps (targc, targv, RESULT_FILE, TRUE, 0, VERBOSE); 127 127 if (vec) free (vec); 128 128 -
trunk/Ohana/src/opihi/dvo/remote.c
r33963 r34749 12 12 remove_argument (N, &argc, argv); 13 13 VERBOSE = TRUE; 14 } 15 16 int ReadVectors = TRUE; 17 if ((N = get_argument (argc, argv, "-skip-result"))) { 18 remove_argument (N, &argc, argv); 19 ReadVectors = FALSE; 14 20 } 15 21 … … 43 49 44 50 // strip of the 'remote' and send the remaining arguments to the remote machine 45 int status = HostTableParallelOps (argc - 1, &argv[1], NULL, 0, VERBOSE);51 int status = HostTableParallelOps (argc - 1, &argv[1], NULL, ReadVectors, 0, VERBOSE); 46 52 return status; 47 53 } -
trunk/Ohana/src/opihi/include/dvoshell.h
r33963 r34749 100 100 101 101 int HostTableLaunchJobs PROTO((HostTable *table, char *basecmd, char *options, int VERBOSE)); 102 int HostTableParallelOps PROTO((int argc, char **argv, char *ResultFile, int Nelements, int VERBOSE));102 int HostTableParallelOps PROTO((int argc, char **argv, char *ResultFile, int ReadVectors, int Nelements, int VERBOSE)); 103 103 int HostTableReloadResults PROTO((char *uniquer, int VERBOSE)); 104 104 -
trunk/Ohana/src/photdbc/src/ConfigInit.c
r33963 r34749 14 14 char *config, *file; 15 15 char CatdirPhotcodeFile[256]; 16 char MasterPhotcodeFile[256];17 16 18 17 /*** load configuration info ***/ … … 60 59 free (tmpcatdir); 61 60 62 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile);63 64 61 sprintf (ImageCat, "%s/Images.dat", CATDIR); 65 62 … … 73 70 /* XXX this does not yet write out the master photcode table */ 74 71 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR); 75 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, TRUE)) {72 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) { 76 73 fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile); 77 74 exit (1); -
trunk/Ohana/src/relastro/src/ConfigInit.c
r33963 r34749 5 5 char *config, *file; 6 6 char CatdirPhotcodeFile[256]; 7 char MasterPhotcodeFile[256];8 7 struct stat filestat; 9 8 int status; … … 46 45 ScanConfig(config, "CATMODE", "%s", 0, CATMODE); 47 46 ScanConfig(config, "CATFORMAT", "%s", 0, CATFORMAT); 48 ScanConfig(config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile);49 47 50 48 // Defaults for WHERE_A are established in db_utils.c: intializeConstraints … … 73 71 /* update master photcode table if not defined */ 74 72 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR); 75 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {76 fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);73 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) { 74 fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile); 77 75 exit (1); 78 76 } -
trunk/Ohana/src/relastro/src/ImageOps.c
r34088 r34749 174 174 for (i = 0; i < Ncatalog; i++) { 175 175 for (j = 0; j < catalog[i].Nmeasure; j++) { 176 // XXX : update to optionally restrict by photcode equiv a la relphot 177 // ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[j].photcode); 178 // if (photcode[0].code != ecode) continue; 176 if (NphotcodesSkip > 0) { 177 int k; 178 int found = FALSE; 179 for (k = 0; (k < NphotcodesSkip) && !found; k++) { 180 if (photcodesSkip[k][0].code == catalog[i].measure[j].photcode) found = TRUE; 181 if (photcodesSkip[k][0].code == GetPhotcodeEquivCodebyCode(catalog[i].measure[j].photcode)) found = TRUE; 182 } 183 if (found) continue; 184 } 179 185 matchImage (catalog, j, i, MATCHCAT); 180 186 } -
trunk/Ohana/src/relastro/src/UpdateObjects.c
r34576 r34749 112 112 if (XVERB) { 113 113 char *date = ohana_sec_to_date (measure[k].t); 114 fprintf (stderr, OFF_T_FMT" %f %f %s : 0x%08x : 0x%08x\n", k, measure[k].dR, measure[k].dD, date, measure[k].dbFlags, measureBig[k].dbFlags); 114 int dbFlagsBig = measureBig ? measureBig[k].dbFlags : 0; 115 fprintf (stderr, OFF_T_FMT" %f %f %s : 0x%08x : 0x%08x\n", k, measure[k].dR, measure[k].dD, date, measure[k].dbFlags, dbFlagsBig); 115 116 free (date); 116 117 } -
trunk/Ohana/src/relastro/src/args.c
r33963 r34749 237 237 } 238 238 239 PHOTCODE_SKIP_LIST = NULL;239 PHOTCODE_SKIP_LIST = strcreate("SCOS.103a.E,SCOS.4414.OG590,SCOS.4415.OG590,SCOS.IIIaF.OG590,SCOS.IIIaF.RG610,SCOS.IIIaF.RG630,SCOS.IIIaJ.GG385,SCOS.IIIaJ.GG395,SCOS.IVN.RG715,SCOS.IVN.RG9"); 240 240 if ((N = get_argument (argc, argv, "-photcode"))) { 241 241 remove_argument (N, &argc, argv); 242 PHOTCODE_SKIP_LIST = strcreate(argv[N]); 242 char *tmp1 = strcreate(argv[N]); 243 244 int Ntotal = strlen(tmp1) + strlen(PHOTCODE_SKIP_LIST) + 5; 245 246 char *tmp2 = NULL; 247 ALLOCATE (tmp2, char, Ntotal); 248 snprintf (tmp2, Ntotal, "%s,%s", PHOTCODE_SKIP_LIST, tmp1); 249 250 free (tmp1); 251 free (PHOTCODE_SKIP_LIST); 252 253 PHOTCODE_SKIP_LIST = tmp2; 243 254 remove_argument (N, &argc, argv); 244 255 } -
trunk/Ohana/src/relphot/src/ConfigInit.c
r33963 r34749 6 6 char *config, *file; 7 7 char CatdirPhotcodeFile[256]; 8 char MasterPhotcodeFile[256];9 8 10 9 /*** load configuration info ***/ … … 45 44 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 46 45 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); 47 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile);48 46 49 s printf (ImageCat, "%s/Images.dat", CATDIR);47 snprintf (ImageCat, DVO_MAX_PATH, "%s/Images.dat", CATDIR); 50 48 51 49 if (!ScanConfig (config, "SKY_DEPTH", "%d", 0, &SKY_DEPTH)) { … … 69 67 /* XXX this does not yet write out the master photcode table */ 70 68 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR); 71 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {72 fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);69 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) { 70 fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile); 73 71 exit (1); 74 72 } -
trunk/Ohana/src/relphot/src/StarOps.c
r34621 r34749 356 356 357 357 for (j = 0; j < catalog[Nc].Naverage; j++) { 358 // XXX accumulate all secfilt values in a single pass?359 360 358 // option for a test print 361 359 if (FALSE && (catalog[Nc].average[j].objID == 0x7146) && (catalog[Nc].average[j].catID == 0x49d8)) { … … 376 374 377 375 int Nmeas = 0; // number of meas used for psfqf, psfqfperf, and stargal 376 377 int NstackGood = 0; 378 int NstackSuspect = 0; 379 380 int haveStackObject = FALSE; 378 381 379 382 int Ns; … … 401 404 402 405 float stackCenterOffsetMin = 1e9; 403 // int stackCenterIDmin = -1;404 406 off_t stackCenterMeasureMin = -1; 405 407 406 408 float stackPrimaryOffsetMin = 1e9; 407 // int stackPrimaryIDmin = -1;408 409 off_t stackPrimaryMeasureMin = -1; 409 410 … … 415 416 int minUbercalDist = 1000; 416 417 418 int isBad = FALSE; 419 int isSuspect = FALSE; 420 417 421 N = 0; 418 422 m = catalog[Nc].averageT[j].measureOffset; … … 447 451 if (isnan(Msys)) SKIP_THIS_MEAS(Nsys); 448 452 449 list[N] = Msys - Mcal - Mmos - Mgrid;450 451 453 int myUbercalDist = getUbercalDist(m,Nc); 452 454 minUbercalDist = MIN(minUbercalDist, myUbercalDist); 453 455 454 456 if (isSetMrelFinal) { 455 // Map (aplist) and Mkron (kronlist,dkronlist) are used to calculate mean mags per filter456 float Map = PhotAper (&catalog[Nc].measure[m]);457 aplist[N] = Map - Mcal - Mmos - Mgrid;458 459 float Mkron = PhotKron (&catalog[Nc].measure[m]);460 kronlist[N] = Mkron - Mcal - Mmos - Mgrid;461 dkronlist[N] = catalog[Nc].measure[m].dMkron;462 463 // mean psfQF, psfQFperf, and stargal values are calculated per object (all filters)464 psfqf_list[Nmeas] = catalog[Nc].measure[m].psfQF;465 psfqfperf_list[Nmeas] = catalog[Nc].measure[m].psfQF;466 stargal_list[Nmeas] = catalog[Nc].measure[m].extNsigma;467 468 457 // special options for PS1 data 469 458 if ((catalog[Nc].measure[m].photcode >= 10000) && (catalog[Nc].measure[m].photcode <= 10500)) { … … 484 473 havePS1 = TRUE; 485 474 } 475 486 476 // gpc1 stack data 487 477 if ((catalog[Nc].measure[m].photcode >= 11000) && (catalog[Nc].measure[m].photcode <= 11400)) { 488 // if (pass < 2) continue;489 478 haveStack = TRUE; 479 haveStackObject = TRUE; 490 480 491 481 unsigned int stackImageID; … … 509 499 stackCenterMeasureMin = m; 510 500 } 501 502 // data quality assessment 503 isBad |= (catalog[Nc].measure[m].photFlags & code->photomBadMask); 504 isBad |= (catalog[Nc].measure[m].psfQF < 0.85); 505 isBad |= isnan(catalog[Nc].measure[m].psfQF); 506 isBad |= catalog[Nc].measure[m].dM > 0.2; // S/N < 5.0 507 508 isSuspect |= (catalog[Nc].measure[m].photFlags & code->photomPoorMask); 509 isSuspect |= (catalog[Nc].measure[m].psfQFperf < 0.85); 510 511 // mean psfQF, psfQFperf, and stargal values are calculated per object (all filters, stacks and exposures) 512 psfqf_list[Nmeas] = catalog[Nc].measure[m].psfQF; 513 psfqfperf_list[Nmeas] = catalog[Nc].measure[m].psfQFperf; 514 stargal_list[Nmeas] = catalog[Nc].measure[m].extNsigma; 515 Nmeas++; 516 517 continue; // do not include stack measurements in the per-exposure statistics 511 518 } 512 519 … … 523 530 // detections without one of these bits should only be used in PASS_1 524 531 SKIP_THIS_MEAS(Nbad); 525 continue;526 532 } 527 533 } … … 557 563 if (pass < 4) { 558 564 SKIP_THIS_MEAS(Nbad); 559 continue;560 565 } 561 566 haveSynth = TRUE; 562 567 } 563 568 } 569 570 // Map (aplist) and Mkron (kronlist,dkronlist) are used to calculate mean mags per filter 571 float Map = PhotAper (&catalog[Nc].measure[m]); 572 aplist[N] = Map - Mcal - Mmos - Mgrid; 573 574 float Mkron = PhotKron (&catalog[Nc].measure[m]); 575 kronlist[N] = Mkron - Mcal - Mmos - Mgrid; 576 dkronlist[N] = catalog[Nc].measure[m].dMkron; 577 578 // mean psfQF, psfQFperf, and stargal values are calculated per object (all filters, stacks and exposures) 579 psfqf_list[Nmeas] = catalog[Nc].measure[m].psfQF; 580 psfqfperf_list[Nmeas] = catalog[Nc].measure[m].psfQFperf; 581 stargal_list[Nmeas] = catalog[Nc].measure[m].extNsigma; 582 Nmeas++; 564 583 } 565 584 … … 572 591 dlist[N] = MAX (hypot(catalog[Nc].measureT[m].dM, code->photomErrSys), MIN_ERROR); 573 592 wlist[N] = 1.0; 593 list[N] = Msys - Mcal - Mmos - Mgrid; 574 594 575 595 // up-weight the ubercal values (or convergence can take a long time...) … … 588 608 } 589 609 N++; 590 Nmeas++;591 610 } 592 611 … … 595 614 if (haveStack && (N > 1)) { 596 615 // fprintf (stderr, "multiple stack values for %10.6f %10.6f\n", catalog[Nc].averageT[j].R, catalog[Nc].averageT[j].D); 616 } 617 618 if (haveStack) { 619 if (!isSuspect && !isBad) { 620 NstackGood ++; 621 } 622 if (isSuspect && !isBad) { 623 NstackSuspect ++; 624 } 597 625 } 598 626 … … 764 792 } 765 793 794 if (NstackGood >= 2) { 795 catalog[Nc].average[j].flags |= ID_OBJ_GOOD_STACK; 796 } else if (NstackGood + NstackSuspect >= 2) { 797 catalog[Nc].average[j].flags |= ID_OBJ_SUSPECT_STACK; 798 } else if (haveStackObject) { 799 catalog[Nc].average[j].flags |= ID_OBJ_BAD_STACK; 800 } 801 766 802 // use NAN values for catalog[Nc].average[j].psfQF as signal 767 803 if (!isfinite(catalog[Nc].average[j].psfQF)) { -
trunk/Ohana/src/relphot/src/setMrelFinal.c
r34642 r34749 40 40 for (i = 0; i < catalog[0].Naverage; i++) { 41 41 off_t N = Nsecfilt*i+Nsec; 42 catalog[0].secfilt[N].M = NAN; 43 catalog[0].secfilt[N].Map = NAN; 44 catalog[0].secfilt[N].dM = NAN; 45 catalog[0].secfilt[N].Mstdev = NAN_S_SHORT; 46 catalog[0].secfilt[N].Xm = NAN; 47 catalog[0].secfilt[N].M_20 = NAN_S_SHORT; 48 catalog[0].secfilt[N].M_80 = NAN_S_SHORT; 49 catalog[0].secfilt[N].Ncode = 0; 50 catalog[0].secfilt[N].Nused = 0; 51 catalog[0].secfilt[N].flags = 0; // XXX there are no *astrometry* bits in secfilt.flags 52 catalog[0].secfilt[N].ubercalDist = 1000; 42 dvo_secfilt_init (&catalog[0].secfilt[N]); 53 43 54 44 off_t m = catalog[0].average[i].measureOffset; … … 247 237 } 248 238 249 // PASS 2 : accept stack measurements239 // PASS 2 : (no additional cut) 250 240 251 241 // PASS 1 : accept poor measurements as well (eg, POOR FIT, etc) -
trunk/Ohana/src/uniphot/Makefile
r33654 r34749 21 21 setphot: $(BIN)/setphot.$(ARCH) 22 22 setphot_client: $(BIN)/setphot_client.$(ARCH) 23 setposangle: $(BIN)/setposangle.$(ARCH) 24 setposangle_client: $(BIN)/setposangle_client.$(ARCH) 23 25 24 install: $(DESTBIN)/uniphot $(DESTBIN)/setfwhm $(DESTBIN)/setphot $(DESTBIN)/setphot_client 26 install: $(DESTBIN)/uniphot $(DESTBIN)/setfwhm $(DESTBIN)/setphot $(DESTBIN)/setphot_client $(DESTBIN)/setposangle $(DESTBIN)/setposangle_client 25 27 26 28 UNIPHOT = \ … … 71 73 $(BIN)/setphot_client.$(ARCH): $(SETPHOT_CLIENT) 72 74 75 SETPOSANGLE = \ 76 $(SRC)/setposangle.$(ARCH).o \ 77 $(SRC)/initialize_setposangle.$(ARCH).o \ 78 $(SRC)/load_images_setposangle.$(ARCH).o \ 79 $(SRC)/ImageSubsetSetPosangle.$(ARCH).o \ 80 $(SRC)/update_dvo_setposangle.$(ARCH).o \ 81 $(SRC)/update_catalog_setposangle.$(ARCH).o \ 82 $(SRC)/SetSignals.$(ARCH).o \ 83 $(SRC)/Shutdown.$(ARCH).o 84 85 $(SETPOSANGLE): $(INC)/setposangle.h 86 $(BIN)/setposangle.$(ARCH): $(SETPOSANGLE) 87 88 SETPOSANGLE_CLIENT = \ 89 $(SRC)/setposangle_client.$(ARCH).o \ 90 $(SRC)/update_dvo_setposangle.$(ARCH).o \ 91 $(SRC)/update_catalog_setposangle.$(ARCH).o \ 92 $(SRC)/initialize_setposangle.$(ARCH).o \ 93 $(SRC)/load_images_setposangle.$(ARCH).o \ 94 $(SRC)/SetSignals.$(ARCH).o \ 95 $(SRC)/Shutdown.$(ARCH).o \ 96 $(SRC)/ImageSubsetSetPosangle.$(ARCH).o 97 98 $(SETPOSANGLE_CLIENT): $(INC)/setposangle.h 99 $(BIN)/setposangle_client.$(ARCH): $(SETPOSANGLE_CLIENT) 100 73 101 SETFWHM = \ 74 102 $(SRC)/setfwhm.$(ARCH).o \ -
trunk/Ohana/src/uniphot/src/initialize_setphot.c
r33963 r34749 21 21 // load the photcode table 22 22 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR); 23 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, TRUE)) {23 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) { 24 24 fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile); 25 25 exit (1); -
trunk/Ohana/src/uniphot/src/initialize_setphot_client.c
r33654 r34749 17 17 // load the photcode table : XXX needed? 18 18 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR); 19 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, TRUE)) {19 if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) { 20 20 fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile); 21 21 exit (1);
Note:
See TracChangeset
for help on using the changeset viewer.
