def update_cuts(self): """ Update checked cuts and reference cut with Measurement cuts. """ changes_dir = self.measurement.get_changes_dir() df.update_cuts( self.checked_cuts, self.measurement.get_cuts_dir(), changes_dir) self.losses.checked_cuts = self.checked_cuts # Update reference cut _, suffix = self.reference_cut_file.name.split(".", 1) self.reference_cut_file = Path( self.measurement.get_cuts_dir(), f"{self.measurement.name}.{suffix}") self.losses.reference_cut_file = self.reference_cut_file self.losses.directory_composition_changes = changes_dir # Update title title = "{0} - Reference cut: {1}".format( "Composition changes", os.path.basename(self.reference_cut_file)) self.setWindowTitle(title)
def update_use_cuts(self): """ Update used cuts list with new Measurement cuts. """ changes_dir = self.measurement.get_changes_dir() df.update_cuts(self.use_cuts, self.measurement.get_cuts_dir(), changes_dir) self.output_dir = self.measurement.get_depth_profile_dir()