Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions PyReconstruct/modules/datatypes/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2683,10 +2683,19 @@ def importTransforms(self, other, import_as : list, series_states=None, log_even
Params:
other (series): the series to import transforms from
import_as (list): the list of (alignment to import, name for alignment in current series)
series_states (dict): optiona dict of undo states for GUI
series_states (SeriesStates): the series undo states from the GUI
log_event (bool): True if the event should be logged
"""
for s_snum, s_section in self.enumerateSections(message="Importing alignments..."):
# breakable=False: this rewrites section.tforms on every section, so the
# undo has to be all-or-nothing. A breakable series state can be
# dissolved into per-section undos (SeriesStates.undoSection), which
# would leave the imported alignment present on some sections and absent
# on others, a state the Series.alignments property rejects outright.
for s_snum, s_section in self.enumerateSections(
message="Importing alignments...",
series_states=series_states,
breakable=False
):
if s_snum in other.sections:
o_section = other.loadSection(s_snum)
mags_match = abs(o_section.mag - s_section.mag) <= 1e-8
Expand Down
Loading