Changeset 38346
- Timestamp:
- Jun 1, 2015, 8:10:18 PM (11 years ago)
- Location:
- branches/eam_branches/ohana.20150429/src
- Files:
-
- 58 edited
-
addstar/include/addstar.h (modified) (1 diff)
-
addstar/src/ConfigInit.c (modified) (1 diff)
-
addstar/src/UpdateDatabase_Image.c (modified) (1 diff)
-
addstar/src/UpdateImageIDs.c (modified) (1 diff)
-
addstar/src/addstar.c (modified) (2 diffs)
-
addstar/src/addstar_create_ID.c (modified) (1 diff)
-
addstar/src/dumpskycells.c (modified) (1 diff)
-
addstar/src/findskycell.c (modified) (2 diffs)
-
addstar/src/loadsupercos.c (modified) (1 diff)
-
addstar/src/skycells.c (modified) (1 diff)
-
checkastro/src/checkastro_images.c (modified) (1 diff)
-
delstar/src/delstar.c (modified) (1 diff)
-
dvomerge/src/dvoconvert.c (modified) (2 diffs)
-
dvomerge/src/dvomergeCreate.c (modified) (3 diffs)
-
dvomerge/src/dvomergeImageIDs.c (modified) (4 diffs)
-
dvomerge/src/dvorepairDeleteImagesByExternID.c (modified) (1 diff)
-
dvomerge/src/dvorepairFixImages.c (modified) (1 diff)
-
dvomerge/src/dvoverify_utils.c (modified) (1 diff)
-
fakeastro/src/fakeastro_images.c (modified) (1 diff)
-
fakeastro/src/load_template_images.c (modified) (1 diff)
-
getstar/src/dvoImageExtract.c (modified) (1 diff)
-
getstar/src/dvoImageOverlaps.c (modified) (1 diff)
-
getstar/src/dvoImagesAtCoords.c (modified) (1 diff)
-
imregister/imreg/imregclient.c (modified) (1 diff)
-
imregister/src/detregister.c (modified) (1 diff)
-
imregister/src/detsearch.c (modified) (1 diff)
-
imregister/src/imphotsearch.c (modified) (1 diff)
-
imregister/src/imregister.c (modified) (1 diff)
-
imregister/src/imregtable.c (modified) (1 diff)
-
imregister/src/imsearch.c (modified) (1 diff)
-
imregister/src/imstatreg.c (modified) (1 diff)
-
imregister/src/photreg.c (modified) (1 diff)
-
imregister/src/photsearch.c (modified) (1 diff)
-
imregister/src/spregister.c (modified) (1 diff)
-
imregister/src/spsearch.c (modified) (1 diff)
-
libdvo/include/dvo.h (modified) (7 diffs)
-
libdvo/src/LoadPhotcodesFITS.c (modified) (1 diff)
-
libdvo/src/SavePhotcodesFITS.c (modified) (1 diff)
-
libdvo/src/dvo_catalog.c (modified) (4 diffs)
-
libdvo/src/dvo_catalog_split.c (modified) (3 diffs)
-
libdvo/src/dvo_convert.c (modified) (18 diffs)
-
libdvo/src/dvo_image.c (modified) (1 diff)
-
markstar/src/markstar.c (modified) (1 diff)
-
photdbc/src/Shutdown_dvodist.c (modified) (1 diff)
-
photdbc/src/copy_images.c (modified) (2 diffs)
-
relastro/src/ImageTable.c (modified) (2 diffs)
-
relastro/src/relastro_client.c (modified) (1 diff)
-
relastro/src/relastro_images.c (modified) (1 diff)
-
relastro/src/relastro_parallel_regions.c (modified) (1 diff)
-
relphot/src/ImageTable.c (modified) (2 diffs)
-
relphot/src/relphot_images.c (modified) (1 diff)
-
relphot/src/relphot_parallel_regions.c (modified) (1 diff)
-
uniphot/src/fiximids.c (modified) (1 diff)
-
uniphot/src/fixstkids.c (modified) (1 diff)
-
uniphot/src/setfwhm.c (modified) (1 diff)
-
uniphot/src/setphot.c (modified) (1 diff)
-
uniphot/src/setposangle.c (modified) (1 diff)
-
uniphot/src/uniphot.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/addstar/include/addstar.h
r37807 r38346 84 84 char GSCFILE[256]; 85 85 char *CATDIR; 86 char CATMODE[16]; /* raw, mef, split, mysql */ 87 char CATFORMAT[16]; /* internal, elixir, loneos, panstarrs */ 86 char CATMODE[16]; /* raw, mef, split, mysql */ 87 char CATFORMAT[16]; /* internal, elixir, loneos, panstarrs */ 88 char CATCOMPRESS[16]; /* GZIP_1, NONE */ 88 89 char TWO_MASS_DIR_AS[256]; 89 90 char TWO_MASS_DIR_DR2[256]; -
branches/eam_branches/ohana.20150429/src/addstar/src/ConfigInit.c
r33963 r38346 134 134 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 135 135 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); 136 if (!ScanConfig (config, "CATCOMPRESS", "%s", 0, CATCOMPRESS)) { 137 strcpy (CATCOMPRESS, "NONE"); 138 } 136 139 if (!ScanConfig (config, "SKY_DEPTH", "%d", 0, &SKY_DEPTH)) { 137 140 SKY_DEPTH = SKY_DEPTH_HST; -
branches/eam_branches/ohana.20150429/src/addstar/src/UpdateDatabase_Image.c
r37807 r38346 92 92 /*** update the image table ***/ 93 93 /* setup image table format and lock */ 94 gfits_db_init (&db); 94 95 db.mode = dvo_catalog_catmode (CATMODE); 95 96 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/addstar/src/UpdateImageIDs.c
r37357 r38346 9 9 /*** update the image table ***/ 10 10 /* setup image table format and lock */ 11 gfits_db_init (&db); 11 12 db.mode = dvo_catalog_catmode (CATMODE); 12 13 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/addstar/src/addstar.c
r37807 r38346 104 104 105 105 // set the parameters which guide catalog open/load/create 106 catalog.filename = skylist[0].filename[i]; 107 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 108 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 109 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF | LOAD_LENSING; 110 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 106 catalog.filename = skylist[0].filename[i]; 107 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 108 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 109 catalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data 110 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF | LOAD_LENSING; 111 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 111 112 112 113 // XXX need to do something to enforce consistency. we can change options.update … … 193 194 /*** update the image table ***/ 194 195 /* setup image table format and lock */ 196 gfits_db_init (&db); 195 197 db.mode = dvo_catalog_catmode (CATMODE); 196 198 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/addstar/src/addstar_create_ID.c
r35760 r38346 10 10 /*** update the image table ***/ 11 11 /* setup image table format and lock */ 12 //gfits_db_init (&db);12 gfits_db_init (&db); 13 13 db.mode = dvo_catalog_catmode (CATMODE); 14 14 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/addstar/src/dumpskycells.c
r33719 r38346 46 46 /*** open the image table ***/ 47 47 /* setup image table format and lock */ 48 gfits_db_init (&db); 48 49 db.mode = dvo_catalog_catmode (CATMODE); 49 50 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/addstar/src/findskycell.c
r38344 r38346 173 173 snprintf (imagefile, DVO_MAX_PATH, "%s/Images.dat", catdir); 174 174 175 gfits_db_init (&db); 175 176 status = dvo_image_lock (&db, imagefile, 2.0, LCK_XCLD); 176 177 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); … … 557 558 snprintf (imagefile, DVO_MAX_PATH, "%s/Images.dat", catdir); 558 559 560 gfits_db_init (&db); 559 561 status = dvo_image_lock (&db, imagefile, 2.0, LCK_XCLD); 560 562 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); -
branches/eam_branches/ohana.20150429/src/addstar/src/loadsupercos.c
r33653 r38346 47 47 48 48 // attempt to open the existing images table. if it does not exist, we will save the loaded images 49 gfits_db_init (&db); 49 50 db.mode = dvo_catalog_catmode (CATMODE); 50 51 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/addstar/src/skycells.c
r21048 r38346 12 12 /*** update the image table ***/ 13 13 /* setup image table format and lock */ 14 gfits_db_init (&db); 14 15 db.mode = dvo_catalog_catmode (CATMODE); 15 16 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/checkastro/src/checkastro_images.c
r36833 r38346 11 11 /* register database handle with shutdown procedure */ 12 12 set_db (&db); 13 gfits_db_init (&db); 13 14 14 15 /* lock and load the image db table */ -
branches/eam_branches/ohana.20150429/src/delstar/src/delstar.c
r38344 r38346 12 12 if (!SKIP_IMAGES) { 13 13 set_db (&db); 14 gfits_db_init (&db); 14 15 status = dvo_image_lock (&db, ImageCat, 60.0, LCK_XCLD); /* XCLD */ 15 16 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvoconvert.c
r38344 r38346 122 122 /*** load output/Images.dat ***/ 123 123 sprintf (ImageCat, "%s/Images.dat", output); 124 gfits_db_init (&outDB); 124 125 outDB.mode = dvo_catalog_catmode (CATMODE); 125 126 outDB.format = dvo_catalog_catformat (CATFORMAT); … … 135 136 /*** load input/Images.dat ***/ 136 137 sprintf (ImageCat, "%s/Images.dat", input); 138 gfits_db_init (&inDB); 137 139 // inDB.mode = dvo_catalog_catmode (CATMODE); 138 140 // inDB.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvomergeCreate.c
r37116 r38346 204 204 /*** load output/Images.dat ***/ 205 205 sprintf (ImageCat, "%s/Images.dat", output); 206 gfits_db_init (&outDB); 206 207 outDB.mode = dvo_catalog_catmode (CATMODE); 207 208 outDB.format = dvo_catalog_catformat (CATFORMAT); … … 218 219 /*** load input1/Images.dat ***/ 219 220 sprintf (ImageCat, "%s/Images.dat", input1); 221 gfits_db_init (&in1DB); 220 222 in1DB.mode = dvo_catalog_catmode (CATMODE); 221 223 in1DB.format = dvo_catalog_catformat (CATFORMAT); … … 237 239 /*** load input2/Images.dat ***/ 238 240 sprintf (ImageCat, "%s/Images.dat", input2); 241 gfits_db_init (&in2DB); 239 242 in2DB.mode = dvo_catalog_catmode (CATMODE); 240 243 in2DB.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvomergeImageIDs.c
r36833 r38346 10 10 /*** load input1/Images.dat ***/ 11 11 sprintf (ImageCat, "%s/Images.dat", input); 12 gfits_db_init (&inDB); 12 13 inDB.mode = dvo_catalog_catmode (CATMODE); 13 14 inDB.format = dvo_catalog_catformat (CATFORMAT); 14 status = dvo_image_lock (&inDB, ImageCat, 3600.0, LCK_SOFT); // shorter timeout?15 status = dvo_image_lock (&inDB, ImageCat, 3600.0, LCK_SOFT); // shorter timeout? 15 16 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", inDB.filename); 16 17 … … 37 38 /*** load output/Images.dat ***/ 38 39 sprintf (ImageCat, "%s/Images.dat", output); 40 gfits_db_init (&outDB); 39 41 outDB.mode = dvo_catalog_catmode (CATMODE); 40 42 outDB.format = dvo_catalog_catformat (CATFORMAT); … … 93 95 /*** load input1/Images.dat ***/ 94 96 sprintf (ImageCat, "%s/Images.dat", input); 97 gfits_db_init (&inDB); 95 98 inDB.mode = dvo_catalog_catmode (CATMODE); 96 99 inDB.format = dvo_catalog_catformat (CATFORMAT); 97 status = dvo_image_lock (&inDB, ImageCat, 5400.0, LCK_XCLD); // shorter timeout?100 status = dvo_image_lock (&inDB, ImageCat, 5400.0, LCK_XCLD); // shorter timeout? 98 101 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", inDB.filename); 99 102 … … 115 118 /*** load output/Images.dat ***/ 116 119 sprintf (ImageCat, "%s/Images.dat", output); 120 gfits_db_init (&outDB); 117 121 outDB.mode = dvo_catalog_catmode (CATMODE); 118 122 outDB.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvorepairDeleteImagesByExternID.c
r38345 r38346 493 493 494 494 /* setup image table format and lock */ 495 gfits_db_init (&db); 495 496 db.mode = dvo_catalog_catmode ("SPLIT"); 496 497 db.format = dvo_catalog_catformat ("PS1_V5"); -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvorepairFixImages.c
r38344 r38346 255 255 256 256 /* setup image table format and lock */ 257 gfits_db_init (oldDB); 257 258 db.mode = oldDB->mode; 258 259 db.format = oldDB->format; -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvoverify_utils.c
r38344 r38346 467 467 468 468 // load the iage database table 469 gfits_db_init (&inDB); 469 470 status = dvo_image_lock (&inDB, ImageCat, 3600.0, LCK_SOFT); // shorter timeout? 470 471 if (!status) { -
branches/eam_branches/ohana.20150429/src/fakeastro/src/fakeastro_images.c
r37807 r38346 67 67 68 68 /* setup image table format and lock */ 69 gfits_db_init (db); 69 70 db->mode = dvo_catalog_catmode (CATMODE); 70 71 db->format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/fakeastro/src/load_template_images.c
r38344 r38346 5 5 FITS_DB db; 6 6 7 gfits_db_init (&db); 7 8 db.mode = dvo_catalog_catmode (CATMODE); 8 9 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/getstar/src/dvoImageExtract.c
r38344 r38346 14 14 /*** update the image table ***/ 15 15 /* setup image table format and lock */ 16 gfits_db_init (&db); 16 17 db.mode = dvo_catalog_catmode (CATMODE); 17 18 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/getstar/src/dvoImageOverlaps.c
r38344 r38346 17 17 /*** update the image table ***/ 18 18 /* setup image table format and lock */ 19 gfits_db_init (&db); 19 20 db.mode = dvo_catalog_catmode (CATMODE); 20 21 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/getstar/src/dvoImagesAtCoords.c
r38344 r38346 43 43 /*** update the image table ***/ 44 44 /* setup image table format and lock */ 45 gfits_db_init (&db); 45 46 db.mode = dvo_catalog_catmode (CATMODE); 46 47 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/imregister/imreg/imregclient.c
r38345 r38346 66 66 if (NoReg) dump_data (image, Nentry); 67 67 68 gfits_db_init (&db); 68 69 db.lockstate = LCK_HARD; 69 70 db.timeout = 300.0; 70 gfits_db_init (&db);71 71 72 72 if (!gfits_db_lock (&db, TempDB)) { -
branches/eam_branches/ohana.20150429/src/imregister/src/detregister.c
r38345 r38346 17 17 SaveEntry (argv[1], &newdata, descriptor.imageID); 18 18 19 gfits_db_init (&db); 19 20 db.lockstate = LCK_HARD; 20 21 db.timeout = 300.0; 21 gfits_db_init (&db);22 22 23 23 dBFile = set_dBFile (); -
branches/eam_branches/ohana.20150429/src/imregister/src/detsearch.c
r38344 r38346 17 17 if (output.Criteria) PrintCriteria (); 18 18 19 gfits_db_init (&db); 19 20 db.lockstate = (output.Modify || output.Delete) ? LCK_HARD : LCK_SOFT; 20 21 db.timeout = 300.0; 21 gfits_db_init (&db);22 22 23 23 dBFile = set_dBFile (); -
branches/eam_branches/ohana.20150429/src/imregister/src/imphotsearch.c
r38344 r38346 14 14 args (argc, argv); 15 15 16 gfits_db_init (&db); 16 17 db.lockstate = (options.modify) ? LCK_HARD : LCK_SOFT; 17 18 db.timeout = 300.0; 18 gfits_db_init (&db);19 19 20 20 /* don't create a new image table if not available */ -
branches/eam_branches/ohana.20150429/src/imregister/src/imregister.c
r38345 r38346 17 17 if (NoReg) goto skip_reg; 18 18 19 gfits_db_init (&db); 19 20 db.lockstate = LCK_HARD; 20 21 db.timeout = 300.0; 21 gfits_db_init (&db);22 22 23 23 if (!gfits_db_lock (&db, ImageDB)) { -
branches/eam_branches/ohana.20150429/src/imregister/src/imregtable.c
r38345 r38346 40 40 41 41 /* load database table */ 42 gfits_db_init (&db); 42 43 db.lockstate = LCK_HARD; 43 44 db.timeout = 300.0; 44 gfits_db_init (&db);45 45 46 46 if (!gfits_db_lock (&db, ImageDB)) { -
branches/eam_branches/ohana.20150429/src/imregister/src/imsearch.c
r38344 r38346 12 12 args (argc, argv); 13 13 14 gfits_db_init (&db); 14 15 db.lockstate = (output.modify || output.delete) ? LCK_HARD : LCK_SOFT; 15 16 db.timeout = 300.0; 16 gfits_db_init (&db);17 17 18 18 if (!gfits_db_lock (&db, ImageDB)) { -
branches/eam_branches/ohana.20150429/src/imregister/src/imstatreg.c
r38344 r38346 40 40 } 41 41 42 gfits_db_init (&image_db); 42 43 image_db.lockstate = LCK_HARD; 43 44 image_db.timeout = 300.0; 44 gfits_db_init (&image_db);45 45 46 46 temp_db.lockstate = LCK_HARD; -
branches/eam_branches/ohana.20150429/src/imregister/src/photreg.c
r38345 r38346 12 12 regargs (argc, argv, &newdata); 13 13 14 gfits_db_init (&db); 14 15 db.lockstate = LCK_HARD; 15 16 db.timeout = 300.0; 16 gfits_db_init (&db);17 17 18 18 filename = PhotDB; -
branches/eam_branches/ohana.20150429/src/imregister/src/photsearch.c
r38344 r38346 15 15 args (argc, argv); 16 16 17 gfits_db_init (&db); 17 18 db.lockstate = (output.modify || output.delete) ? LCK_HARD : LCK_SOFT; 18 19 db.timeout = 300.0; 19 gfits_db_init (&db);20 20 21 21 if (!strcmp (output.db, "phot")) { -
branches/eam_branches/ohana.20150429/src/imregister/src/spregister.c
r38345 r38346 17 17 if (NoReg) exit (0); 18 18 19 gfits_db_init (&db); 19 20 db.lockstate = LCK_HARD; 20 21 db.timeout = 300.0; 21 gfits_db_init (&db);22 22 23 23 if (!gfits_db_lock (&db, SpectrumDB)) { -
branches/eam_branches/ohana.20150429/src/imregister/src/spsearch.c
r38344 r38346 12 12 args (argc, argv); 13 13 14 gfits_db_init (&db); 14 15 db.lockstate = (output.modify || output.delete) ? LCK_HARD : LCK_SOFT; 15 16 db.timeout = 300.0; 16 gfits_db_init (&db);17 17 18 18 if (!gfits_db_lock (&db, SpectrumDB)) { -
branches/eam_branches/ohana.20150429/src/libdvo/include/dvo.h
r38345 r38346 10 10 11 11 /* DVO table modes */ 12 typedef enum {DVO_MODE_UNDEF, DVO_MODE_RAW, DVO_MODE_MEF, DVO_MODE_SPLIT, DVO_MODE_MYSQL} DVOTableMode; 12 typedef enum {DVO_MODE_UNDEF = 0, DVO_MODE_RAW, DVO_MODE_MEF, DVO_MODE_SPLIT, DVO_MODE_MYSQL} DVOCatMode; 13 14 /* DVO table modes */ 15 typedef enum {DVO_COMPRESS_NONE = 0, DVO_COMPRESS_GZIP_1} DVOCatCompress; // 13 16 14 17 /* DVO table formats */ 15 18 typedef enum { 16 DVO_FORMAT_UNDEF ,19 DVO_FORMAT_UNDEF = 0, 17 20 DVO_FORMAT_INTERNAL, 18 21 DVO_FORMAT_ELIXIR, … … 30 33 DVO_FORMAT_PS1_V4, 31 34 DVO_FORMAT_PS1_V5, 32 } DVOTableFormat; 33 34 /* image data modes in RegImage */ 35 typedef enum {T_UNDEF = -1, T_NONE, T_OBJECT, T_DARK, T_BIAS, T_FLAT, T_MASK, T_FRINGE, T_SCATTER, T_MODES, T_FRINGEPTS, T_ANY, N_TYPE} ElixirDetrendTypes; 36 typedef enum {M_UNDEF = -1, M_NONE, M_MEF, M_SPLIT, M_SINGLE, M_CUBE, M_SLICE, M_MODES, N_MODE} ElixirDetrendModes; 35 } DVOCatFormat; 37 36 38 37 typedef enum {DVO_CAT_OPEN_FAIL, DVO_CAT_OPEN_OK, DVO_CAT_OPEN_EMPTY} DVOCatalogOpenModes; 39 40 // these are used as NAN for types of int values41 typedef enum {42 NAN_S_CHAR = 0x7f,43 NAN_U_CHAR = 0xff, // was NO_ERR44 NAN_S_SHORT = 0x7fff, // was NO_MAG45 NAN_U_SHORT = 0xffff,46 NAN_S_INT = 0x7fffffff,47 NAN_U_INT = (signed int) 0xffffffff,48 } DVO_INT_NAN;49 50 // max path length51 # define DVO_MAX_PATH 102452 53 /* RegImage.flag values */54 # define IMREG_DIST 0x01 /* image distributed, only imregister-3.0 */55 38 56 39 /* catalog values to be loaded */ … … 74 57 SKIP_GALSHAPE = 0x8000, 75 58 } DVOCatFlags; 59 60 /* image data modes in RegImage */ 61 typedef enum {T_UNDEF = -1, T_NONE, T_OBJECT, T_DARK, T_BIAS, T_FLAT, T_MASK, T_FRINGE, T_SCATTER, T_MODES, T_FRINGEPTS, T_ANY, N_TYPE} ElixirDetrendTypes; 62 typedef enum {M_UNDEF = -1, M_NONE, M_MEF, M_SPLIT, M_SINGLE, M_CUBE, M_SLICE, M_MODES, N_MODE} ElixirDetrendModes; 63 64 // these are used as NAN for types of int values 65 typedef enum { 66 NAN_S_CHAR = 0x7f, 67 NAN_U_CHAR = 0xff, // was NO_ERR 68 NAN_S_SHORT = 0x7fff, // was NO_MAG 69 NAN_U_SHORT = 0xffff, 70 NAN_S_INT = 0x7fffffff, 71 NAN_U_INT = (signed int) 0xffffffff, 72 } DVO_INT_NAN; 73 74 // max path length 75 # define DVO_MAX_PATH 1024 76 77 /* RegImage.flag values */ 78 # define IMREG_DIST 0x01 /* image distributed, only imregister-3.0 */ 76 79 77 80 /* photometry code types */ … … 228 231 char lockstate; 229 232 char mode; /* what data storage mode is used for disk file? */ 230 char format;/* what data format is used for disk file? */233 DVOCatFormat format; /* what data format is used for disk file? */ 231 234 char virtual; /* is table in ftable or vtable? */ 232 235 char nativeOrder; /* is table in internal byte-order? */ … … 786 789 /* extra catalog information */ 787 790 char lockmode; 788 char catmode; /* storage mode (raw, mef, split, mysql) */ 789 char catformat; /* storage format (elixir, panstarrs, etc) */ 791 DVOCatMode catmode; /* storage mode (raw, mef, split, mysql) */ 792 DVOCatFormat catformat; /* storage format (elixir, panstarrs, etc) */ 793 DVOCatCompress catcompress; // output compress mode 794 DVOCatFlags catflags; /* choices to be loaded */ 795 790 796 int sorted; /* is measure table average-sorted? (NOTE this is an int only because gfits_scan %t requires it) */ 791 char compressOutput; 792 793 DVOCatFlags catflags; /* choices to be loaded */ 797 794 798 795 799 /* pointers for data manipulation */ … … 938 942 int dvo_catalog_save_complete (Catalog *catalog, char VERBOSE); 939 943 int dvo_catalog_update (Catalog *catalog, char VERBOSE); 940 int dvo_catalog_catformat (char *catformat); 941 int dvo_catalog_catmode (char *catmode); 944 DVOCatFormat dvo_catalog_catformat (char *catformat); 945 DVOCatMode dvo_catalog_catmode (char *catmode); 946 DVOCatCompress dvo_catalog_catcompress (char *catcompress); 947 char *dvo_catalog_compress_string (DVOCatCompress catcompress); 942 948 void dvo_catalog_test (Catalog *catalog, int halt); 943 949 … … 966 972 int WriteRawSecFilt (FILE *f, SecFilt *secfilt, off_t Nsecfilt, char format); 967 973 968 DVO TableFormat FtableGetFormat (FTable *ftable);969 970 Average *FtableToAverage (FTable *ftable, off_t *Naverage, char *format, SecFilt **primary, char nativeBytes);971 Measure *FtableToMeasure (FTable *ftable, Average *average, off_t *Nmeasure, char *format);972 SecFilt *FtableToSecFilt (FTable *ftable, off_t *Nsecfilt, char*format);973 Lensing *FtableToLensing (FTable *ftable, off_t *Nlensing, char*format);974 Lensobj *FtableToLensobj (FTable *ftable, off_t *Nlensobj, char*format);975 StarPar *FtableToStarPar (FTable *ftable, off_t *Nstarpar, char*format);976 GalShape *FtableToGalShape (FTable *ftable, off_t *Ngalshape, char*format);977 978 int FtableToImage (FTable *ftable, Header *theader, char*format);979 980 int AverageToFtable (FTable *ftable, Average *average, off_t Naverage, char format, SecFilt *primary, int swapFromNative);981 int MeasureToFtable (FTable *ftable, Average *average, Measure *measure, off_t Nmeasure, char format);982 int SecFiltToFtable (FTable *ftable, SecFilt *secfilt, off_t Nsecfilt, charformat);983 int LensingToFtable (FTable *ftable, Lensing *lensing, off_t Nlensing, charformat);984 int LensobjToFtable (FTable *ftable, Lensobj *lensobj, off_t Nlensobj, charformat);985 int StarParToFtable (FTable *ftable, StarPar *starpar, off_t Nstarpar, charformat);986 int GalShapeToFtable (FTable *ftable, GalShape *galshape, off_t Ngalshape, charformat);987 988 int ImageToFtable (FTable *ftable, Header *theader, charformat);989 int ImageToVtable (VTable *vtable, Header *theader, charformat);974 DVOCatFormat FtableGetFormat (FTable *ftable); 975 976 Measure *FtableToMeasure (FTable *ftable, Average *average, off_t *Nmeasure, DVOCatFormat *format); 977 Average *FtableToAverage (FTable *ftable, off_t *Naverage, DVOCatFormat *format, SecFilt **primary, char nativeBytes); 978 SecFilt *FtableToSecFilt (FTable *ftable, off_t *Nsecfilt, DVOCatFormat *format); 979 Lensing *FtableToLensing (FTable *ftable, off_t *Nlensing, DVOCatFormat *format); 980 Lensobj *FtableToLensobj (FTable *ftable, off_t *Nlensobj, DVOCatFormat *format); 981 StarPar *FtableToStarPar (FTable *ftable, off_t *Nstarpar, DVOCatFormat *format); 982 GalShape *FtableToGalShape (FTable *ftable, off_t *Ngalshape, DVOCatFormat *format); 983 984 int FtableToImage (FTable *ftable, Header *theader, DVOCatFormat *format); 985 986 int MeasureToFtable (FTable *ftable, Average *average, Measure *measure, off_t Nmeasure, DVOCatFormat format); 987 int AverageToFtable (FTable *ftable, Average *average, off_t Naverage, DVOCatFormat format, SecFilt *primary, int swapFromNative); 988 int SecFiltToFtable (FTable *ftable, SecFilt *secfilt, off_t Nsecfilt, DVOCatFormat format); 989 int LensingToFtable (FTable *ftable, Lensing *lensing, off_t Nlensing, DVOCatFormat format); 990 int LensobjToFtable (FTable *ftable, Lensobj *lensobj, off_t Nlensobj, DVOCatFormat format); 991 int StarParToFtable (FTable *ftable, StarPar *starpar, off_t Nstarpar, DVOCatFormat format); 992 int GalShapeToFtable (FTable *ftable, GalShape *galshape, off_t Ngalshape, DVOCatFormat format); 993 994 int ImageToFtable (FTable *ftable, Header *theader, DVOCatFormat format); 995 int ImageToVtable (VTable *vtable, Header *theader, DVOCatFormat format); 990 996 991 997 # include "loneos_defs.h" -
branches/eam_branches/ohana.20150429/src/libdvo/src/LoadPhotcodesFITS.c
r38344 r38346 15 15 16 16 /* XXX choose more sensible lock timeouts! */ 17 gfits_db_init (&db); 17 18 db.timeout = 60.0; 18 19 db.lockstate = LCK_SOFT; 19 gfits_db_init (&db);20 20 21 21 /* does this mean the db is empty, non-existent, or has access errors? */ -
branches/eam_branches/ohana.20150429/src/libdvo/src/SavePhotcodesFITS.c
r38345 r38346 17 17 18 18 /* XXX choose more sensible lock timeouts! */ 19 gfits_db_init (&db); 19 20 db.lockstate = LCK_XCLD; 20 21 db.timeout = 10.0; 21 gfits_db_init (&db);22 22 23 23 /* does this mean the db is empty, non-existent, or has access errors? */ -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_catalog.c
r38331 r38346 42 42 } 43 43 44 int dvo_catalog_catformat (char *catformat) {44 DVOCatFormat dvo_catalog_catformat (char *catformat) { 45 45 46 46 /* set the specified CATFORMAT */ … … 62 62 } 63 63 64 intdvo_catalog_catmode (char *catmode) {64 DVOCatMode dvo_catalog_catmode (char *catmode) { 65 65 66 66 /* set the specified CATMODE */ … … 69 69 if (!strcasecmp (catmode, "SPLIT")) return (DVO_MODE_SPLIT); 70 70 return (DVO_MODE_UNDEF); 71 } 72 73 DVOCatCompress dvo_catalog_catcompress (char *catcompress) { 74 75 /* set the specified CATMODE */ 76 if (!strcasecmp (catcompress, "NONE")) return (DVO_COMPRESS_NONE); 77 if (!strcasecmp (catcompress, "GZIP_1")) return (DVO_COMPRESS_GZIP_1); 78 return (DVO_COMPRESS_NONE); 79 } 80 81 // we can return a static string here unless we run multiple outputs threads at once 82 static char compress_string[16]; 83 char *dvo_catalog_compress_string (DVOCatCompress catcompress) { 84 85 switch (catcompress) { 86 case DVO_COMPRESS_NONE: 87 strcpy (compress_string, "NONE"); 88 break; 89 case DVO_COMPRESS_GZIP_1: 90 strcpy (compress_string, "GZIP_1"); 91 break; 92 default: 93 myAbort ("error in compress option"); 94 } 95 return compress_string; 71 96 } 72 97 … … 498 523 catalog[0].filename = NULL; 499 524 500 catalog[0].lockmode = 0; 501 catalog[0].catmode = 0; 502 catalog[0].catformat = 0; 503 catalog[0].catflags = 0; 504 catalog[0].Nsecfilt = 0; 525 catalog[0].lockmode = 0; 526 catalog[0].catmode = DVO_MODE_UNDEF; 527 catalog[0].catformat = DVO_FORMAT_UNDEF; 528 catalog[0].catcompress = DVO_COMPRESS_NONE; 529 catalog[0].catflags = LOAD_NONE; 530 catalog[0].Nsecfilt = 0; 505 531 } 506 532 -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_catalog_split.c
r38345 r38346 154 154 FTable cmptable; 155 155 Header cmpheader; 156 cmptable.header = &cmpheader;157 156 gfits_init_header (&cmpheader); 158 157 gfits_init_table (&cmptable); 158 cmptable.header = &cmpheader; 159 159 160 160 int fullWrite = (start == 0) && (Nrows == Ntotal); 161 161 162 if (fullWrite && catalog->compressOutput) { 163 if (!gfits_compress_table (ftable, &cmptable, 10, "GZIP_1")) { 162 if (fullWrite && catalog->catcompress) { 163 char *compressMode = dvo_catalog_compress_string (catalog->catcompress); 164 if (!gfits_compress_table (ftable, &cmptable, 10, compressMode)) { 164 165 fprintf (stderr, "compression failure\n"); 165 166 return (FALSE); … … 355 356 outtable = &rawtable; 356 357 nativeOrder = TRUE; 358 catalog->catcompress = DVO_COMPRESS_GZIP_1; // if any table is compressed, set all to a compress state? 357 359 } 358 360 // NOTE: fread_ftable returns an unswapped table; uncompress swaps the bytes into native order … … 1004 1006 int swapFromNative = TRUE; 1005 1007 int fullWrite = (start == 0) && (Nrows == Naves_disk_new); 1006 if (fullWrite && catalog->c ompressOutput) {1008 if (fullWrite && catalog->catcompress) { 1007 1009 swapFromNative = FALSE; 1008 1010 } -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_convert.c
r38345 r38346 11 11 constructions below **/ 12 12 13 DVO TableFormat FtableGetFormat (FTable *ftable) {14 15 DVO TableFormat format;13 DVOCatFormat FtableGetFormat (FTable *ftable) { 14 15 DVOCatFormat format; 16 16 char extname[80]; 17 17 … … 52 52 /*** Average / FTable conversion functions ***/ 53 53 54 Average *FtableToAverage (FTable *ftable, off_t *Naverage, char*format, SecFilt **primary, char nativeBytes) {54 Average *FtableToAverage (FTable *ftable, off_t *Naverage, DVOCatFormat *format, SecFilt **primary, char nativeBytes) { 55 55 56 56 Average *average; … … 139 139 } 140 140 141 int AverageToFtable (FTable *ftable, Average *average, off_t Naverage, charformat, SecFilt *primary, int swapFromNative) {141 int AverageToFtable (FTable *ftable, Average *average, off_t Naverage, DVOCatFormat format, SecFilt *primary, int swapFromNative) { 142 142 143 143 # define FORMAT_CASE(FORMAT, TYPE) \ … … 180 180 181 181 // FtableToMeasure needs the Average since old formats stored measure.dR,dD only 182 Measure *FtableToMeasure (FTable *ftable, Average *average, off_t *Nmeasure, char*format) {182 Measure *FtableToMeasure (FTable *ftable, Average *average, off_t *Nmeasure, DVOCatFormat *format) { 183 183 184 184 Measure *measure; … … 269 269 270 270 // MeasureToFtable needs the Average since old formats stored measure.dR,dD only 271 int MeasureToFtable (FTable *ftable, Average *average, Measure *measure, off_t Nmeasure, charformat) {271 int MeasureToFtable (FTable *ftable, Average *average, Measure *measure, off_t Nmeasure, DVOCatFormat format) { 272 272 273 273 # define FORMAT_CASE(FORMAT, TYPE, ABS_COORDS) \ … … 310 310 /*** SecFilt / FTable conversion functions ***/ 311 311 312 SecFilt *FtableToSecFilt (FTable *ftable, off_t *Nsecfilt, char*format) {312 SecFilt *FtableToSecFilt (FTable *ftable, off_t *Nsecfilt, DVOCatFormat *format) { 313 313 314 314 SecFilt *secfilt; … … 380 380 } 381 381 382 int SecFiltToFtable (FTable *ftable, SecFilt *secfilt, off_t Nsecfilt, charformat) {382 int SecFiltToFtable (FTable *ftable, SecFilt *secfilt, off_t Nsecfilt, DVOCatFormat format) { 383 383 384 384 # define FORMAT_CASE(FORMAT, TYPE) \ … … 420 420 /*** Lensing / FTable conversion functions ***/ 421 421 422 Lensing *FtableToLensing (FTable *ftable, off_t *Nlensing, char*format) {422 Lensing *FtableToLensing (FTable *ftable, off_t *Nlensing, DVOCatFormat *format) { 423 423 424 424 Lensing *lensing; … … 520 520 521 521 // LensingToFtable needs the Average since old formats stored lensing.dR,dD only 522 int LensingToFtable (FTable *ftable, Lensing *lensing, off_t Nlensing, charformat) {522 int LensingToFtable (FTable *ftable, Lensing *lensing, off_t Nlensing, DVOCatFormat format) { 523 523 524 524 # define FORMAT_CASE(FORMAT, TYPE) \ … … 559 559 /*** Lensobj / FTable conversion functions ***/ 560 560 561 Lensobj *FtableToLensobj (FTable *ftable, off_t *Nlensobj, char*format) {561 Lensobj *FtableToLensobj (FTable *ftable, off_t *Nlensobj, DVOCatFormat *format) { 562 562 563 563 Lensobj *lensobj; … … 635 635 636 636 // LensobjToFtable needs the Average since old formats stored lensobj.dR,dD only 637 int LensobjToFtable (FTable *ftable, Lensobj *lensobj, off_t Nlensobj, charformat) {637 int LensobjToFtable (FTable *ftable, Lensobj *lensobj, off_t Nlensobj, DVOCatFormat format) { 638 638 639 639 # define FORMAT_CASE(FORMAT, TYPE) \ … … 674 674 /*** StarPar / FTable conversion functions ***/ 675 675 676 StarPar *FtableToStarPar (FTable *ftable, off_t *Nstarpar, char*format) {676 StarPar *FtableToStarPar (FTable *ftable, off_t *Nstarpar, DVOCatFormat *format) { 677 677 678 678 StarPar *starpar; … … 738 738 739 739 // StarParToFtable needs the Average since old formats stored starpar.dR,dD only 740 int StarParToFtable (FTable *ftable, StarPar *starpar, off_t Nstarpar, charformat) {740 int StarParToFtable (FTable *ftable, StarPar *starpar, off_t Nstarpar, DVOCatFormat format) { 741 741 742 742 # define FORMAT_CASE(FORMAT, TYPE) \ … … 778 778 /*** GalShape / FTable conversion functions ***/ 779 779 780 GalShape *FtableToGalShape (FTable *ftable, off_t *Ngalshape, char*format) {780 GalShape *FtableToGalShape (FTable *ftable, off_t *Ngalshape, DVOCatFormat *format) { 781 781 782 782 GalShape *galshape; … … 842 842 843 843 // GalShapeToFtable needs the Average since old formats stored galshape.dR,dD only 844 int GalShapeToFtable (FTable *ftable, GalShape *galshape, off_t Ngalshape, charformat) {844 int GalShapeToFtable (FTable *ftable, GalShape *galshape, off_t Ngalshape, DVOCatFormat format) { 845 845 846 846 # define FORMAT_CASE(FORMAT, TYPE) \ … … 883 883 // I have loaded the disk db table and now I want to convert to the internal format 884 884 // (Image structure), but I onyl 885 int FtableToImage (FTable *ftable, Header *theader, char*format) {885 int FtableToImage (FTable *ftable, Header *theader, DVOCatFormat *format) { 886 886 887 887 off_t Nimage; … … 952 952 } 953 953 954 int ImageToFtable (FTable *ftable, Header *theader, charformat) {954 int ImageToFtable (FTable *ftable, Header *theader, DVOCatFormat format) { 955 955 956 956 off_t Nimage; … … 992 992 } 993 993 994 int ImageToVtable (VTable *vtable, Header *theader, charformat) {994 int ImageToVtable (VTable *vtable, Header *theader, DVOCatFormat format) { 995 995 996 996 off_t i, Nrow, Nimage; -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_image.c
r38344 r38346 19 19 db[0].lockstate = lockstate; 20 20 db[0].timeout = timeout; 21 gfits_db_init (db);22 21 23 22 if (!gfits_db_lock (db, filename)) { -
branches/eam_branches/ohana.20150429/src/markstar/src/markstar.c
r15743 r38346 37 37 38 38 set_db (&db); 39 gfits_db_init (&db); 39 40 dvo_image_lock (&db, ImageCat, 3600.0, LCK_XCLD); 40 41 -
branches/eam_branches/ohana.20150429/src/photdbc/src/Shutdown_dvodist.c
r33655 r38346 11 11 12 12 // lock the image db table 13 gfits_db_init (&db); 13 14 int status = dvo_image_lock (&db, ImageCat, 60.0, LCK_XCLD); 14 15 if (!status) { -
branches/eam_branches/ohana.20150429/src/photdbc/src/copy_images.c
r38344 r38346 19 19 if (status == -1) Shutdown ("ERROR: CATDIR %s does not exist, no data in database", path); 20 20 21 gfits_db_init (&in); 21 22 status = dvo_image_lock (&in, ImageCat, 60.0, LCK_SOFT); 22 23 if (!status) { … … 38 39 39 40 // lock the output catalog 41 gfits_db_init (&out); 40 42 status = dvo_image_lock (&out, ImageOut, 60.0, LCK_XCLD); 41 43 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", ImageOut); -
branches/eam_branches/ohana.20150429/src/relastro/src/ImageTable.c
r38344 r38346 7 7 FITS_DB db; 8 8 9 gfits_db_init (&db); 9 10 db.mode = dvo_catalog_catmode (CATMODE); 10 11 db.format = dvo_catalog_catformat (CATFORMAT); … … 42 43 43 44 // setup image table format and lock 45 gfits_db_init (&db); 44 46 db.mode = dvo_catalog_catmode (CATMODE); 45 47 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/relastro/src/relastro_client.c
r37807 r38346 69 69 70 70 set_db (&db); 71 gfits_db_init (&db); 71 72 72 73 /* lock and load the image db table */ -
branches/eam_branches/ohana.20150429/src/relastro/src/relastro_images.c
r37807 r38346 11 11 /* register database handle with shutdown procedure */ 12 12 set_db (&db); 13 gfits_db_init (&db); 13 14 14 15 /* lock and load the image db table */ -
branches/eam_branches/ohana.20150429/src/relastro/src/relastro_parallel_regions.c
r37807 r38346 17 17 // register database handle with shutdown procedure 18 18 set_db (&db); 19 gfits_db_init (&db); 19 20 db.mode = dvo_catalog_catmode (CATMODE); 20 21 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/relphot/src/ImageTable.c
r38344 r38346 7 7 FITS_DB db; 8 8 9 gfits_db_init (&db); 9 10 db.mode = dvo_catalog_catmode (CATMODE); 10 11 db.format = dvo_catalog_catformat (CATFORMAT); … … 45 46 46 47 // setup image table format and lock 48 gfits_db_init (&db); 47 49 db.mode = dvo_catalog_catmode (CATMODE); 48 50 db.format = dvo_catalog_catformat (CATFORMAT); 51 49 52 status = dvo_image_lock (&db, filename, 60.0, LCK_XCLD); // shorter timeout? 50 53 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); -
branches/eam_branches/ohana.20150429/src/relphot/src/relphot_images.c
r38344 r38346 18 18 /* register database handle with shutdown procedure */ 19 19 set_db (&db); 20 gfits_db_init (&db); 20 21 db.mode = dvo_catalog_catmode (CATMODE); 21 22 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/relphot/src/relphot_parallel_regions.c
r37807 r38346 23 23 // register database handle with shutdown procedure 24 24 set_db (&db); 25 gfits_db_init (&db); 25 26 db.mode = dvo_catalog_catmode (CATMODE); 26 27 db.format = dvo_catalog_catformat (CATFORMAT); -
branches/eam_branches/ohana.20150429/src/uniphot/src/fiximids.c
r35764 r38346 11 11 12 12 set_db (&db); 13 gfits_db_init (&db); 13 14 status = dvo_image_lock (&db, ImageCat, 60.0, (UPDATE ? LCK_XCLD : LCK_SOFT)); 14 15 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); -
branches/eam_branches/ohana.20150429/src/uniphot/src/fixstkids.c
r35764 r38346 11 11 12 12 set_db (&db); 13 gfits_db_init (&db); 13 14 status = dvo_image_lock (&db, ImageCat, 60.0, (UPDATE ? LCK_XCLD : LCK_SOFT)); 14 15 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); -
branches/eam_branches/ohana.20150429/src/uniphot/src/setfwhm.c
r33654 r38346 13 13 14 14 set_db (&db); 15 gfits_db_init (&db); 15 16 status = dvo_image_lock (&db, ImageCat, 60.0, (UPDATE ? LCK_XCLD : LCK_SOFT)); 16 17 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); -
branches/eam_branches/ohana.20150429/src/uniphot/src/setphot.c
r33963 r38346 14 14 15 15 set_db (&db); 16 gfits_db_init (&db); 16 17 status = dvo_image_lock (&db, ImageCat, 60.0, (UPDATE ? LCK_XCLD : LCK_SOFT)); 17 18 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); -
branches/eam_branches/ohana.20150429/src/uniphot/src/setposangle.c
r34749 r38346 11 11 12 12 set_db (&db); 13 gfits_db_init (&db); 13 14 status = dvo_image_lock (&db, ImageCat, 60.0, (UPDATE ? LCK_XCLD : LCK_SOFT)); 14 15 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); -
branches/eam_branches/ohana.20150429/src/uniphot/src/uniphot.c
r33654 r38346 19 19 20 20 set_db (&db); 21 gfits_db_init (&db); 21 22 status = dvo_image_lock (&db, ImageCat, 60.0, (UPDATE ? LCK_XCLD : LCK_SOFT)); 22 23 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename);
Note:
See TracChangeset
for help on using the changeset viewer.
