Adds capability to read and write grid data to HDF5.#235
Merged
allegroLeiden merged 5 commits intolime-rt:masterfrom Jun 9, 2017
Merged
Adds capability to read and write grid data to HDF5.#235allegroLeiden merged 5 commits intolime-rt:masterfrom
allegroLeiden merged 5 commits intolime-rt:masterfrom
Conversation
- countDensityCols() no longer accepts a file pointer argument. - par->collPartNames is now sent to writeGrid() and the names are thus written to file. - In writeKeywordsToFITS() and readKeywordsFromFITS(), the file pointer argument is now of type fitsfile* rather than lime_fptr*. - In readGridExtFromFITS(), the count of ABUNMOL columns has been moved back to just before the columns are read, since its value is no longer being used to malloc the grid .mol pointer. - In readGridExtFromFITS(), status is now set to 0 before the COLLPARn keywords are read. This prevents the 'column not found' value set by the previous attempt to read a B_FIELDn column from triggering FITS error reporting. - Extra defines added to grid2fits.h. - The way that grid2fits.h is imported has been changed. - In initializeKeyword(), character pointers keyname, comment and charValue are now malloc'd rather than set to NULL. Functions freeKeywords() and freeKeyword() have been added to gridio.c to free up this memory again. - Everywhere in gridio.c 'lime_fptr *fptr' has been replaced by 'lime_fptr fptr', and the definition of lime_fptr has been adjusted accordingly.
- I added -DH5_NO_DEPRECATED_SYMBOLS to the compile commands to force macros such as H5Dcreate map to H5Dcreate2 and not H5Dcreate1. - Added -Wformat -Wformat-security to the compiler flags invoked with the test switch. - Fixed 3 or 4 formatting bugs.
Contributor
|
I'm afraid I won't have time to go through all 2000+ lines of new code... However, your truly Stakhanovite effort is highly appreciated. Is there a specific reason why you're not using a Makefile switch for selecting the file format? It might also be better to set the default to using just fits. Not all systems have HDF5 libraries installed. |
Contributor
Author
|
Thanks for the kudos. :) No, I was going to add a Makefile switch before I merged. It was pure laziness not to do so before. Point about fits/hdf5 also well taken. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously the only file format available has been FITS. Now HDF5 can be selected. Currently this must be done by hand via commenting/uncommenting appropriate lines of gridio.h. Better would be to do it via a Makefile switch.