Skip to content

Commit

Permalink
change requested
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmeigh committed May 20, 2024
1 parent 9bfed9e commit 63e19bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions scripts/operations_tests/operations_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ def add_nan(self, image_stack, fraction=0.001):
return image_stack

def add_flats_and_darks(self, params):
for frame_type in ['flat_before', 'dark_before', 'flat_after', 'dark_after']:
for frame_type in ['Flat_Before', 'Flat_After', 'Dark_Before']:
if frame_type in params:
filename_group = FilenameGroup.from_file(config_manager.load_sample)
related_filename_group = filename_group.find_related(getattr(FILE_TYPES, frame_type.upper()))
related_filename_group.find_all_files()
image_stack = loader.load(filename_group=related_filename_group)
if image_stack is not None:
params[frame_type] = image_stack
params[frame_type.lower()] = image_stack # Map to lower case for filter_func
else:
print(f"Failed to load image stack for {frame_type}")

Expand Down
18 changes: 8 additions & 10 deletions scripts/operations_tests/test_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,9 @@
"params": {
"use_dark": true,
"selected_flat_fielding": "Both, concatenated",
"flat_before": "FLAT_BEFORE",
"dark_before": "DARK_BEFORE",
"flat_after": "FLAT_AFTER",
"dark_after": "DARK_AFTER"
"Flat_Before": "FLAT_BEFORE",
"Dark_Before": "DARK_BEFORE",
"Flat_After": "FLAT_AFTER"
}
},
{
Expand All @@ -704,8 +703,8 @@
"params": {
"use_dark": true,
"selected_flat_fielding": "Only Before",
"flat_before": "FLAT_BEFORE",
"dark_before": "DARK_BEFORE"
"Flat_Before": "FLAT_BEFORE",
"Dark_Before": "DARK_BEFORE"
}
},
{
Expand All @@ -714,8 +713,7 @@
"params": {
"use_dark": true,
"selected_flat_fielding": "Only After",
"flat_after": "FLAT_AFTER",
"dark_after": "DARK_AFTER"
"Flat_After": "FLAT_AFTER"
}
},
{
Expand All @@ -724,8 +722,8 @@
"params": {
"use_dark": false,
"selected_flat_fielding": "Both, concatenated",
"flat_before": "FLAT_BEFORE",
"flat_after": "FLAT_AFTER"
"Flat_Before": "FLAT_BEFORE",
"Flat_After": "FLAT_AFTER"
}
}
]
Expand Down

0 comments on commit 63e19bc

Please sign in to comment.