Changeset 35594 for branches/eam_branches/ipp-20130509/Ohana
- Timestamp:
- May 24, 2013, 1:37:30 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130509
- Files:
-
- 25 edited
-
. (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/src/addstar/include/addstar.h (modified) (1 diff)
-
Ohana/src/addstar/src/ImageIndex.c (modified) (1 diff)
-
Ohana/src/addstar/src/UpdateImageIDs.c (modified) (2 diffs)
-
Ohana/src/addstar/src/args.c (modified) (2 diffs)
-
Ohana/src/dvomerge (modified) (1 prop)
-
Ohana/src/dvomerge/include/dvomerge.h (modified) (1 diff)
-
Ohana/src/dvomerge/src/args.c (modified) (2 diffs)
-
Ohana/src/dvomerge/src/dvomerge.c (modified) (2 diffs)
-
Ohana/src/dvomerge/src/dvomergeFromList.c (modified) (1 diff)
-
Ohana/src/dvomerge/src/dvomergeUpdate.c (modified) (2 diffs)
-
Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c (modified) (2 diffs)
-
Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c (modified) (1 diff)
-
Ohana/src/dvomerge/src/help.c (modified) (2 diffs)
-
Ohana/src/dvopsps/include/dvopsps.h (modified) (1 diff)
-
Ohana/src/dvopsps/src/DetectionOps.c (modified) (8 diffs)
-
Ohana/src/dvopsps/src/insert_detections_dvopsps_catalog.c (modified) (4 diffs)
-
Ohana/src/libfits/include/gfitsio.h (modified) (1 diff)
-
Ohana/src/libfits/table/F_define_column.c (modified) (1 diff)
-
Ohana/src/libohana/src (modified) (1 prop)
-
Ohana/src/opihi (modified) (1 prop)
-
Ohana/src/opihi/cmd.astro (modified) (1 prop)
-
Ohana/src/opihi/cmd.data (modified) (1 prop)
-
Ohana/src/relastro/src (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130509
- Property svn:mergeinfo changed
/trunk (added) merged: 35566-35570,35572-35574,35576-35581,35583-35586,35590
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130509/Ohana
- Property svn:mergeinfo changed
/trunk/Ohana (added) merged: 35578-35579,35590
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130509/Ohana/src/addstar/include/addstar.h
r35263 r35594 119 119 int ACCEPT_TIME; // accept time stamp (or 0) 120 120 int NO_STARS; // ignore the stars 121 int NO_DUPLICATE_IMAGES; // allow / skip duplicate images 122 int IMAGE_ID_OVERRIDE; // allow / skip duplicate images 121 123 int TEXTMODE; // force input file to be loaded as RAW 122 124 int SUBPIX; // apply a subpix correction -
branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/ImageIndex.c
r35263 r35594 159 159 if (!index) { 160 160 fprintf (stderr, "image index file is not found, cannot check for image duplicates\n"); 161 exit ( 2);161 exit (1); 162 162 } 163 163 -
branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/UpdateImageIDs.c
r35263 r35594 35 35 } 36 36 37 // TEST IMAGE_ID OVER-RIDE: 38 if (IMAGE_ID_OVERRIDE) { 39 imageID = IMAGE_ID_OVERRIDE; 40 } 41 37 42 // XXX should the first image ID be 1, not 0? 38 43 if (imageID == 0) imageID = 1; … … 54 59 // set and update the imageID sequence 55 60 // the file holding the index is created above if this is an empty db 56 CheckDuplicateImageIDs (images, Nimages); 61 if (NO_DUPLICATE_IMAGES) { 62 CheckDuplicateImageIDs (images, Nimages); 63 } 57 64 58 65 imageID += Nimages; -
branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/args.c
r34405 r35594 308 308 if ((N = get_argument (argc, argv, "-no-stars"))) { 309 309 NO_STARS = TRUE; 310 remove_argument (N, &argc, argv); 311 } 312 /* skip the stars */ 313 NO_DUPLICATE_IMAGES = TRUE; 314 if ((N = get_argument (argc, argv, "-dup-images"))) { 315 NO_DUPLICATE_IMAGES = FALSE; 316 remove_argument (N, &argc, argv); 317 } 318 /* skip the stars */ 319 IMAGE_ID_OVERRIDE = 0; 320 if ((N = get_argument (argc, argv, "-image-id-override"))) { 321 remove_argument (N, &argc, argv); 322 IMAGE_ID_OVERRIDE = atoi(argv[N]); 310 323 remove_argument (N, &argc, argv); 311 324 } … … 438 451 fprintf (stderr, " -use-name : use the given name instead of the filename as the filename\n"); 439 452 fprintf (stderr, " -no-stars : skip the stars\n"); 453 fprintf (stderr, " -dup-images : skip the test for duplicate image IDs (test only!)\n"); 440 454 fprintf (stderr, " -force : force read of database with inconsistent info\n"); 441 455 fprintf (stderr, " -threads (N) : use N threads for resort option\n"); -
branches/eam_branches/ipp-20130509/Ohana/src/dvomerge
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/include/dvomerge.h
r35416 r35594 25 25 26 26 int VERBOSE; 27 int VERIFY; 28 int IMAGES_ONLY; 27 29 char CATDIR[256]; 28 30 char GSCFILE[256]; -
branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/args.c
r35416 r35594 12 12 remove_argument (N, argc, argv); 13 13 } 14 15 /* verify merge status of output tables, but do not modify */ 16 VERIFY = FALSE; 17 if ((N = get_argument (*argc, argv, "-verify"))) { 18 VERIFY = TRUE; 19 remove_argument (N, argc, argv); 20 } 21 if ((N = get_argument (*argc, argv, "-check-only"))) { 22 VERIFY = TRUE; 23 remove_argument (N, argc, argv); 24 } 25 26 /* use a different photcode file to define mean values */ 14 27 if ((N = get_argument (*argc, argv, "-photcode-file"))) { 15 28 remove_argument (N, argc, argv); … … 113 126 } 114 127 128 /* verify merge status of output tables, but do not modify */ 129 VERIFY = FALSE; 130 if ((N = get_argument (*argc, argv, "-verify"))) { 131 VERIFY = TRUE; 132 remove_argument (N, argc, argv); 133 } 134 if ((N = get_argument (*argc, argv, "-check-only"))) { 135 VERIFY = TRUE; 136 remove_argument (N, argc, argv); 137 } 138 115 139 /* replace measurement, don't duplicate */ 116 140 REPLACE_BY_PHOTCODE = FALSE; -
branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomerge.c
r29938 r35594 10 10 if (argc == 6) { 11 11 if (!strcasecmp (argv[2], "and")) { 12 if (VERIFY) { 13 fprintf (stderr, "WARNING / ERROR : dvomerge (input1) and (input2) into (output) : VERIFY mode not implemented\n"); 14 exit (3); 15 } 12 16 dvomergeCreate (argc, argv); 13 17 } else { 18 if (VERIFY) { 19 fprintf (stderr, "WARNING / ERROR : dvomerge (input) into (output) from (list) : VERIFY mode not implemented\n"); 20 exit (3); 21 } 14 22 dvomergeFromList (argc, argv); 15 23 } … … 26 34 } 27 35 28 /* we have two possiblemodes of operation:36 /* we have two major modes of operation: 29 37 30 Create : dvomerge (in1) and (in2) to (out) -- create a new db from two input dbs 31 Update : dvomerge (in) into (out) -- merge a new db into an existing db 32 Continue : dvomerge (in) into (out) continue -- merge a new db into an existing db 38 Create : dvomerge (in1) and (in2) to (out) -- create a new db from two input dbs 39 Update : dvomerge (in) into (out) -- merge a new db into an existing db 33 40 41 we also have varients on Update: 42 Continue : dvomerge (in) into (out) continue -- merge only unmerged tables into the existing db 43 From List : dvomerge (in) into (out) from (list) -- merge only specified tables into the existing db 44 45 neither of the 2 above modes update the image table 34 46 */ -
branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomergeFromList.c
r35454 r35594 108 108 dmhObjectStats *inStats = dmhObjectStatsRead (inputfile); 109 109 110 // XXX : we are not checking for already-merged entries 111 110 112 LoadCatalog (&incatalog, NULL, inputfile, "r", NsecfiltInput); 111 113 -
branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomergeUpdate.c
r33963 r35594 23 23 CONTINUE = TRUE; 24 24 } 25 if (VERIFY) CONTINUE = TRUE; 25 26 26 27 input = argv[1]; … … 78 79 } else { 79 80 dvomergeImagesUpdate (&IDmap, input, output); 81 if (IMAGES_ONLY) exit (0); 80 82 } 81 83 -
branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c
r34405 r35594 76 76 } 77 77 if (!missed) { 78 if (VERBOSE ) fprintf (stderr, "skipping %s, empty oralready merged\n", inlist[0].filename[i]);78 if (VERBOSE || VERIFY) fprintf (stderr, "skipping %s, already merged\n", inlist[0].filename[i]); 79 79 OutputStatusFree (outstat, outlist->Nregions); 80 80 dmhObjectStatsFree (inStats); 81 81 SkyListFree (outlist); 82 continue; 83 } 84 if (VERIFY) { 85 fprintf (stderr, "%s NOT merged\n", inlist[0].filename[i]); 82 86 continue; 83 87 } … … 193 197 char tmpline[DVO_MAX_PATH]; 194 198 if (VERBOSE) { snprintf (tmpline, DVO_MAX_PATH, "%s -v", command); strcpy (command, tmpline); } 199 if (VERIFY) { snprintf (tmpline, DVO_MAX_PATH, "%s -verify", command); strcpy (command, tmpline); } 195 200 if (REPLACE_BY_PHOTCODE) { snprintf (tmpline, DVO_MAX_PATH, "%s -replace", command); strcpy (command, tmpline); } 196 201 -
branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c
r33657 r35594 129 129 output = argv[3]; 130 130 131 fprintf (stderr, "WARNING / ERROR : multi-threaded dvomerge does not handle merge tracking yet\n"); 132 exit (2); 133 131 134 if (ALTERNATE_PHOTCODE_FILE) { 132 135 fprintf (stderr, "cannot specify photcodes when merging into an existing catdir\n"); -
branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/help.c
r35416 r35594 59 59 fprintf (stderr, " optional flags:\n"); 60 60 fprintf (stderr, " -v : verbose mode\n"); 61 fprintf (stderr, " -verify : verify merge status of output tables, but do not modify\n"); 62 fprintf (stderr, " -check-only : verify merge status of output tables, but do not modify [same as -verify]\n"); 61 63 fprintf (stderr, " -help : this list\n"); 62 64 fprintf (stderr, " -h : this list\n\n"); … … 81 83 fprintf (stderr, " optional flags:\n"); 82 84 fprintf (stderr, " -v : verbose mode\n"); 85 fprintf (stderr, " -verify : verify merge status of output tables, but do not modify\n"); 86 fprintf (stderr, " -check-only : verify merge status of output tables, but do not modify [same as -verify]\n"); 83 87 fprintf (stderr, " -help : this list\n"); 84 88 fprintf (stderr, " -h : this list\n\n"); -
branches/eam_branches/ipp-20130509/Ohana/src/dvopsps/include/dvopsps.h
r35207 r35594 13 13 uint64_t ippObjID; 14 14 uint64_t objID; 15 int photcode; 15 16 unsigned int flags; 16 17 float zp; -
branches/eam_branches/ipp-20130509/Ohana/src/dvopsps/src/DetectionOps.c
r35098 r35594 54 54 GET_COLUMN(ippObjID , "ippObjID", int64_t); 55 55 GET_COLUMN(objID , "objID", int64_t); 56 GET_COLUMN(photcode , "photcode", int); 56 57 GET_COLUMN(flags , "flags", int); 57 58 GET_COLUMN(zp , "zp", float); … … 73 74 detections[i].ippObjID = ippObjID[i]; 74 75 detections[i].objID = objID[i]; 76 detections[i].photcode = photcode[i]; 75 77 detections[i].flags = flags[i]; 76 78 detections[i].zp = zp[i]; … … 90 92 free (ippObjID ); 91 93 free (objID ); 94 free (photcode ); 92 95 free (flags ); 93 96 free (zp ); … … 154 157 // gfits_define_bintable_column (&theader, "K", "ippObjID", NULL, NULL, 1.0, BZERO_INT64); 155 158 // gfits_define_bintable_column (&theader, "K", "objID", NULL, NULL, 1.0, BZERO_INT64); 159 gfits_define_bintable_column (&theader, "J", "photcode", NULL, NULL, 1.0, 0.0); 156 160 gfits_define_bintable_column (&theader, "J", "flags", NULL, NULL, 1.0, BZERO_INT32); 157 161 gfits_define_bintable_column (&theader, "E", "zp", NULL, NULL, 1.0, 0.0); … … 173 177 uint64_t *ippObjID ; ALLOCATE (ippObjID , uint64_t, Ndetections); 174 178 uint64_t *objID ; ALLOCATE (objID , uint64_t, Ndetections); 179 int *photcode ; ALLOCATE (photcode , int, Ndetections); 175 180 uint32_t *flags ; ALLOCATE (flags , uint32_t, Ndetections); 176 181 float *zp ; ALLOCATE (zp , float, Ndetections); … … 190 195 ippObjID[i] = detections[i].ippObjID ; 191 196 objID[i] = detections[i].objID ; 197 photcode[i] = detections[i].photcode ; 192 198 flags[i] = detections[i].flags ; 193 199 zp[i] = detections[i].zp ; … … 207 213 gfits_set_bintable_column (&theader, &ftable, "ippObjID", ippObjID , Ndetections); 208 214 gfits_set_bintable_column (&theader, &ftable, "objID", objID , Ndetections); 215 gfits_set_bintable_column (&theader, &ftable, "photcode", photcode , Ndetections); 209 216 gfits_set_bintable_column (&theader, &ftable, "flags", flags , Ndetections); 210 217 gfits_set_bintable_column (&theader, &ftable, "zp", zp , Ndetections); … … 222 229 free (ippObjID ); 223 230 free (objID ); 231 free (photcode ); 224 232 free (flags ); 225 233 free (zp ); -
branches/eam_branches/ipp-20130509/Ohana/src/dvopsps/src/insert_detections_dvopsps_catalog.c
r35416 r35594 49 49 // detections[Ndetections]. ((uint64_t)average->catID << 32) + (uint64_t)average->objID; // ippObjID 50 50 detections[Ndetections].objID = average->extID; // objID 51 detections[Ndetections].photcode = measure->photcode; // photcode 51 52 detections[Ndetections].flags = measure->dbFlags; // flags 52 53 detections[Ndetections].zp = code->C * 0.001 + code->K * (measure->airmass - 1) - measure->Mcal; // zp … … 168 169 } 169 170 170 PrintIOBuffer (buffer, "INSERT INTO dvoDetectionFull (imageID, ippDetectID, detectID, ippObjID, objID, flags, zp, zpErr, airMass, expTime, ra, dec_, raErr, decErr) VALUES \n");171 PrintIOBuffer (buffer, "INSERT INTO dvoDetectionFull (imageID, ippDetectID, detectID, ippObjID, objID, photcode, flags, zp, zpErr, airMass, expTime, ra, dec_, raErr, decErr) VALUES \n"); 171 172 172 173 return TRUE; … … 179 180 int insert_detections_mysql_value (IOBuffer *buffer, Average *average, Measure *measure) { 180 181 181 // XXX I am changing the def of ippObjID if I use the code below182 182 PhotCode *code = GetPhotcodebyCode(measure->photcode); 183 // PrintIOBuffer (buffer, " (%d, %u, %lu, %lu, %lu, %u, %f, %f, %f, %f, %lf, %lf, %f, %f),\n",184 // measure->imageID, // imageID185 // measure->detID, // ippDetectID186 // measure->extID, // detectID187 // ((uint64_t)average->catID * 1000000000) + (uint64_t)average->objID, // ippObjID188 // // NOTE: this is better, but the above is the current ippToPsps value189 // // ((uint64_t)average->catID << 32) + (uint64_t)average->objID, // ippObjID190 // average->extID, // objID191 // measure->dbFlags, // flags192 // code->C * 0.001 + code->K * (measure->airmass - 1) - measure->Mcal, // zp193 // measure->dMcal, // zpErr194 // measure->airmass,195 // pow(10.0, 0.4 * measure->dt), // expTime196 // average->R - measure->dR / 3600., // ra197 // average->D - measure->dR / 3600., // dec198 // measure->dXccd * 0.01 * fabs(measure->pltscale), // estimate of raErr199 // measure->dYccd * 0.01 * fabs(measure->pltscale) // estimate of decErr200 // );201 202 183 PrintIOBuffer (buffer, "(%d, ", measure->imageID); // imageID 203 184 PrintIOBuffer (buffer, "%u, ", measure->detID); // ippDetectID … … 207 188 // ((uint64_t)average->catID << 32) + (uint64_t)average->objID, // ippObjID 208 189 PrintIOBuffer (buffer, "%lu, ", average->extID); // objID 190 PrintIOBuffer (buffer, "%d, ", measure->photcode); // photcode 209 191 PrintIOBuffer (buffer, "%u, ", measure->dbFlags); // flags 210 192 -
branches/eam_branches/ipp-20130509/Ohana/src/libfits/include/gfitsio.h
r35162 r35594 26 26 # define FT_LINE_LENGTH 80 /* FITS header line length */ 27 27 # define FT_RECORD_SIZE 2880 /* FITS block size */ 28 29 # define FT_BZERO_INT16 1.0*0x8000 30 # define FT_BZERO_INT32 1.0*0x80000000 28 31 29 32 /* this structure defines the buffer which contains a header -
branches/eam_branches/ipp-20130509/Ohana/src/libfits/table/F_define_column.c
r33648 r35594 1 1 # include <ohana.h> 2 2 # include <gfitsio.h> 3 4 # if (0) 5 /*** special version of this function to define unsigned int columns (special values for BZERO, BSCALE) ********************/ 6 int gfits_define_bintable_column_unsigned_int (Header *header, char *format, char *label, char *comment, char *unit, int inttype) { 7 8 assert (label); 9 assert (format); 10 11 off_t Naxis1; 12 int Nfields, Nbytes, Nval; 13 char type[16], field[16]; 14 15 if (!gfits_bintable_format (format, type, &Nval, &Nbytes)) return (FALSE); 16 17 Nfields = 0; 18 gfits_scan (header, "TFIELDS", "%d", 1, &Nfields); 19 gfits_scan (header, "NAXIS1", OFF_T_FMT, 1, &Naxis1); 20 Nfields ++; 21 Naxis1 += Nbytes*Nval; 22 23 sprintf (field, "TTYPE%d", Nfields); 24 gfits_modify (header, field, "%s", 1, label); 25 gfits_modify_alt (header, field, "%C", 1, comment); 26 sprintf (field, "TUNIT%d", Nfields); 27 gfits_modify (header, field, "%s", 1, unit); 28 sprintf (field, "TFORM%d", Nfields); 29 gfits_modify (header, field, "%s", 1, format); 30 31 // add scaling parameters unless they amount to a noop 32 if ((bscale != 1.0) || (bzero != 0.0)) { 33 sprintf (field, "TSCAL%d", Nfields); 34 gfits_modify (header, field, "%lf", 1, bscale); 35 sprintf (field, "TZERO%d", Nfields); 36 gfits_modify (header, field, "%lf", 1, bzero); 37 } 38 39 /* update TFIELDS & NAXIS1 */ 40 gfits_modify (header, "TFIELDS", "%d", 1, Nfields); 41 gfits_modify (header, "NAXIS1", OFF_T_FMT, 1, Naxis1); 42 header[0].Naxis[0] = Naxis1; 43 44 return (TRUE); 45 } 46 # endif 3 47 4 48 /***********************/ -
branches/eam_branches/ipp-20130509/Ohana/src/libohana/src
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20130509/Ohana/src/opihi
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20130509/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20130509/Ohana/src/opihi/cmd.data
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20130509/Ohana/src/relastro/src
- Property svn:mergeinfo changed (with no actual effect on merging)
Note:
See TracChangeset
for help on using the changeset viewer.
