Skip to content

Commit

Permalink
revert blank sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
djps committed Oct 2, 2024
1 parent 5369f72 commit 18f2346
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions kwave/kWaveSimulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ def blank_sensor(self):
"""

fields = ["p", "p_max", "p_min", "p_rms", "u", "u_non_staggered", "u_split_field", "u_max", "u_min", "u_rms", "I", "I_avg"]
field_max_all = ["p_max_all", "p_min_all", "p_final", "u_max_all", "u_min_all", "u_final"]
if any(self.record.is_set(field_max_all)) and self.sensor.mask is None:
self.sensor.mask = True
#field_max_all = ["p_max_all", "p_min_all", "p_final", "u_max_all", "u_min_all", "u_final"]
#if any(self.record.is_set(field_max_all)) and self.sensor.mask is None:
# self.sensor.mask = True

if not any(self.record.is_set(fields)) and (not self.time_rev):
return True
return False

return False

Expand Down Expand Up @@ -1500,7 +1500,9 @@ def create_sensor_variables(self) -> None:
# define the output variables and mask indices if using the sensor
if self.use_sensor:

print('\tuse_sensor:', self.use_sensor)
print('\t\tuse_sensor:', self.use_sensor)
print('\t\t', isinstance(self.options.save_to_disk, str))
print('\t\t', (not self.blank_sensor))

if (not self.blank_sensor) or isinstance(self.options.save_to_disk, str):

Expand Down Expand Up @@ -1564,7 +1566,7 @@ def create_sensor_variables(self) -> None:
else:
print('Use sensor but is not a blank sensor', (not self.blank_sensor))
# set the sensor mask index variable to be empty
self.sensor_mask_index = [] # None
self.sensor_mask_index = None
else:
print("not using a sensor")

Expand Down

0 comments on commit 18f2346

Please sign in to comment.