Skip to content

Releases: nom-tam-fits/nom-tam-fits

1.20.1

01 Sep 09:21
43dc4f1
Compare
Choose a tag to compare

Bug fix release

Fixed

Added

  • [#657] Added ESOExt enum with ESO-specific standard FITS keywords, and CommonExt for commonly used keywords in the amateur astronomy community. (by @attipaci)

  • [#657] Added more standard keywords to CXCEXt, STScIExt, MaxImDLExt, and SBFitsExt dictionaries based on the available documentation online. (by @attipaci)

  • [#657] Additional keyword synonyms in Synonyms enum. (by @attipaci)

Changed

  • [#657] Updated comment fields and Javadoc for many extension keywords in the nom.tam.fits.header.extra package. (by @attipaci)

  • [#665] Keep original comments for mandatory keywords when writing headers that were previously read from an input. (by @attipaci)

  • [#665] CHECKSUM and DATASUM comments now store timestamp when checksums were calculated, as is the recommended practice by the checksumming standard. (by @attipaci)

  • [#672] Switched to markdown keep a changelog.

  • Do not generate reports that have very little use. (by @attipaci)

  • Uses the latest maven build and runtime dependencies. (by @attipaci)

1.20.0

10 Jun 08:33
df39955
Compare
Choose a tag to compare

This release packs a slew of new features, and provides a some important bug fixes also.

Known Issues

  • #636 -- A newly introduced bug in this release results in the loss of column names when compressing tables (reported by @keastrid). As such it somewhat spoils an otherwise very strong release. Will fix for 1.20.1. The fix is also available on the master branch at 5216861. Sorry for the mishap.

Fixed

  • #596 -- Botched compression of multicolumn tables, resulting in extra rows in the compressed table (as many rows as there were total table tiles across all columns). Bug reported by @keastrid.

  • #610 -- Standard.TNULLn keyword can take any value type (was previously restricted to strings only).

  • #621 -- MultiArrayIterator fixes to size() and deepComponentType() methods.

Added

  • #586 -- Default column names. Some tools, including (C)FITSIO have issues dealing with table columns that have no CTYPEn keywords set to define column names. Therefore to enhance interoperability we will use 'Column N' type naming, until the user sets a column name otherwise.

  • #592 -- ImageData now supports complex valued images as per the FITS specification, both when constructed programatically from ComplexValue[]... data; or if so described with an image axis whose CTYPEn header value is 'COMPLEX' and the axis contains 2 components (so long as the complex axis is either the first or last axis). The latter is true even if integer representation is used in the FITS, e.g. via a quantization. When reading complex valued images, the native ImageData is that of the stored type (e.g. float[]..[2] or float[2]..[]) for compatibility, but ImageData.convertTo(ComplexValue.class) or .convertTo(ComplexValue.Float.class) can convert these to be true complex valued images in a second step after reading. (You may also use ImageData.isComplexValued() to check if the data were designated as complex-valued at origination, by the FITS header or the constructor.)

  • #611 - New Quantizer class to handle generic decimal-integer conversions in line with the FITS specification for integer representation of floating-point data. The new class will interpret the necessary header keywords for both images and tables, and can fill the required values in FITS headers.

  • #611 -- ImageData.setQuantizer() / .getQuantizer() and BinaryTable.ColumnDesc.setQuantizer() / .getQuantizer() methods to access the quantizers that handle decimal-integer conversions for images and binary table columns, respectively.

  • #610 -- ImageData.convertTo(Class type) will return the equivalent image data with another storage type (but otherwise the same as the original image). Any decimal-integer conversion is handled by the image's own quantizer (which is either specified in the image header or else set by the user) if it is available.

  • #610 -- New BinaryTable.getArrayElement(row, col) and .getArrayElementAs(int row, int col, Class asType) methods to return the table element as an array always (without the boxing of scalar entries). The former is similar to the original .getElement() method except that it represents FITS logicals as Boolean[]..., bits as boolean[]..., and complex values a ComplexValue[]... arrays. The second form allows accessing numerical table elements as arrays of a desired other numerical type.

  • #610 -- ArrayFuncs.convertArray(Object array, Class newType, Quantizer quant) method provides generic conversions to numerical type arrays, including ComplexValue type arrays, and can be used for explicit quantization conversions outside of images and table columns.

  • #619 -- New ArrayFuncs.sample() and .slice() methods, to provide generic support for obtaining slices and samplings from arrays in one or more dimensions, with the option of reversed order sampling along selected axes. (Suggested by @at88mph)

Changed

  • #590 -- Removed Main class, and main() entry points from JAR, which also clears up a whole lot of junk being added to the classpath into MANIFEST.MF. (Suggested by @bogdanni)

  • #592 -- ArrayFuncs.convertArray(Object, Class) is now the same as the new ArrayFuncs.convertArray(Object, Class, Quantizer) method without a quantizer, and thus allows conversions to/from complex valued data also, when primitive arrays have a trailing dimension of 2 (e.g. float[]..[2] or int[]..[2]).

  • #609 -- MultiArrayCopier.copyInto() now rounds floating point values before casting to integer types for a more regular behavior.

  • #611 -- BinaryTable.getDouble(...), .getLong(...) and .set(...) methods will now use the specified quantization (as specified in the header or else set explicitly by the user) when converting from decimal to integer types and vice-versa.

  • #620 -- Updated github.io landing page with history and partial listing of software that uses nom-tam-fits.

  • #620 -- Fix up POM to cure various build warnings, and allow Google Analytics for online Javadoc.

  • #623 -- Fix up test code to use latest nanohttpd-webserver for unit testing.

  • Updated User's Guide README.md.

  • Uses the latest maven build and runtime dependencies.

1.20.0-rc1

30 Apr 08:13
05c355a
Compare
Choose a tag to compare
1.20.0-rc1 Pre-release
Pre-release

This is an early release candidate for the upcoming 1.20.0 release (expected around 15 June 2024).

Fixed

  • #596 -- Botched compression of multicolumn tables, resulting in extra rows in the compressed table (as many rows as there were total table tiles across all columns).

  • #610 -- Standard.TNULLn keyword can take any argument type (was previously restricted to strings only).

Added

  • #586 -- Default column names. Some tools, including (C)FITSIO have issues dealing with table columns that have no CTYPEn keywords set to define column names. Therefore to enhance interoperability we will use 'Column N' type naming, until the user sets a column name otherwise.

  • #611 - New Quantizer class to handle generic decimal-integer conversions in line with the FITS specification for integer representation of floating-point data. The new class will interpret the necessary header keywords for both images and tables, and can fill the required values in FITS headers.

  • #611 -- ImageData.setQuantizer() / .getQuantizer() and BinaryTable.ColumnDesc.setQuantizer() / .getQuantizer() methods to access the quantizers that handle decimal-integer conversions for images and binary table columns, respectively.

  • #610 -- ImageData.convertTo(Class type) will return the equivalent image data with another storage type (but otherwise the same as the original image). Any decimal-integer conversion is handled by the image's own quantizer (which is either specified in the image header or else set by the user) if it is available.

  • #610 -- BinaryTable.getArrayElementAs(int row, int col, Class asType) method to allow accessing numerical table elements as arrays of a desired other numerical type.

  • #610 -- ArrayFuncs.convertArray(Object array, Class newType, Quantizer quant) method provides generic conversions to numerical type arrays, including ComplexValue type arrays, and can be used for explicit quantization conversions outside of images and table columns.

  • #592 -- ImageData now supports complex valued images, both when constructed programatically from ComplexValue[]... data; or if so described with an image axis whose CTYPEn header value is 'COMPLEX' and the axis contains 2 components (so long as the complex axis is either the first or last axis). The latter is true even if integer representation is used in the FITS, e.g. via a quantization. When reading complex valued images, the native ImageData is that of the stored type (e.g. float[]..[2] or float[2]..[]) for compatibility, but ImageData.convertTo(ComplexValue.class) or .convertTo(ComplexValue.Float.class) can convert these to be true complex valued images in a second step after reading. (You may also use ImageData.isComplexValued() to check if the data were designated as complex-valued at origination, by the FITS header or the constructor.)

Changed

  • #590 -- Removed Main class, and main() entry points from JAR, which also clears up a whole lot of junk being added to the classpath into MANIFEST.MF.

  • #610 -- BinaryTable.getArrayElement(row, col) method to return the table element as an array always (without the boxing of scalar entries), similarly to the original .getElement() method except representing FITS logicals as Boolean[]..., FITS bits as boolean[]..., and complex values a ComplexValue[]... arrays.

  • #592 -- ArrayFuncs.convertArray(Object, Class) is now the same as the new ArrayFuncs.convertArray(Object, Class, Quantizer) method without a quantizer, and thus allows conversions to/from complex valued data also, when primitive arrays have a trailing dimension of 2 (e.g. float[]..[2] or int[]..[2]).

  • #609 -- MultiArrayCopier.copyInto() now rounds floating point values before casting to integer types for a more regular behavior.

  • #611 -- BinaryTable.getDouble(...), .getLong(...) and .set(...) methods will now use the specified quantization (as specified in the header or else set explicitly by the user) when converting from decimal to integer types and vice-versa.

  • Updated User's Guide README.md.

  • Uses the latest maven build and runtime dependencies.

1.19.1

22 Mar 08:59
4255c25
Compare
Choose a tag to compare

Bug fix release, with improved support for compressed tables, among other things.

Known Issues

  • #596 -- Botched compression of tables with multiple columns.

Fixed

  • #562 -- Compressed tables had the ZCTYPn keywords written with a 0-based index, and thus were off-by-one in
    the FITS convention. Now fixed.
  • #552 -- Fix inconsistently maintained ColumnDesc.fileSize, by replacing it with dynamic .rowLen().
  • #557 -- Fix the compression of variable-length table columns. These were completely off-spec in prior releases,
    but are now properly supported as per the (C)FITSIO convention, which is slightly deviating from the
    documented standard. However, based on private communication with the maintainers, they are inclined
    to resolve this discrepancy by updating the standard to match the (C)FITSIO implementation, and therefore
    we adopt the (C)FITSIO way also for compressing tables. Nevertheless, we provide the static
    CompressedTableHDU.useOldStandardIndexing(boolean) method to allow reading compressed VLA columns
    produced in the other way also (i.e as the current standard actually describes it). Note, that our VLA
    compression support is now much better than that of (C)FITSIO, whose current release contains multiple
    severe bugs in that regard.
  • #570 -- Fix potential narrowing conversion issues uncovered by GitHub's CodeQL.
  • #576 -- Eliminate unexpected exception thrown if trying to write an empty table to a file/stream. Now it works as
    expected.
  • #578 -- Check setting elements in ColumnTable more consistently to avoid creating corrupted FITS tables.
  • #580 -- Fix ArrayIndexOutOfBoundsException when defragmenting larger heaps.

Added

  • #558 -- Find header cards with regex pattern matching with Header.findCards().
  • #563 -- Added support for optionless Rice and HCOMPRESS compression, using the default option values as per
    the FITS standard. As a result RICE_1 can now be used for compressing integer-type binary table
    columns.
  • #575 -- Added support for reserving space in FITS files for future additions to binary tables in situ
    without disturbing the rest of the FITS file. Space for extra table rows can be reserved via
    BinaryTable.reserveRowSpace(int), while additional heap space for VLA additions / updates can be
    set aside by BinaryTable.reserveHeapSpace(int) prior to writing the table to a file. Note, however
    that (C)FITSIO may not be able to read files with reserved row space due to its lack of support for
    the standard THEAP keyword.

Changed

  • #563 -- Creating compressed tables now also checks that the requested compression algorithms are in fact
    suitable for table compression, or else throws an IllegalArgumentException. (Currently, only the lossless
    GZIP_1, GZIP_2, RICE_1, and NOCOMPRESS are allowed by the FITS standard for tables.)
  • #567 -- The parallel table compression has previously resulted in a heap with irreproducible random ordering.
    Now, the compressed heap is ordered consistently for optimal sequential read performance.
  • #571 -- From here on we'll omit writing the THEAP keyword into binary table headers when they are not necessary
    (that is when the heap follows immediately after the main table). This allows better interoperability
    with (C)FITSIO, which currently lacks proper support for this standard FITS keyword.
  • #582 -- Support heaps up to 2 GB (previously they were limited to 1 GB max).
  • Uses the latest maven build and runtime dependencies.

1.19.0

19 Jan 17:09
Compare
Choose a tag to compare

This is another big release of the nom.tam.fits library, packing many new features and enhancements, as well as some bug fixes and continued work on cleaning up the API to provide an improved and more intuitive user experience.

Bugs Fixed

  • #496 -- Workaround for handling read-only FITS files on Windows network shares.
  • #531 -- Keywords with hyphens in STScIExt had the wrong form previously.
  • #532 -- Small fixes to HashedList handling iterator access corner cases.
  • #535 -- Binary table NAXIS1 value was sometimes stored as a string.

New features

  • #488 -- New targeted Data and HDU creation from Java objects via new Data+.from(Object) and Data+.toHDU() methods, replacing the now deprecated and unsafe ...HDU.encapsulate(Object) methods.
  • #489 -- New Header.mergeDistinct(Header) method to help with the migration of entries from one FITS header to another.
  • #490 -- New inspection methods for UndefinedData class, to easily retrieve XTENSION type, BITPIX, and data size/shape information from HDUs containing unsupported data types.
  • #492 -- New access methods to parameters stored in RandomGroupsHDU types, according to the FITS specification.
  • #494 -- A better way to control how FITS I10 type columns are treated in ASCII tables, via static AsciiTable.setI10PreferInt(boolean) and .isI10PreferInt() methods.
  • #520 -- New methods to make the decompression of selected CompressedTableHDU tiles even easier (and safer) to use.
  • #531 -- New WCS and DateTime enums with an enumeration of all standard FITS WCS and date-time related keywords, and recognized values (constants). The WCS enums support alternate coordinate systems via the WCS.alt(char) method. For example to generate the "CTYPE1A" standard keywords you may call WCS.CTYPEna.alt('A').n(1).
  • #532 -- Support for INHERIT keyword via new Fits.getCompleteHeader(...) methods. These methods will populate the mandatory FITS header keywords in the the selected HDU, and return the updated header or else a new header composed of both the explicitly defined keywords in the selected HDU and the inherited (non-conflicting) keywords from the primary HDU.
  • #534 -- Adding standardized (IFitsHeader) keywords to HDU headers will now check that the keyword can be used with the associated HDU type (if any), and may throw an IllegalArgumentException if the usage is inappropriate. The type of checks (if any) can be adjusted via the new Header.setKeywordChecking() and/or the static Header.setDefaultKeywordChecking() methods.
  • #534 -- Setting values for HeaderCards with standardized (IFitsHeader) keywords now checks that the assigned value is compatible for the given keyword, and may throw an appropriate exception (such as a newly added ValueTypeException), or else log a warning message depending on the current value checking policy. The policy can be adjusted via the new static HeaderCard.setValueCheckPolicy() method.
  • #538 -- New FitsKey class to replace the poorly named FitsHeaderImpl. (The latter class continues to exist in deprecated form for compatibility). Added new functionality.
  • #538 -- New Standard.match(String) method to match a specific keyword instance to a keyword template of the FITS standard, such as "CTYPE1A" to WCS.CTYPEna.

API changes

  • #519 -- Demoted FitsException to be a soft exception, extending IllegalStateException. As a result, users are no longer required to catch these, or its derivatives such as HeaderCardException. Some methods that have previously thrown IllegalStateException may now throw a FitsException, in a fully backwards compatible way.
  • #519 -- Deprecated IHeaderAccess interface and its implementations. These were meant for internal use anyway, and with HeaderCardException now being a soft exception these classes just add confusion without providing any functionality that isn't readily available without them.
  • #518 -- The constructor of PaddingException does not throw a FitsException, and FitsCheckSum.Checksum also does not throw an IllegalArgumentException -- so they are now declared as such. Some related Javadoc updates.
  • #531 -- Synonyms has been extended to enumerate all synonymous WCS keys also.
  • #531 -- IFitsHeader.n(int...) now checks that the supplied indices are in the 0-999 range, or else throw an IndexOutOfBoundsException. If too many indices are supplied it will throw a NoSuchElementException. And, if the resulting indexed keyword exceeds the 8-byte limit of standard FITS keywords it will throw an IllegalStateException.
  • #531 -- Attempting to create a HeaderCard with a standard keyword that has unfilled indices will throw an IllegalArgumentException.

Other changes

  • #525 -- Improvements to AsciiTable with addColumn() argument checking and more specific documentation.
  • CompressedImageHDU.getTileHDU() now updates CRPIXna keywords also in the alternate coordinate systems (if present) for the selected cutout image.
  • #531 -- Added impl() method to IFitsHeader interface with a default implementation to eliminate code that was duplicated many times over across enums.
  • #538 -- Corrections to standard keyword sources, deprecations, synonyms, comments, and associated Javadoc.
  • Deprecated more classes/methods, which now have better alternatives. The deprecated methods will be supported nevertheless until version 2.0.
  • Fully revised README (User's guide), with better organization, new sections, further clarifications, and many corrections.
  • Change from unmaintained findbugs build dep to spotbugs successor.
  • The latest maven build and runtime dependencies.

1.18.1

11 Sep 07:05
Compare
Choose a tag to compare

Bugs Fixed

  • #466 -- Fixes regression of reading ASCII tables by default (without explicitly setting FitsFactory.setUseAsciiTables(true)).

New features

  • #473 -- The checksum verification procedure was fundamentally flawed in prior releases. To correct it, added new Fits.verifyIntegrity(), BasicHDU.verifyIntegrity() and BasicHDU.verifyDataIntegrity() methods to properly verify checksums for FITS files and streams. Several existing but misconceived (useless) checksum-related methods have been deprecated and should be avoided going forward. Updated README for checksum verification procedures.
  • #476 -- FitsInputStream to calculate checksums for all bytes that are read/skipped, allowing checksum verification for stream-based inputs also.
  • #475 -- Added Header.getCard(...) methods similar to exsiting Header.findCard(...) but without affecting the position at which new cards are added to the header. These new methods are now widely used internally when interpreting headers to avoid unexpectedly changing the position at which new user entries are added. New method Header.prevCard() to complement existing Header.nextCard(), and new Header.seekHead() / .seekTail() methods to set the position for new additions at the head or tail of the header space. The new methods add more control and flexibility to header editing and reduce unwanted surprises.

Other changes

  • #472 -- New github icons and profile images.
  • The latest maven build and runtime dependencies.

1.18.0

24 Jul 08:10
Compare
Choose a tag to compare

Summary

This is a big feature release, fixing tile compression and many issues with binary tables, packing several cool new features, and numerous improvements. Many thanks to Dustin Jenkins and Kevin Eastridge for their contributions to making this the best nom-tam-fits yet.

Bugs Fixed

  • #349 -- Tiled GZIP (de)compression of quantized images now works!
  • #377 -- Use of ZDITHER0 keyword to store or restore the random generator seed when dithering is used in compression or decompression.
  • #436 -- Fixed incorrect handling of CONTINUE keywords with no quoted string value (a regression since 1.16).
  • #438 -- Conversion of variable length float[] or double[] arrays to complex was broken since inception. Now it works for the first time as expected.
  • #455 -- Fixed incorrect variable-length complex array descriptors in binary tables.
  • #445 -- Consistent String return for both fixed and variable-length string columns in binary tables.
  • #456 -- Fixed compressed table tiling with tile sizes that do not divide the table rows.

New features

  • #387 -- Can generate sparsely sampled tiles from large images via new striding feature.
  • #356 and #400 -- Streaming of selected cutouts from large images, including from compressed images.
  • #352 -- Alternative random access implementations via RandomAccessIO, providing file-like access e.g. to cloud resources (such as Amazon S3)
  • #335 -- New NullData and NullDataHDU classes for more intuitive creation of HDUs with headers only, such as dummy primary HDUs before extensions.
  • #183 -- Added support for ComplexValue-based column in binary tables.
  • #450 -- Added support for bit-based columns (FITS type X) in binary tables.
  • #451 -- Added support for null (undefined) logical values for FITS logical columns in binary tables.
  • #448 -- More user-friendly data access in BinaryTable, using Java boxing for scalar primitive elements, and automatic type conversion (both narrowing and widening) for singleton values when possible. Many new BinaryTable methods to make it easier to build and use binary tables.
  • #437 -- Binary table access and editing directly in file, when getting or setting table elements in deferred-read mode.
  • #453 -- Allow defragmenting binary table heaps to expunge stale data, and to optimize heap area for best sequential read performance.
  • #452 -- Simplified access to select tiles / regions of compressed data in both tile compressed tables and images.

Improvements

  • #414 -- Significantly improved IO performance, especially for images. Image HDUs now read/write 2.5x -- 4x faster than in earlier versions, and read a whopping 25x -- 50x faster from streams than in 1.15.2.
  • #407 -- Improved dithering speed, by calculating random sequence only once when needed, and doing it more efficiently.
  • #441 -- Significantly faster table data access and row additions.
  • #447 -- Check data consistency when adding or setting data in binary tables.
  • #454 -- Do not use ASCII NUL (0x00) for padding between string array elements in binary tables, since it violates the FITS standard (according to which an ASCII NUL terminates the complete string array entry).
  • #131 -- Tables now support up to ~2-billion (Integer.MAX_VALUE) rows regardless of entry size.
  • #207 -- Unified deferred read for all Data implementations. This brings deferred reading to AsciiTable, RandomGroups, and UndefinedData classes for the first time.
  • #395 -- Consistent behavior of all Data subclasses. Because they has subtle differences in the past, the change may break some applications, although it's more likely that the gained uniformity will eliminate sneaky bugs that may have lurked in any affected applications.
  • #426 -- No longer exposing critical internal arrays to users, giving them copies instead, which can be modified without breaking functionality of the library.
  • #435 -- Header access methods in BasicHDU no longer remove significant leading spaces from strings to better conform to FITS specification.
  • #394 -- Overhauled FitsDate to make it simpler and better, without changing functionality.
  • #424 -- Consistent source code formatting etc.

API changes

  • #446 -- Disable automatic (and inconsistent) detection of complex binary table data, when adding real-valued data columns to a binary table. Users should call BinaryTable.setComplexColumn() explicitly if pairwise real values should be converted to complex.
  • #434 -- Stop the automatic creation of random group HDUs from compatible table data. Instead create binary or ASCII tables as appropriate given the FitsFactory settings. The FITS standard discourages the use of random group HDUs going forward, and support should be typically limited to dealing with some older existing data files in that format. If there is ever a need to create new random group HDUs, you can do it explicitly via RandomGroupsHDU.createFrom(Object[][]).
  • #209 -- Deprecated FitsUtil.reposition() and changed argument type to FitsIO, which is more appropriate for its use.
  • #420 -- Revised PaddingException API and seamless internal handling.
  • #336 -- Deprecated a number of unsafe methods that should be used internally only (if at all). These should never have been exposed to users in the first place.
  • #425 -- Deprecated the use of hexadecimal values in headers. FITS does not support these, and you should not use them.
  • #430 -- Deprecated BigInteger and BigDecimal values in headers. FITS does not support these, and you should not use them.
  • #429 -- Removed unnecessary IO synchronization from FitsFile, FitsInputStream, and FitsOutputStream classes.

Documentation

  • Fully revised README to provide an up-to-date introduction to the library's features, including more and better usage examples.
  • #427 -- Online and packaged API documentation is restricted to public classes and methods only, as appropriate for users who want to read/write FITS files. Classes and methods intended for internal use are clearly indicated when these are exposed in the public API. Contributors can still generate the full documentation locally if desired using maven.
  • #160 -- Completed API docs for classes and methods intended for users.

1.17.1

14 Mar 09:01
Compare
Choose a tag to compare

Summary

This is a critical bug fix release for nom-tam-fits 1.17.0. If you are using 1.17.0, you should update your library as soon as possible to correct some potentially severe issues with the functionality.

Bugs fixed

  • #368: [CRITICAL] Corrupted FITS files if the first HDU is a dummy header-only HDU with no associated data. (Affects 1.17.0 only.)
  • #367: [CRITICAL] Incorrect checksums calculated directly from files (for HDUs whose data is not in memory) in multi-HDU FITS files. (Affects 1.17.0 only.)
  • #341: Occasional NullPointerException when generating compressed FITS files. (Affects all prior releases with compression support.)

Improvements

  • #372: Improved documentation for FITS constructors, clarifying that all constructors create empty FITS containers even if these are associated with an input. The containers may be populated by the user after creation either by reading all or selected data from the input, and/or by adding HDUs residing in memory.
  • #376: Restored coverage reporting to Coveralls.io as a fallback, since Codecov has been a little unreliable of late.
  • Various updates to API documentation.
  • Updated CI, and the latest maven dependancies via dependabot.

Known outstanding issues

  • #349: Problems with some quantized tile (de)compressions, e.g. when GZIP is used. (Will fix for 1.18.0, expected 6/15/2023.)
  • #377: When using dithering, the ZDITHER0 header keyword is not used to record the random seed used for compression, or to seed the random generator for decompression. (Will fix for 1.18.0, expected 6/15/2023.)

nom-tam-fits-1.17.0

11 Sep 08:55
Compare
Choose a tag to compare

Summary

A feature release with bug fixes and long-anticipated enhancements. The update brings the following changes:

Bug fixes

  • Fixed always-broken tile compression of non-square images (see #318).

New features

  • Generalized tile compression for any-dimensional images based on the FITSIO convention (see #319).
  • Safe incremental HDU writing, which configures HDUs as primary automatically whenever these are written to the head of the output (file or stream), or as extension HDUs otherwise. As such, HDUs can be written directly to a FitsFile or FitsOutputStream, without having to add them to a Fits container object first (see #266).
  • User adjustable header comment alignment position, via Header.setCommentAlignPosition(int), and checking via .getCommentAlignPosition() (see #283).
  • New convenience methods to retrieve HDUs by name (and version): Fits.getHDU(String name) and Fits.getHDU(String name, int version) (see #145).
  • New checksumming methods: BasicHDU.calcChecksum(), .setChecksum(), .getStoredChecksum(), and .getStoredDataSum(); Data.calcChecksum(); Fits.calcChecksum(int), and .setChecksum(int) -- as well as an extended static API for the FitsCheckSum class. See #323, annd section on checksums in the README with examples.
  • Added Fits.rewrite() to simplify re-writing the entire Fits objects, e.g. after updating checksums. The implementation is efficient in that it skips data segments in deferred read mode. BasicHDU.rewrite() is modified to make it efficient also.
  • Added Data.isDeferred() method (defaulting to false) that can be used to check if a FITS Data object might be in deferred read mode, that is if it may not be fully loaded into RAM. Note, that while the method is properly implemented for the built-in data types of the library, it may not properly reflect the deferred status of external data implementations unless these override the method with something meaningful also.
  • New Header.getDuplicateKeySet() method to check which keywords have duplicates (see #292).

New FITS standard compliance checks

  • Replacing FITS keywords in existing header with standardized IFitsHeader keys checks if the new keyword is compatible with the existing value type, and logs a warning if not (see #292). (A future major release will likely implement a stronger check, by throwing an exception. However, for better compatibility with the 1.x releases, we remain tolerant to these violations for now.)
  • Creating HeaderCards with standardized IFitsHeader keys checks if the supplied value is compatible with the keywords, and logs a warning if not (see #292). (A future major release will likely implement a stronger check, by throwing an exception. However, for better compatibility with the 1.x releases, we remain tolerant to these violations for now.)

Changes

  • CompressedImageHDU.fromInageHDU() now defaults to tiling by row if tile size is not explicitly specified, as per FITS specification and also for consistent behavior in higher dimensions.
  • Simpler, faster, and more versatile FitsChecksum class, with support for incremental checksum updates, checksum retrieval, and checksum computations directly from files (see #323).
  • Fits.setChecksum(), .setChecksum(int), and .calcChecksum(int) compute checksum directly from the file, if possible, for deferred read data (i.e. data not currently loaded into RAM). This eliminates the need to keep potentially huge data volumes in RAM when computing or updating checksums in an existing FITS file.
  • Fits.setChecksum() will now checksum all HDUs , including those not already loaded from disk -- keeping data in deferred read mode if possible.
  • Checksum in-memory headers/data with less overhead through piped streams (see #328).
  • Suppress repeated logger warnings about the same duplicate header cards when reading (see #292).
  • Warnings about duplicate header keywords are now also controlled by Header.setParserWarningsEnabled(boolean) (see #311).
  • Simpler, more algorithmic header card ordering (see #292).

Build & Packaging

  • Update of POM dependencies via dependabot to the latest-greatest tools available.

nom-tam-fits-1.16.1

21 Mar 14:57
Compare
Choose a tag to compare

Summary

A regular quarterly maintenance and bug fix release for the version 1.16 of the nom.tam.fits library. The update brings the following changes:

Bug Fixes

  • The official 1.16.0 package broke strict Java 8 compatibility due to an older compiler compatibility flag in the POM, or when building with Java 9 or newer. The POM has been updated with the correct compiler compatibility options for Java 9+.
  • Fixes a potential unchecked null in BinaryTableHDU.

Code Improvements

  • Header.setLoggerWarningsEnabled(false) suppresses warning about duplicate header cards when reading also.
  • Added default method implementations for ArrayDataInput and ArrayDataOutput interfaces, making it a breeze to create custom implementations of these should anyone desire to do so.

Build & Packaging

  • Mostly automated the update of POM dependencies via dependabot. 1.16.1 will be built with the latest-greatest tools available.
  • Removed unneeded runtime dependency on javax.annotation-api. It's needed during build/test only.