Skip to content

Commit

Permalink
Check if initial data returned from the micro simulation is the data …
Browse files Browse the repository at this point in the history
…that the adaptivity computation requires
  • Loading branch information
IshaanDesai committed May 27, 2024
1 parent 79a7f54 commit fbe265d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion micro_manager/micro_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,14 @@ def initialize(self) -> None:
if self._is_adaptivity_on:
# Save initial data from first micro simulation as we anyway have it
for name in initial_micro_output.keys():
self._data_for_adaptivity[name][0] = initial_micro_output[name]
if name in self._data_for_adaptivity:
self._data_for_adaptivity[name][0] = initial_micro_output[
name
]
else:
raise Exception(
"The initialize() method needs to return data which is required for the adaptivity calculation."
)

# Gather initial data from the rest of the micro simulations
if is_initial_data_required:
Expand Down

0 comments on commit fbe265d

Please sign in to comment.