Skip to content

Commit

Permalink
fix bug reading pds4-labeled FITS files
Browse files Browse the repository at this point in the history
Changes to the loaders.handlers.handle_fits_file() signature were not propagated to the PDS4 FITS-reading
workflow, causing failures when loading some objects. This simply removes the outdated id_as_offset argument
(handle_fits_file() now performs this behavior by default).
  • Loading branch information
m-stclair committed Sep 1, 2024
1 parent 88871b0 commit 092675e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ compatibility
- The hotpatch for `pds4-tools` Python 3.12 incompatibility no longer
has persistent side effects; for instance, `conda` will no longer
complain about checksum mismatches.
- bug reading PDS4-labeled FITS files

### Removed
- `pdr.Data.__iter__` method is being deprecated
Expand Down
5 changes: 1 addition & 4 deletions pdr/pdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,7 @@ def _load_pds4(self, object_name: str):

offset = structure.meta_data['offset']
result = handle_fits_file(
structure.parent_filename,
object_name,
offset,
id_as_offset=True
structure.parent_filename, object_name, offset
)
if structure.is_header() is True:
return self._add_loaded_objects(result)
Expand Down

0 comments on commit 092675e

Please sign in to comment.