Skip to content

Commit

Permalink
Added the ability to read fits files that are pre downloaded and are …
Browse files Browse the repository at this point in the history
…already in memory
  • Loading branch information
cmccully committed Oct 16, 2024
1 parent 21ac9ba commit 91ad6ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.19.0 (2024-10-16)
-------------------
- Added the ability to read fits files that are pre downloaded and are already in memory

1.18.3 (2024-10-04)
-------------------
- Update exception handling for photometric calibrator to handle general base exceptions from the requests library
Expand Down
6 changes: 5 additions & 1 deletion banzai/utils/fits_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ def basename_search_in_archive(filename, dateobs, context, is_raw_frame=False):


def open_fits_file(file_info, context, is_raw_frame=False):
if file_info.get('path') is not None and os.path.exists(file_info.get('path')):
if file_info.get('data_buffer') is not None:
filename = file_info.get('filename')
frame_id = None
buffer = file_info.get('data_buffer')
elif file_info.get('path') is not None and os.path.exists(file_info.get('path')):
buffer = open(file_info.get('path'), 'rb')
filename = os.path.basename(file_info.get('path'))
frame_id = None
Expand Down

0 comments on commit 91ad6ef

Please sign in to comment.