visualdynamics.core.matches¶
matches
¶
Matched mode pairs between two shape sets.
Squares picked on a MAC plot and committed become a project object of their own, which can be saved, renamed and edited row by row. The two shape sets are referenced by name and looked up each time the matches are shown. The MAC values are stored with the pairs, because they came from the comparison as it was displayed, projected onto the basis DOFs when the geometries required it, and recomputing them from DOFs matched by name would not give the same values.
Classes:
| Name | Description |
|---|---|
MatchedModes |
Pairs of (first-set mode, second-set mode) with their MAC. |
Classes¶
MatchedModes
¶
MatchedModes(first: str, second: str, pairs: Sequence[Sequence[int]] | None = None, macs: Sequence[float] | None = None, first_geometry: str | None = None, second_geometry: str | None = None)
Pairs of (first-set mode, second-set mode) with their MAC.
first and second name shape sets in the project. The first set
is the basis of the comparison, and the frequency error Δf% is
measured from its frequencies.
Committing the squares picked on a cross-MAC creates one of these, so the pairing is saved in the project instead of only in the window: a report refers to it by name, and reopening the project gives the same pairs. The pairs are kept sorted by the first set's mode, then by the second set's.
Attributes:
first: The name of the set whose modes are the rows, and whose
frequencies Δf% is measured from.
second: The name of the set whose modes are the columns.
pairs: [row mode, column mode] for each committed pair,
zero-based.
macs: The MAC of each pair as computed when it was committed,
possibly after projecting onto the basis DOFs, which is why
it is stored and not recomputed.
first_geometry: The geometry first was linked to when the
pairs were committed, since a projection only has meaning
for that geometry.
second_geometry: The same for second.
Methods:
| Name | Description |
|---|---|
add |
Add pairs with their MACs; a pair already present gets the new MAC. |
delete_matches |
Remove the matches at these row indices; raises ValueError for a row out of range. |
rename_source |
Update the references after a shape set or geometry is renamed from |
Source code in src/visualdynamics/core/matches.py
Methods:¶
add
¶
Add pairs with their MACs; a pair already present gets the new MAC.
Source code in src/visualdynamics/core/matches.py
delete_matches
¶
Remove the matches at these row indices; raises ValueError for a row out of range.
Source code in src/visualdynamics/core/matches.py
rename_source
¶
Update the references after a shape set or geometry is renamed from old to new.