diff --git a/reflectivity_ui/interfaces/data_manager.py b/reflectivity_ui/interfaces/data_manager.py index 13065863..7146e35a 100644 --- a/reflectivity_ui/interfaces/data_manager.py +++ b/reflectivity_ui/interfaces/data_manager.py @@ -195,14 +195,11 @@ def add_active_to_reduction(self): if self.is_active_data_compatible(): if len(self.reduction_list) == 0: self.reduction_states = list(self.data_sets.keys()) - ws = self._nexus_data.get_reflectivity_workspace_group()[0] - # Append to the reduction list, but keep the theta ordering - theta = ws.getRun().getProperty("two_theta").value is_inserted = False + q_min, _ = self._nexus_data.get_q_range() for i in range(len(self.reduction_list)): - _ws = self.reduction_list[i].get_reflectivity_workspace_group()[0] - _theta = _ws.getRun().getProperty("two_theta").value - if theta <= _theta: + _q_min, _ = self.reduction_list[i].get_q_range() + if q_min <= _q_min: self.reduction_list.insert(i, self._nexus_data) is_inserted = True break