[OASIS] cleanup
This commit is contained in:
parent
48f7569c1f
commit
c18e5b8d3e
1 changed files with 75 additions and 68 deletions
|
|
@ -622,10 +622,12 @@ def repetition_fata2masq(
|
|||
) -> Repetition | None:
|
||||
mrep: Repetition | None
|
||||
if isinstance(rep, fatamorgana.GridRepetition):
|
||||
mrep = Grid(a_vector=rep.a_vector,
|
||||
mrep = Grid(
|
||||
a_vector = rep.a_vector,
|
||||
b_vector = rep.b_vector,
|
||||
a_count = rep.a_count,
|
||||
b_count=rep.b_count)
|
||||
b_count = rep.b_count,
|
||||
)
|
||||
elif isinstance(rep, fatamorgana.ArbitraryRepetition):
|
||||
displacements = numpy.cumsum(numpy.column_stack((
|
||||
rep.x_displacements,
|
||||
|
|
@ -647,14 +649,19 @@ def repetition_masq2fata(
|
|||
frep: fatamorgana.GridRepetition | fatamorgana.ArbitraryRepetition | None
|
||||
if isinstance(rep, Grid):
|
||||
a_vector = rint_cast(rep.a_vector)
|
||||
b_vector = rint_cast(rep.b_vector) if rep.b_vector is not None else None
|
||||
a_count = rint_cast(rep.a_count)
|
||||
b_count = rint_cast(rep.b_count) if rep.b_count is not None else None
|
||||
a_count = int(rep.a_count)
|
||||
if rep.b_count > 1:
|
||||
b_vector = rint_cast(rep.b_vector)
|
||||
b_count = int(rep.b_count)
|
||||
else:
|
||||
b_vector = None
|
||||
b_count = None
|
||||
|
||||
frep = fatamorgana.GridRepetition(
|
||||
a_vector=cast('list[int]', a_vector),
|
||||
b_vector=cast('list[int] | None', b_vector),
|
||||
a_count=cast('int', a_count),
|
||||
b_count=cast('int | None', b_count),
|
||||
a_vector = a_vector,
|
||||
b_vector = b_vector,
|
||||
a_count = a_count,
|
||||
b_count = b_count,
|
||||
)
|
||||
offset = (0, 0)
|
||||
elif isinstance(rep, Arbitrary):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue