diff --git a/CHANGES.md b/CHANGES.md index 80089386..5db7f232 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/banzai/utils/fits_utils.py b/banzai/utils/fits_utils.py index c6d57d77..7e64e510 100755 --- a/banzai/utils/fits_utils.py +++ b/banzai/utils/fits_utils.py @@ -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