Changeset 38344
- Timestamp:
- Jun 1, 2015, 8:56:11 AM (11 years ago)
- Location:
- branches/eam_branches/ohana.20150429/src
- Files:
-
- 66 edited
-
addstar/src/ReadStarsFITS.c (modified) (11 diffs)
-
addstar/src/findskycell.c (modified) (2 diffs)
-
addstar/src/skycells_to_mdc.c (modified) (1 diff)
-
checkastro/src/load_images.c (modified) (1 diff)
-
delstar/src/delete_duplicate_images.c (modified) (1 diff)
-
delstar/src/delete_image_photcodes.c (modified) (1 diff)
-
delstar/src/delete_imagename.c (modified) (1 diff)
-
delstar/src/delete_times.c (modified) (1 diff)
-
delstar/src/delstar.c (modified) (2 diffs)
-
delstar/src/find_image_db.c (modified) (3 diffs)
-
dvomerge/src/LoadImages.c (modified) (1 diff)
-
dvomerge/src/dvo_image_merge_dbs.c (modified) (3 diffs)
-
dvomerge/src/dvoconvert.c (modified) (1 diff)
-
dvomerge/src/dvorepairFixImages.c (modified) (1 diff)
-
dvomerge/src/dvoutils_load_image_index.c (modified) (1 diff)
-
dvomerge/src/dvoverify_utils.c (modified) (1 diff)
-
fakeastro/src/load_template_images.c (modified) (1 diff)
-
gastro2/src/rfits.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/src/detsearch.c (modified) (1 diff)
-
imregister/src/imphotsearch.c (modified) (1 diff)
-
imregister/src/imregtable.c (modified) (1 diff)
-
imregister/src/imsearch.c (modified) (1 diff)
-
imregister/src/imstatreg.c (modified) (2 diffs)
-
imregister/src/photsearch.c (modified) (2 diffs)
-
imregister/src/spsearch.c (modified) (1 diff)
-
libautocode/def/autocode.c (modified) (2 diffs)
-
libautocode/def/autocode.h (modified) (1 diff)
-
libdvo/Makefile (modified) (2 diffs)
-
libdvo/include/dvo.h (modified) (3 diffs)
-
libdvo/src/AstromOffsetMapIO.c (modified) (1 diff)
-
libdvo/src/LoadImages.c (modified) (1 diff)
-
libdvo/src/LoadPhotcodesFITS.c (modified) (1 diff)
-
libdvo/src/dvo_catalog_mef.c (modified) (2 diffs)
-
libdvo/src/dvo_catalog_split.c (modified) (4 diffs)
-
libdvo/src/dvo_convert.c (modified) (21 diffs)
-
libdvo/src/dvo_image.c (modified) (5 diffs)
-
libdvo/src/dvo_image_raw.c (modified) (1 diff)
-
libdvo/src/dvo_util.c (modified) (1 diff)
-
libdvo/src/fits_db.c (modified) (2 diffs)
-
libdvo/src/flatcorr_io.c (modified) (2 diffs)
-
libdvo/src/skyregion_io.c (modified) (1 diff)
-
markstar/src/find_images.c (modified) (1 diff)
-
mosastro/src/rfits.c (modified) (1 diff)
-
opihi/dvo/cmpReadFile.c (modified) (1 diff)
-
photdbc/src/copy_images.c (modified) (1 diff)
-
photdbc/src/find_images.c (modified) (1 diff)
-
photdbc/src/flag_measures.c (modified) (1 diff)
-
relastro/src/ImageTable.c (modified) (1 diff)
-
relastro/src/assign_images.c (modified) (1 diff)
-
relastro/src/load_images.c (modified) (1 diff)
-
relphot/src/ImageTable.c (modified) (1 diff)
-
relphot/src/assign_images.c (modified) (1 diff)
-
relphot/src/load_images.c (modified) (1 diff)
-
relphot/src/relphot_images.c (modified) (1 diff)
-
uniphot/src/find_image_sgroups.c (modified) (1 diff)
-
uniphot/src/find_image_tgroups.c (modified) (1 diff)
-
uniphot/src/load_images.c (modified) (1 diff)
-
uniphot/src/load_images_fiximids.c (modified) (1 diff)
-
uniphot/src/load_images_fixstkids.c (modified) (1 diff)
-
uniphot/src/load_images_setphot.c (modified) (1 diff)
-
uniphot/src/load_images_setposangle.c (modified) (1 diff)
-
uniphot/src/subset_images.c (modified) (1 diff)
-
uniphot/src/update_dvo_uniphot.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/addstar/src/ReadStarsFITS.c
r37995 r38344 153 153 off_t Nstars; 154 154 unsigned int i; 155 char swapped;156 155 double ZeroPt; 157 156 Stars *stars = NULL; 158 157 SMPData *smpdata = NULL; 159 158 160 swapped = FALSE; 161 smpdata = gfits_table_get_SMPData (table, &Nstars, &swapped); 159 smpdata = gfits_table_get_SMPData (table, &Nstars, NULL, NULL); 162 160 if (!smpdata) { 163 161 fprintf (stderr, "skipping inconsistent entry\n"); … … 229 227 PS1_DEV_0 *ps1data; 230 228 231 ps1data = gfits_table_get_PS1_DEV_0 (table, &Nstars, NULL );229 ps1data = gfits_table_get_PS1_DEV_0 (table, &Nstars, NULL, NULL); 232 230 if (!ps1data) { 233 231 fprintf (stderr, "skipping inconsistent entry\n"); … … 300 298 PS1_DEV_1 *ps1data; 301 299 302 ps1data = gfits_table_get_PS1_DEV_1 (table, &Nstars, NULL );300 ps1data = gfits_table_get_PS1_DEV_1 (table, &Nstars, NULL, NULL); 303 301 if (!ps1data) { 304 302 fprintf (stderr, "skipping inconsistent entry\n"); … … 383 381 } 384 382 385 ps1data = gfits_table_get_CMF_PS1_V1 (table, &Nstars, NULL );383 ps1data = gfits_table_get_CMF_PS1_V1 (table, &Nstars, NULL, NULL); 386 384 if (!ps1data) { 387 385 fprintf (stderr, "skipping inconsistent entry\n"); … … 545 543 CMF_PS1_V2 *ps1data; 546 544 547 ps1data = gfits_table_get_CMF_PS1_V2 (table, &Nstars, NULL );545 ps1data = gfits_table_get_CMF_PS1_V2 (table, &Nstars, NULL, NULL); 548 546 if (!ps1data) { 549 547 fprintf (stderr, "skipping inconsistent entry\n"); … … 622 620 CMF_PS1_V3 *ps1data; 623 621 624 ps1data = gfits_table_get_CMF_PS1_V3 (table, &Nstars, NULL );622 ps1data = gfits_table_get_CMF_PS1_V3 (table, &Nstars, NULL, NULL); 625 623 if (!ps1data) { 626 624 fprintf (stderr, "skipping inconsistent entry\n"); … … 706 704 CMF_PS1_V4 *ps1data; 707 705 708 ps1data = gfits_table_get_CMF_PS1_V4 (table, &Nstars, NULL );706 ps1data = gfits_table_get_CMF_PS1_V4 (table, &Nstars, NULL, NULL); 709 707 if (!ps1data) { 710 708 fprintf (stderr, "skipping inconsistent entry\n"); … … 1259 1257 } 1260 1258 1261 ps1data = gfits_table_get_CMF_PS1_SV1 (table, &Nstars, NULL );1259 ps1data = gfits_table_get_CMF_PS1_SV1 (table, &Nstars, NULL, NULL); 1262 1260 if (!ps1data) { 1263 1261 fprintf (stderr, "skipping inconsistent entry\n"); … … 1423 1421 CMF_PS1_SV2 *ps1data; 1424 1422 1425 ps1data = gfits_table_get_CMF_PS1_SV2 (table, &Nstars, NULL );1423 ps1data = gfits_table_get_CMF_PS1_SV2 (table, &Nstars, NULL, NULL); 1426 1424 if (!ps1data) { 1427 1425 fprintf (stderr, "skipping inconsistent entry\n"); … … 1753 1751 CMF_PS1_DV4 *ps1data; 1754 1752 1755 ps1data = gfits_table_get_CMF_PS1_DV4 (table, &Nstars, NULL );1753 ps1data = gfits_table_get_CMF_PS1_DV4 (table, &Nstars, NULL, NULL); 1756 1754 if (!ps1data) { 1757 1755 fprintf (stderr, "skipping inconsistent entry\n"); … … 1839 1837 CMF_PS1_DV5 *ps1data; 1840 1838 1841 ps1data = gfits_table_get_CMF_PS1_DV5 (table, &Nstars, NULL );1839 ps1data = gfits_table_get_CMF_PS1_DV5 (table, &Nstars, NULL, NULL); 1842 1840 if (!ps1data) { 1843 1841 fprintf (stderr, "skipping inconsistent entry\n"); -
branches/eam_branches/ohana.20150429/src/addstar/src/findskycell.c
r37116 r38344 183 183 // convert database table to internal structure (binary to Image) 184 184 // 'image' points to the same memory as db->ftable->buffer 185 image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);185 image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 186 186 if (!image) { 187 187 fprintf (stderr, "ERROR: failed to read images\n"); … … 567 567 // convert database table to internal structure (binary to Image) 568 568 // 'image' points to the same memory as db->ftable->buffer 569 image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);569 image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 570 570 if (!image) { 571 571 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/addstar/src/skycells_to_mdc.c
r33720 r38344 5 5 // Convert FITS_DB to images structure 6 6 off_t NdbImages; 7 Image *dbImages = gfits_table_get_Image(&db->ftable, &NdbImages, &db->s wapped);7 Image *dbImages = gfits_table_get_Image(&db->ftable, &NdbImages, &db->scaledValue, &db->nativeOrder); 8 8 9 9 // If tess_id was not supplied assume that it is the basename of the CATDIR -
branches/eam_branches/ohana.20150429/src/checkastro/src/load_images.c
r37807 r38344 10 10 11 11 // convert database table to internal structure 12 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);12 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 13 13 if (!image) { 14 14 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/delstar/src/delete_duplicate_images.c
r36833 r38344 16 16 Image *image, *outimage; 17 17 18 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);18 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 19 19 if (!image) { 20 20 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/delstar/src/delete_image_photcodes.c
r34749 r38344 12 12 PhotCode **photcodes = ParsePhotcodeList (PHOTCODE_LIST, &Nphotcodes, FALSE); 13 13 14 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);14 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 15 15 if (!image) { 16 16 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/delstar/src/delete_imagename.c
r37807 r38344 18 18 SkyTableSetFilenames (sky, CATDIR, "cpt"); 19 19 20 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);20 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 21 21 if (!image) { 22 22 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/delstar/src/delete_times.c
r37807 r38344 25 25 skylist[0].ownElements = FALSE; // free these elements when freeing the list 26 26 27 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);27 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 28 28 if (!image) { 29 29 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/delstar/src/delstar.c
r35837 r38344 30 30 case MODE_FIX_LAP: { 31 31 off_t Nimage; 32 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);32 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 33 33 if (!image) { 34 34 fprintf (stderr, "ERROR: failed to read images\n"); … … 67 67 case MODE_FIX_LAP_STATS: { 68 68 off_t Nimage; 69 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);69 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 70 70 if (!image) { 71 71 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/delstar/src/find_image_db.c
r29001 r38344 16 16 } 17 17 18 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);18 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 19 19 if (!image) { 20 20 fprintf (stderr, "ERROR: failed to read images\n"); … … 46 46 int code; 47 47 48 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);48 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 49 49 50 50 start = timage[0].tzero - MAX(0.01*timage[0].trate*timage[0].NY, 1); … … 76 76 Image *image; 77 77 78 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);78 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 79 79 80 80 Nlist = 0; -
branches/eam_branches/ohana.20150429/src/dvomerge/src/LoadImages.c
r29938 r38344 34 34 } 35 35 36 image = gfits_table_get_Image (&db->ftable, Nimage, &db->s wapped);36 image = gfits_table_get_Image (&db->ftable, Nimage, &db->scaledValue, &db->nativeOrder); 37 37 if (!image) { 38 38 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvo_image_merge_dbs.c
r37807 r38344 16 16 short *TgtCodes; 17 17 18 imagesSrc = gfits_table_get_Image (&src[0].ftable, &NimagesSrc, &src[0].s wapped);18 imagesSrc = gfits_table_get_Image (&src[0].ftable, &NimagesSrc, &src[0].scaledValue, &src[0].nativeOrder); 19 19 if (!imagesSrc) { 20 20 fprintf (stderr, "ERROR: failed to read images from src\n"); … … 22 22 } 23 23 24 imagesTgt = gfits_table_get_Image (&tgt[0].ftable, &NimagesTgt, &tgt[0].s wapped);24 imagesTgt = gfits_table_get_Image (&tgt[0].ftable, &NimagesTgt, &tgt[0].scaledValue, &tgt[0].nativeOrder); 25 25 if (!imagesTgt) { 26 26 fprintf (stderr, "ERROR: failed to read images from tgt\n"); … … 83 83 } 84 84 85 images = gfits_table_get_Image (&in[0].ftable, &Nimages, &in[0].s wapped);85 images = gfits_table_get_Image (&in[0].ftable, &Nimages, &in[0].scaledValue, &in[0].nativeOrder); 86 86 if (!images) { 87 87 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvoconvert.c
r33657 r38344 149 149 150 150 // convert the raw image table to Image type (byteswap if needed) 151 images = gfits_table_get_Image (&inDB.ftable, &Nimages, &inDB.s wapped);151 images = gfits_table_get_Image (&inDB.ftable, &Nimages, &inDB.scaledValue, &inDB.nativeOrder); 152 152 if (!images) { 153 153 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvorepairFixImages.c
r37807 r38344 280 280 memset (&db.ftable.buffer[Nx*Nout], ' ', nbytes - Nx*Nout); 281 281 282 db.swapped = TRUE; // internal representation 282 db.nativeOrder = TRUE; // internal representation 283 db.scaledValue = TRUE; // internal representation 283 284 284 285 gfits_modify (&db.header, "NIMAGES", OFF_T_FMT, 1, Nout); -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvoutils_load_image_index.c
r37807 r38344 87 87 88 88 off_t Nimage; 89 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);89 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 90 90 if (!image) { 91 91 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/dvomerge/src/dvoverify_utils.c
r37807 r38344 484 484 } 485 485 486 images = gfits_table_get_Image (&inDB.ftable, &Nimages, &inDB.s wapped);486 images = gfits_table_get_Image (&inDB.ftable, &Nimages, &inDB.scaledValue, &inDB.nativeOrder); 487 487 if (!images) { 488 488 fprintf (stderr, "ERROR: failed to read images from src\n"); -
branches/eam_branches/ohana.20150429/src/fakeastro/src/load_template_images.c
r37807 r38344 24 24 25 25 off_t Nimage; 26 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);26 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 27 27 if (!image) { 28 28 fprintf (stderr, "ERROR: no template images in %s (though db exists)\n", IMAGES_INPUT); -
branches/eam_branches/ohana.20150429/src/gastro2/src/rfits.c
r29001 r38344 14 14 if (!gfits_fread_ftable (f, &table, "SMPFILE")) goto escape; 15 15 16 stars = gfits_table_get_SMPData (&table, &Nstars, NULL );16 stars = gfits_table_get_SMPData (&table, &Nstars, NULL, NULL); 17 17 if (!stars) { 18 18 fprintf (stderr, "ERROR: failed to read stars\n"); -
branches/eam_branches/ohana.20150429/src/getstar/src/dvoImageExtract.c
r29001 r38344 31 31 32 32 // convert database table to internal structure 33 images = gfits_table_get_Image (&db.ftable, &Nimages, &db.s wapped);33 images = gfits_table_get_Image (&db.ftable, &Nimages, &db.scaledValue, &db.nativeOrder); 34 34 if (!images) { 35 35 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/getstar/src/dvoImageOverlaps.c
r29001 r38344 34 34 35 35 // convert database table to internal structure 36 dbImages = gfits_table_get_Image (&db.ftable, &NdbImages, &db.s wapped);36 dbImages = gfits_table_get_Image (&db.ftable, &NdbImages, &db.scaledValue, &db.nativeOrder); 37 37 if (!dbImages) { 38 38 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/getstar/src/dvoImagesAtCoords.c
r36131 r38344 60 60 61 61 // convert database table to internal structure 62 dbImages = gfits_table_get_Image (&db.ftable, &NdbImages, &db.s wapped);62 dbImages = gfits_table_get_Image (&db.ftable, &NdbImages, &db.scaledValue, &db.nativeOrder); 63 63 if (!dbImages) { 64 64 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/imregister/src/detsearch.c
r29001 r38344 35 35 36 36 if (!output.Modify && !output.Delete && !output.Altpath) gfits_db_close (&db); 37 detrend = gfits_table_get_DetReg (&db.ftable, &Ndetrend, &db.s wapped);37 detrend = gfits_table_get_DetReg (&db.ftable, &Ndetrend, &db.scaledValue, &db.nativeOrder); 38 38 if (!detrend) { 39 39 fprintf (stderr, "ERROR: failed to read detrend info\n"); -
branches/eam_branches/ohana.20150429/src/imregister/src/imphotsearch.c
r29001 r38344 32 32 if (!options.modify) gfits_db_close (&db); 33 33 34 image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);34 image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 35 35 if (!image) { 36 36 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/imregister/src/imregtable.c
r29001 r38344 33 33 gfits_read_ftable (infile, &ftable, "IMAGE_DATABASE"); 34 34 35 image = gfits_table_get_RegImage (&ftable, &Nimage, NULL );35 image = gfits_table_get_RegImage (&ftable, &Nimage, NULL, NULL); 36 36 if (!image) { 37 37 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/imregister/src/imsearch.c
r29001 r38344 29 29 if (!output.modify && !output.delete) gfits_db_close (&db); 30 30 31 image = gfits_table_get_RegImage (&db.ftable, &Nimage, &db.s wapped);31 image = gfits_table_get_RegImage (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 32 32 if (!image) { 33 33 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/imregister/src/imstatreg.c
r29001 r38344 66 66 exit (1); 67 67 } 68 subset = gfits_table_get_RegImage (&temp_db.ftable, &Nsubset, &temp_db.s wapped);68 subset = gfits_table_get_RegImage (&temp_db.ftable, &Nsubset, &temp_db.scaledValue, &temp_db.nativeOrder); 69 69 if (!subset) { 70 70 fprintf (stderr, "ERROR: failed to read images\n"); … … 96 96 we will just drop the temp db data */ 97 97 } 98 image = gfits_table_get_RegImage (&image_db.ftable, &Nimage, &image_db.s wapped);98 image = gfits_table_get_RegImage (&image_db.ftable, &Nimage, &image_db.scaledValue, &image_db.nativeOrder); 99 99 if (!image) { 100 100 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/imregister/src/photsearch.c
r29001 r38344 41 41 /* add test to EXTNAME? */ 42 42 if (output.convert) { 43 photpars_old = gfits_table_get_PhotParsOld (&db.ftable, &Nphotpars, &db.s wapped);43 photpars_old = gfits_table_get_PhotParsOld (&db.ftable, &Nphotpars, &db.scaledValue, &db.nativeOrder); 44 44 if (!photpars_old) { 45 45 fprintf (stderr, "ERROR: failed to read photometry parameters\n"); … … 48 48 photpars = PhotParsOld_to_PhotPars (photpars_old, Nphotpars); 49 49 } else { 50 photpars = gfits_table_get_PhotPars (&db.ftable, &Nphotpars, &db.s wapped);50 photpars = gfits_table_get_PhotPars (&db.ftable, &Nphotpars, &db.scaledValue, &db.nativeOrder); 51 51 if (!photpars) { 52 52 fprintf (stderr, "ERROR: failed to read photometry parameters\n"); -
branches/eam_branches/ohana.20150429/src/imregister/src/spsearch.c
r29001 r38344 29 29 if (!output.modify && !output.delete) gfits_db_close (&db); 30 30 31 spectrum = gfits_table_get_Spectrum (&db.ftable, &Nspectrum, &db.s wapped);31 spectrum = gfits_table_get_Spectrum (&db.ftable, &Nspectrum, &db.scaledValue, &db.nativeOrder); 32 32 if (!spectrum) { 33 33 fprintf (stderr, "ERROR: failed to read spectrum\n"); -
branches/eam_branches/ohana.20150429/src/libautocode/def/autocode.c
r29537 r38344 27 27 /*** add test of EXTNAME and header-defined columns? ***/ 28 28 /* return internal structure representation */ 29 $STRUCT *gfits_table_get_$STRUCT (FTable *ftable, off_t *Ndata, char *swapped) { 29 /* scaledData & nativeBytes describe the current state of the ftable.buffer */ 30 $STRUCT *gfits_table_get_$STRUCT (FTable *ftable, off_t *Ndata, char *scaledValue, char *nativeOrder) { 30 31 31 32 int Ncols; … … 40 41 *Ndata = ftable[0].header[0].Naxis[1]; 41 42 data = ($STRUCT *) ftable[0].buffer; 42 if ((swapped == NULL) || (*swapped == FALSE)) { 43 44 // if the pointer is not passed, we need to swap 45 if (!nativeOrder || !*nativeOrder) { 43 46 if (!gfits_convert_$STRUCT (data, sizeof ($STRUCT), *Ndata)) { 44 47 return NULL; 45 48 } 49 if (nativeOrder) *nativeOrder = TRUE; 50 } 51 // if the pointer is not passed, we need to scale 52 if (!scaledValue || !*scaledValue) { 46 53 gfits_table_scale_data (ftable); 47 if (s wapped != NULL) *swapped= TRUE;54 if (scaledValue) *scaledValue = TRUE; 48 55 } 49 56 return (data); -
branches/eam_branches/ohana.20150429/src/libautocode/def/autocode.h
r27435 r38344 2 2 /** STRUCT DEFINITION **/ 3 3 4 $STRUCT *gfits_table_get_$STRUCT (FTable *table, off_t *Ndata, char *s wapped);4 $STRUCT *gfits_table_get_$STRUCT (FTable *table, off_t *Ndata, char *scaledValue, char *nativeOrder); 5 5 int gfits_table_set_$STRUCT (FTable *ftable, $STRUCT *data, off_t Ndata); 6 6 int gfits_table_mkheader_$STRUCT (Header *header); -
branches/eam_branches/ohana.20150429/src/libdvo/Makefile
r37992 r38344 10 10 MAN = $(HOME)/doc 11 11 INC = $(HOME)/include 12 TEST = $(HOME)/test 13 TESTBIN = $(HOME)/test 12 14 ASRC = $(AUTO)/src 13 15 AINC = $(AUTO)/include … … 153 155 rm -f $@ 154 156 cp $< $@ 157 echo "done making autocode.h" 155 158 156 159 $(AINC)/autocode.h: $(AINCS) $(ADEF)/autocode.h $(ADEF)/common.h -
branches/eam_branches/ohana.20150429/src/libdvo/include/dvo.h
r38331 r38344 230 230 char format; /* what data format is used for disk file? */ 231 231 char virtual; /* is table in ftable or vtable? */ 232 char swapped; /* is table in internal byte-order? */ 232 char nativeOrder; /* is table in internal byte-order? */ 233 char scaledValue; /* is table in internal byte-order? */ 233 234 } FITS_DB; 234 235 … … 966 967 DVOTableFormat FtableGetFormat (FTable *ftable); 967 968 968 Average *FtableToAverage (FTable *ftable, off_t *Naverage, char *format, SecFilt **primary );969 Average *FtableToAverage (FTable *ftable, off_t *Naverage, char *format, SecFilt **primary, char nativeBytes); 969 970 Measure *FtableToMeasure (FTable *ftable, Average *average, off_t *Nmeasure, char *format); 970 971 SecFilt *FtableToSecFilt (FTable *ftable, off_t *Nsecfilt, char *format); … … 1017 1018 int gfits_table_set_Image (FTable *ftable); 1018 1019 int gfits_table_mkheader_Image (Header *header); 1019 Image *gfits_table_get_Image (FTable *ftable, off_t *Ndata, char *s wapped);1020 Image *gfits_table_get_Image (FTable *ftable, off_t *Ndata, char *scaledValue, char *nativeOrder); 1020 1021 1021 1022 /* flatcorr APIs */ -
branches/eam_branches/ohana.20150429/src/libdvo/src/AstromOffsetMapIO.c
r37807 r38344 39 39 return (NULL); 40 40 } 41 AstromOffsetMap_Disk_6x6 *map_disk = gfits_table_get_AstromOffsetMap_Disk_6x6 (&ftable, &Nmap, NULL );41 AstromOffsetMap_Disk_6x6 *map_disk = gfits_table_get_AstromOffsetMap_Disk_6x6 (&ftable, &Nmap, NULL, NULL); 42 42 if (!map_disk) { 43 43 fprintf (stderr, "ERROR: failed to read Astrom Offset Map\n"); -
branches/eam_branches/ohana.20150429/src/libdvo/src/LoadImages.c
r37807 r38344 65 65 } 66 66 67 image = gfits_table_get_Image (&db.ftable, Nimage, &db.s wapped);67 image = gfits_table_get_Image (&db.ftable, Nimage, &db.scaledValue, &db.nativeOrder); 68 68 if (!image) { 69 69 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/libdvo/src/LoadPhotcodesFITS.c
r37035 r38344 43 43 # define CONVERT_FORMAT(NAME, FORMAT) \ 44 44 if (!strcmp (extname, NAME)) { \ 45 PhotCode_##FORMAT *photcode_input = gfits_table_get_PhotCode_##FORMAT (&db.ftable, &Ncode, &db.s wapped); \45 PhotCode_##FORMAT *photcode_input = gfits_table_get_PhotCode_##FORMAT (&db.ftable, &Ncode, &db.scaledValue, &db.nativeOrder); \ 46 46 if (!photcode_input) { \ 47 47 fprintf (stderr, "ERROR: failed to read photcodes in LoadPhotcodesFITS.c\n"); \ -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_catalog_mef.c
r38331 r38344 77 77 } 78 78 /* old versions of DVO stored one of the average magnitudes in Average. we save this if needed */ 79 catalog[0].average = FtableToAverage (&ftable, &Naverage, &catalog[0].catformat, &primary );79 catalog[0].average = FtableToAverage (&ftable, &Naverage, &catalog[0].catformat, &primary, FALSE); 80 80 if (Naverage != catalog[0].Naves_disk) { 81 81 fprintf (stderr, "Warning: mismatch between Naverage in PHU and Table headers ("OFF_T_FMT" vs "OFF_T_FMT")\n", Naverage, catalog[0].Naves_disk); … … 131 131 } 132 132 /* no conversions currently defined */ 133 catalog[0].missing = gfits_table_get_Missing (&ftable, &catalog[0].Nmissing, NULL );133 catalog[0].missing = gfits_table_get_Missing (&ftable, &catalog[0].Nmissing, NULL, NULL); 134 134 if (!catalog[0].missing) { 135 135 fprintf (stderr, "ERROR: failed to read missing\n"); -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_catalog_split.c
r38331 r38344 311 311 /* read Average table header */ 312 312 if (!gfits_fread_header (catalog[0].f, &header)) { 313 if (VERBOSE) fprintf (stderr, "can't read table average header ");313 if (VERBOSE) fprintf (stderr, "can't read table average header\n"); 314 314 return (FALSE); 315 315 } 316 316 if (catalog[0].catflags & LOAD_AVES) { 317 Header rawheader; 318 FTable rawtable; 319 rawtable.header = &rawheader; 320 FTable *outtable = &ftable; 321 char nativeOrder = FALSE; 322 317 323 /* read Average table data : format is irrelevant here */ 318 324 if (!gfits_fread_ftable_data (catalog[0].f, &ftable, FALSE)) { 319 if (VERBOSE) fprintf (stderr, "can't read table average data"); 320 return (FALSE); 321 } 325 if (VERBOSE) fprintf (stderr, "can't read table average data\n"); 326 return (FALSE); 327 } 328 if (gfits_extension_is_compressed_table (ftable.header)) { 329 if (!gfits_uncompress_table (&ftable, &rawtable)) { 330 if (VERBOSE) fprintf (stderr, "failed to uncompress table\n"); 331 return (FALSE); 332 } 333 gfits_free_table (&ftable); 334 outtable = &rawtable; 335 nativeOrder = TRUE; 336 } 337 // NOTE: fread_ftable returns an unswapped table; uncompress swaps the bytes into native order 338 322 339 /* convert the saved version of the table to the internal version. Old versions of DVO stored 323 340 * one of the average magnitudes in Average. We save this in case it is needed below. NOTE: 324 341 * primary is only used if we read in the secfilt table, otherwise it should be freed */ 325 catalog[0].average = FtableToAverage ( &ftable, &Naverage, &catalog[0].catformat, &primary);342 catalog[0].average = FtableToAverage (outtable, &Naverage, &catalog[0].catformat, &primary, nativeOrder); 326 343 if (Naverage != catalog[0].Naves_disk) { 327 344 fprintf (stderr, "Warning: mismatch between Naverage in PHU and Table headers ("OFF_T_FMT" vs "OFF_T_FMT")\n", Naverage, catalog[0].Naves_disk); … … 393 410 } 394 411 /* no conversions currently defined : this just does the byte swap */ 395 catalog[0].missing = gfits_table_get_Missing (&ftable, &Nmissing, NULL );412 catalog[0].missing = gfits_table_get_Missing (&ftable, &Nmissing, NULL, NULL); 396 413 if (!catalog[0].missing) { 397 414 fprintf (stderr, "ERROR: failed to read missing\n"); … … 652 669 * one of the average magnitudes in Average. We save this in case it is needed below. NOTE: 653 670 * primary is only used if we read in the secfilt table, otherwise it should be freed */ 654 catalog[0].average = FtableToAverage (&ftable, &Naverage, &catalog[0].catformat, &primary );671 catalog[0].average = FtableToAverage (&ftable, &Naverage, &catalog[0].catformat, &primary, FALSE); 655 672 if (Naverage != Nrows) { 656 673 // XXX this condition denotes the eof has been reached; not an error or a warning … … 747 764 748 765 /* no conversions currently defined : this just does the byte swap */ 749 catalog[0].missing = gfits_table_get_Missing (&ftable, &Nmissing, NULL );766 catalog[0].missing = gfits_table_get_Missing (&ftable, &Nmissing, NULL, NULL); 750 767 if (!catalog[0].missing) { 751 768 fprintf (stderr, "ERROR: failed to read missing\n"); -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_convert.c
r38219 r38344 52 52 /*** Average / FTable conversion functions ***/ 53 53 54 Average *FtableToAverage (FTable *ftable, off_t *Naverage, char *format, SecFilt **primary ) {54 Average *FtableToAverage (FTable *ftable, off_t *Naverage, char *format, SecFilt **primary, char nativeBytes) { 55 55 56 56 Average *average; … … 98 98 if (!strcmp (extname, NAME)) { \ 99 99 Average_##TYPE *tmpAverage; \ 100 tmpAverage = gfits_table_get_Average_##TYPE (ftable, Naverage, NULL); \100 tmpAverage = gfits_table_get_Average_##TYPE (ftable, Naverage, NULL, &nativeBytes); \ 101 101 if (!tmpAverage) { \ 102 102 fprintf (stderr, "ERROR: failed to read averages\n"); \ … … 109 109 110 110 if (!strcmp (extname, "DVO_AVERAGE")) { 111 average = gfits_table_get_Average (ftable, Naverage, NULL );111 average = gfits_table_get_Average (ftable, Naverage, NULL, NULL); 112 112 if (!average) { 113 113 fprintf (stderr, "ERROR: failed to read averages\n"); … … 226 226 if (!strcmp (extname, NAME)) { \ 227 227 Measure_##TYPE *tmpMeasure; \ 228 tmpMeasure = gfits_table_get_Measure_##TYPE (ftable, Nmeasure, NULL); \229 if (!tmpMeasure) {\230 fprintf (stderr, "ERROR: failed to read measures\n"); \231 exit (2);\232 }\233 myAssert (ABS_COORDS || average, "conversion to internal needs average table"); \228 tmpMeasure = gfits_table_get_Measure_##TYPE (ftable, Nmeasure, NULL, NULL); \ 229 if (!tmpMeasure) { \ 230 fprintf (stderr, "ERROR: failed to read measures\n"); \ 231 exit (2); \ 232 } \ 233 myAssert (ABS_COORDS || average, "conversion to internal needs average table"); \ 234 234 measure = Measure_##TYPE##_ToInternal (average, tmpMeasure, *Nmeasure); \ 235 235 free (tmpMeasure); \ … … 238 238 239 239 if (!strcmp (extname, "DVO_MEASURE")) { 240 measure = gfits_table_get_Measure (ftable, Nmeasure, NULL );240 measure = gfits_table_get_Measure (ftable, Nmeasure, NULL, NULL); 241 241 if (!measure) { 242 242 fprintf (stderr, "ERROR: failed to read measures\n"); … … 339 339 if (!strcmp (extname, NAME)) { \ 340 340 SecFilt_##TYPE *tmpSecFilt; \ 341 tmpSecFilt = gfits_table_get_SecFilt_##TYPE (ftable, Nsecfilt, NULL ); \341 tmpSecFilt = gfits_table_get_SecFilt_##TYPE (ftable, Nsecfilt, NULL, NULL); \ 342 342 if (!tmpSecFilt) { \ 343 343 fprintf (stderr, "ERROR: failed to read secfilts\n"); \ … … 350 350 351 351 if (!strcmp (extname, "DVO_SECFILT")) { 352 secfilt = gfits_table_get_SecFilt (ftable, Nsecfilt, NULL );352 secfilt = gfits_table_get_SecFilt (ftable, Nsecfilt, NULL, NULL); 353 353 if (!secfilt) { 354 354 fprintf (stderr, "ERROR: failed to read secfilts\n"); … … 433 433 if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 128)) { 434 434 Lensing_PS1_V5_R0 *tmpLensing; 435 tmpLensing = gfits_table_get_Lensing_PS1_V5_R0 (ftable, Nlensing, NULL );435 tmpLensing = gfits_table_get_Lensing_PS1_V5_R0 (ftable, Nlensing, NULL, NULL); 436 436 if (!tmpLensing) { 437 437 fprintf (stderr, "ERROR: failed to read lensings\n"); … … 445 445 if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 136)) { 446 446 Lensing_PS1_V5_R1 *tmpLensing; 447 tmpLensing = gfits_table_get_Lensing_PS1_V5_R1 (ftable, Nlensing, NULL );447 tmpLensing = gfits_table_get_Lensing_PS1_V5_R1 (ftable, Nlensing, NULL, NULL); 448 448 if (!tmpLensing) { 449 449 fprintf (stderr, "ERROR: failed to read lensings\n"); … … 457 457 if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 144)) { 458 458 Lensing_PS1_V5_R2 *tmpLensing; 459 tmpLensing = gfits_table_get_Lensing_PS1_V5_R2 (ftable, Nlensing, NULL );459 tmpLensing = gfits_table_get_Lensing_PS1_V5_R2 (ftable, Nlensing, NULL, NULL); 460 460 if (!tmpLensing) { 461 461 fprintf (stderr, "ERROR: failed to read lensings\n"); … … 477 477 if (!strcmp (extname, NAME)) { \ 478 478 Lensing_##TYPE *tmpLensing; \ 479 tmpLensing = gfits_table_get_Lensing_##TYPE (ftable, Nlensing, NULL ); \479 tmpLensing = gfits_table_get_Lensing_##TYPE (ftable, Nlensing, NULL, NULL); \ 480 480 if (!tmpLensing) { \ 481 481 fprintf (stderr, "ERROR: failed to read lensings\n"); \ … … 488 488 489 489 if (!strcmp (extname, "DVO_LENSING")) { 490 lensing = gfits_table_get_Lensing (ftable, Nlensing, NULL );490 lensing = gfits_table_get_Lensing (ftable, Nlensing, NULL, NULL); 491 491 if (!lensing) { 492 492 fprintf (stderr, "ERROR: failed to read lensings\n"); … … 572 572 if (!strcmp (extname, "DVO_LENSOBJ_PS1_V5") && (ftable[0].header[0].Naxis[0] == 136)) { 573 573 Lensobj_PS1_V5_R0 *tmpLensobj; 574 tmpLensobj = gfits_table_get_Lensobj_PS1_V5_R0 (ftable, Nlensobj, NULL );574 tmpLensobj = gfits_table_get_Lensobj_PS1_V5_R0 (ftable, Nlensobj, NULL, NULL); 575 575 if (!tmpLensobj) { 576 576 fprintf (stderr, "ERROR: failed to read lensobjs\n"); … … 592 592 if (!strcmp (extname, NAME)) { \ 593 593 Lensobj_##TYPE *tmpLensobj; \ 594 tmpLensobj = gfits_table_get_Lensobj_##TYPE (ftable, Nlensobj, NULL ); \594 tmpLensobj = gfits_table_get_Lensobj_##TYPE (ftable, Nlensobj, NULL, NULL); \ 595 595 if (!tmpLensobj) { \ 596 596 fprintf (stderr, "ERROR: failed to read lensobjs\n"); \ … … 603 603 604 604 if (!strcmp (extname, "DVO_LENSOBJ")) { 605 lensobj = gfits_table_get_Lensobj (ftable, Nlensobj, NULL );605 lensobj = gfits_table_get_Lensobj (ftable, Nlensobj, NULL, NULL); 606 606 if (!lensobj) { 607 607 fprintf (stderr, "ERROR: failed to read lensobjs\n"); … … 695 695 if (!strcmp (extname, NAME)) { \ 696 696 StarPar_##TYPE *tmpStarPar; \ 697 tmpStarPar = gfits_table_get_StarPar_##TYPE (ftable, Nstarpar, NULL ); \697 tmpStarPar = gfits_table_get_StarPar_##TYPE (ftable, Nstarpar, NULL, NULL); \ 698 698 if (!tmpStarPar) { \ 699 699 fprintf (stderr, "ERROR: failed to read starpar\n"); \ … … 706 706 707 707 if (!strcmp (extname, "DVO_STARPAR")) { 708 starpar = gfits_table_get_StarPar (ftable, Nstarpar, NULL );708 starpar = gfits_table_get_StarPar (ftable, Nstarpar, NULL, NULL); 709 709 if (!starpar) { 710 710 fprintf (stderr, "ERROR: failed to read starpar\n"); … … 799 799 if (!strcmp (extname, NAME)) { \ 800 800 GalShape_##TYPE *tmpGalShape; \ 801 tmpGalShape = gfits_table_get_GalShape_##TYPE (ftable, Ngalshape, NULL ); \801 tmpGalShape = gfits_table_get_GalShape_##TYPE (ftable, Ngalshape, NULL, NULL); \ 802 802 if (!tmpGalShape) { \ 803 803 fprintf (stderr, "ERROR: failed to read galshapes\n"); \ … … 810 810 811 811 if (!strcmp (extname, "DVO_GALSHAPE")) { 812 galshape = gfits_table_get_GalShape (ftable, Ngalshape, NULL );812 galshape = gfits_table_get_GalShape (ftable, Ngalshape, NULL, NULL); 813 813 if (!galshape) { 814 814 fprintf (stderr, "ERROR: failed to read galshapes\n"); … … 891 891 if (*format == DVO_FORMAT_ELIXIR) { // special case for ELIXIR 892 892 Image_Elixir *tmpimage; 893 tmpimage = gfits_table_get_Image_Elixir (ftable, &Nimage, NULL );893 tmpimage = gfits_table_get_Image_Elixir (ftable, &Nimage, NULL, NULL); 894 894 if (!tmpimage) { 895 895 fprintf (stderr, "ERROR: failed to read images\n"); … … 917 917 Image_##TYPE *tmpimage; \ 918 918 *format = DVO_FORMAT_##FORMAT; \ 919 tmpimage = gfits_table_get_Image_##TYPE (ftable, &Nimage, NULL ); \919 tmpimage = gfits_table_get_Image_##TYPE (ftable, &Nimage, NULL, NULL); \ 920 920 if (!tmpimage) { \ 921 921 fprintf (stderr, "ERROR: failed to read images\n"); \ -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_image.c
r37807 r38344 89 89 // so when we later do a gfits_copy_ftable, we stomp on bad memory 90 90 FtableToImage (&db[0].ftable, &db[0].theader, &db[0].format); 91 db[0].swapped = TRUE; /* table has internal byte-order */ 91 db[0].nativeOrder = TRUE; /* table has internal byte-order */ 92 db[0].scaledValue = TRUE; /* table has internal byte-order */ 92 93 return (TRUE); 93 94 } … … 100 101 /* convert from internal to requested external format */ 101 102 ImageToFtable (&db[0].ftable, &db[0].theader, db[0].format); 102 db[0].swapped = FALSE; 103 db[0].nativeOrder = FALSE; 104 db[0].scaledValue = FALSE; 103 105 104 106 /* write data in appropriate mode */ … … 149 151 /* theader is modified to match output format */ 150 152 ImageToVtable (&db[0].vtable, &db[0].theader, db[0].format); 151 db[0].swapped = FALSE; 153 db[0].scaledValue = FALSE; 154 db[0].nativeOrder = FALSE; 152 155 153 156 /* write data in appropriate mode */ … … 363 366 364 367 /* return internal structure representation */ 365 Image *gfits_table_get_Image (FTable *ftable, off_t *Ndata, char *s wapped) {368 Image *gfits_table_get_Image (FTable *ftable, off_t *Ndata, char *scaledValue, char *nativeOrder) { 366 369 367 370 int Ncols; … … 377 380 data = (Image *) ftable[0].buffer; 378 381 379 if (!swapped) { 380 myAbort ("invalid to call this without suppying 'swapped'"); 381 } 382 if (*swapped == FALSE) { 383 myAbort ("invalid for table to be swapped"); 382 if (!scaledValue) { 383 myAbort ("invalid to call this without suppying 'scaledValue'"); 384 } 385 if (*scaledValue == FALSE) { 386 myAbort ("invalid for table NOT to be scaledValue"); 387 } 388 if (!nativeOrder) { 389 myAbort ("invalid to call this without suppying 'nativeOrder'"); 390 } 391 if (*nativeOrder == FALSE) { 392 myAbort ("invalid for table NOT to be nativeOrder"); 384 393 } 385 394 -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_image_raw.c
r37807 r38344 107 107 db[0].theader.Naxis[1] = Nimage; 108 108 db[0].ftable.datasize = gfits_data_size (&db[0].theader); 109 db[0].swapped = FALSE; /* table does not have internal byte-order */ 109 110 db[0].nativeOrder = FALSE; /* table does not have internal byte-order */ 111 db[0].scaledValue = FALSE; /* table does not have internal byte-order */ 110 112 return (TRUE); 111 113 } -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_util.c
r37807 r38344 127 127 } 128 128 129 dvoConfig->images = gfits_table_get_Image (&dvoConfig->imageDB.ftable, &dvoConfig->nImages, &dvoConfig->imageDB.s wapped);129 dvoConfig->images = gfits_table_get_Image (&dvoConfig->imageDB.ftable, &dvoConfig->nImages, &dvoConfig->imageDB.scaledValue, &dvoConfig->imageDB.nativeOrder); 130 130 if (!dvoConfig->images) { 131 131 fprintf (stderr, "problem loading images\n"); -
branches/eam_branches/ohana.20150429/src/libdvo/src/fits_db.c
r35755 r38344 6 6 db[0].f = NULL; 7 7 db[0].filename = NULL; 8 db[0].dbstate = 0; 9 db[0].lockstate = 0; 10 db[0].mode = 0; 11 db[0].format = 0; 12 db[0].virtual = 0; 13 db[0].nativeOrder = 0; 14 db[0].scaledValue = 0; 8 15 9 # if (1)10 16 gfits_init_header (&db->header); 11 17 gfits_init_matrix (&db->matrix); 12 18 gfits_init_header (&db->theader); 13 gfits_init_table (&db->ftable);19 gfits_init_table (&db->ftable); 14 20 db->ftable.header = &db->theader; 15 21 gfits_init_vtable (&db->vtable); 16 # else17 db[0].header.buffer = NULL;18 db[0].matrix.buffer = NULL;19 db[0].theader.buffer = NULL;20 db[0].ftable.buffer = NULL;21 db[0].ftable.header = &db[0].theader;22 db[0].vtable.header = NULL;23 db[0].vtable.buffer = NULL;24 db[0].vtable.row = NULL;25 # endif26 22 return (TRUE); 27 23 } … … 97 93 return (FALSE); 98 94 } 99 db[0].swapped = FALSE; /* table does not have internal byte-order */ 95 db[0].nativeOrder = FALSE; /* table does not have internal byte-order */ 96 db[0].scaledValue = FALSE; /* table has not been scaled by BZERO,BSCALE */ 100 97 return (TRUE); 101 98 } -
branches/eam_branches/ohana.20150429/src/libdvo/src/flatcorr_io.c
r37807 r38344 49 49 return (NULL); 50 50 } 51 flatcorrTable->image = gfits_table_get_FlatCorrectionImage (&ftable, &flatcorrTable->Nimage, NULL );51 flatcorrTable->image = gfits_table_get_FlatCorrectionImage (&ftable, &flatcorrTable->Nimage, NULL, NULL); 52 52 if (!flatcorrTable->image) { 53 53 fprintf (stderr, "ERROR: failed to read Flat Correction Images\n"); … … 64 64 return (NULL); 65 65 } 66 flatcorrTable->corr = gfits_table_get_FlatCorrection (&ftable, &flatcorrTable->Ncorr, NULL );66 flatcorrTable->corr = gfits_table_get_FlatCorrection (&ftable, &flatcorrTable->Ncorr, NULL, NULL); 67 67 if (!flatcorrTable->corr) { 68 68 fprintf (stderr, "ERROR: failed to read Flat Corrections\n"); -
branches/eam_branches/ohana.20150429/src/libdvo/src/skyregion_io.c
r36833 r38344 40 40 ALLOCATE (skytable, SkyTable, 1); 41 41 memset (skytable->hosts, 0, 80); 42 skytable[0].regions = gfits_table_get_SkyRegion (&ftable, &skytable[0].Nregions, NULL );42 skytable[0].regions = gfits_table_get_SkyRegion (&ftable, &skytable[0].Nregions, NULL, NULL); 43 43 if (!skytable[0].regions) { 44 44 fprintf (stderr, "ERROR: failed to read sky regions\n"); -
branches/eam_branches/ohana.20150429/src/markstar/src/find_images.c
r29001 r38344 25 25 } 26 26 27 timage = gfits_table_get_Image (&db[0].ftable, &Ntimage, &db[0].s wapped);27 timage = gfits_table_get_Image (&db[0].ftable, &Ntimage, &db[0].scaledValue, &db[0].nativeOrder); 28 28 if (!timage) { 29 29 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/mosastro/src/rfits.c
r29001 r38344 31 31 32 32 off_t Nstars; 33 stars = gfits_table_get_SMPData (&table, &Nstars, NULL );33 stars = gfits_table_get_SMPData (&table, &Nstars, NULL, NULL); 34 34 if (!stars) { 35 35 fprintf (stderr, "ERROR: failed to read stars\n"); -
branches/eam_branches/ohana.20150429/src/opihi/dvo/cmpReadFile.c
r29001 r38344 19 19 if (!gfits_fread_ftable (f, &table, "SMPFILE")) goto escape; 20 20 21 smpdata = gfits_table_get_SMPData (&table, &Nstars, NULL );21 smpdata = gfits_table_get_SMPData (&table, &Nstars, NULL, NULL); 22 22 if (!smpdata) { 23 23 fprintf (stderr, "ERROR: failed to read stars\n"); -
branches/eam_branches/ohana.20150429/src/photdbc/src/copy_images.c
r37807 r38344 46 46 dvo_image_create (&out, ZERO_POINT); 47 47 48 image = gfits_table_get_Image (&in.ftable, &Nimage, &in.s wapped);48 image = gfits_table_get_Image (&in.ftable, &Nimage, &in.scaledValue, &in.nativeOrder); 49 49 if (!image) { 50 50 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/photdbc/src/find_images.c
r37807 r38344 24 24 tcoords.cdelt1 = tcoords.cdelt2 = 1.0 / 3600.0; 25 25 26 timage = gfits_table_get_Image (&db[0].ftable, &Ntimage, &db[0].s wapped);26 timage = gfits_table_get_Image (&db[0].ftable, &Ntimage, &db[0].scaledValue, &db[0].nativeOrder); 27 27 if (!timage) { 28 28 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/photdbc/src/flag_measures.c
r29001 r38344 15 15 if (VERBOSE) fprintf (stderr, "flagging bad measurements\n"); 16 16 17 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);17 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 18 18 if (!image) { 19 19 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/relastro/src/ImageTable.c
r36630 r38344 27 27 // convert database table to internal structure (binary to Image) 28 28 // 'image' points to the same memory as db->ftable->buffer 29 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);29 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 30 30 if (!image) { 31 31 Shutdown ("ERROR: failed to read images"); -
branches/eam_branches/ohana.20150429/src/relastro/src/assign_images.c
r37807 r38344 11 11 // convert database table to internal structure (binary to Image) 12 12 // 'image' points to the same memory as db->ftable->buffer 13 Image *image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);13 Image *image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 14 14 if (!image) { 15 15 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/relastro/src/load_images.c
r37807 r38344 16 16 17 17 // convert database table to internal structure 18 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);18 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 19 19 if (!image) { 20 20 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/relphot/src/ImageTable.c
r37807 r38344 27 27 // convert database table to internal structure (binary to Image) 28 28 // 'image' points to the same memory as db->ftable->buffer 29 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);29 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 30 30 if (!image) { 31 31 Shutdown ("ERROR: failed to read images"); -
branches/eam_branches/ohana.20150429/src/relphot/src/assign_images.c
r37807 r38344 11 11 // convert database table to internal structure (binary to Image) 12 12 // 'image' points to the same memory as db->ftable->buffer 13 Image *image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);13 Image *image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 14 14 if (!image) { 15 15 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/relphot/src/load_images.c
r37807 r38344 21 21 // convert database table to internal structure (binary to Image) 22 22 // 'image' points to the same memory as db->ftable->buffer 23 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);23 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 24 24 if (!image) { 25 25 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/relphot/src/relphot_images.c
r37037 r38344 185 185 // convert database table to internal structure (binary to Image) 186 186 // 'image' points to the same memory as db->ftable->buffer 187 image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);187 image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 188 188 if (!image) { 189 189 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/uniphot/src/find_image_sgroups.c
r37807 r38344 12 12 13 13 imlink = *Imlink; 14 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);14 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 15 15 if (!image) { 16 16 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/uniphot/src/find_image_tgroups.c
r31160 r38344 11 11 ImageLink *imlink; 12 12 13 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);13 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 14 14 if (!image) { 15 15 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/uniphot/src/load_images.c
r33654 r38344 21 21 22 22 /* use a vtable to keep the images to be calibrated */ 23 image = gfits_table_get_Image (&db[0].ftable, Nimage, &db[0].s wapped);23 image = gfits_table_get_Image (&db[0].ftable, Nimage, &db[0].scaledValue, &db[0].nativeOrder); 24 24 if (!image) { 25 25 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/uniphot/src/load_images_fiximids.c
r37043 r38344 20 20 21 21 /* use a vtable to keep the images to be calibrated */ 22 image = gfits_table_get_Image (&db[0].ftable, Nimage_load, &db[0].s wapped);22 image = gfits_table_get_Image (&db[0].ftable, Nimage_load, &db[0].scaledValue, &db[0].nativeOrder); 23 23 if (!image) { 24 24 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/uniphot/src/load_images_fixstkids.c
r37043 r38344 19 19 20 20 /* use a vtable to keep the images to be calibrated */ 21 image = gfits_table_get_Image (&db[0].ftable, Nimage_load, &db[0].s wapped);21 image = gfits_table_get_Image (&db[0].ftable, Nimage_load, &db[0].scaledValue, &db[0].nativeOrder); 22 22 if (!image) { 23 23 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/uniphot/src/load_images_setphot.c
r33654 r38344 11 11 12 12 /* use a vtable to keep the images to be calibrated */ 13 image = gfits_table_get_Image (&db[0].ftable, Nimage, &db[0].s wapped);13 image = gfits_table_get_Image (&db[0].ftable, Nimage, &db[0].scaledValue, &db[0].nativeOrder); 14 14 if (!image) { 15 15 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/uniphot/src/load_images_setposangle.c
r34749 r38344 19 19 20 20 /* use a vtable to keep the images to be calibrated */ 21 image = gfits_table_get_Image (&db[0].ftable, Nimage, &db[0].s wapped);21 image = gfits_table_get_Image (&db[0].ftable, Nimage, &db[0].scaledValue, &db[0].nativeOrder); 22 22 if (!image) { 23 23 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/uniphot/src/subset_images.c
r31160 r38344 8 8 9 9 // convert from the binary I/O format to the internal structure (Image) 10 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);10 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 11 11 if (!image) { 12 12 fprintf (stderr, "ERROR: failed to read images\n"); -
branches/eam_branches/ohana.20150429/src/uniphot/src/update_dvo_uniphot.c
r37807 r38344 14 14 Coords coords; 15 15 16 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);16 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 17 17 if (!image) { 18 18 fprintf (stderr, "ERROR: failed to read images\n");
Note:
See TracChangeset
for help on using the changeset viewer.
