Closed fdrgsp closed 2 weeks ago
Attention: Patch coverage is 84.61538%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 95.65%. Comparing base (
c8996b7
) to head (a5fc170
).
Files | Patch % | Lines |
---|---|---|
src/useq/_plate.py | 84.61% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
please also fix a new scaling issue that we now have in random points:
if value.max_width == np.inf:
kwargs["max_width"] = plate.well_size[0] - (value.fov_width or 0.1)
if value.max_height == np.inf:
kwargs["max_height"] = plate.well_size[1] - (
value.fov_height or 0.1
)
the plate.well_sizes
need to be scaled by 1000
@tlambert03 out of curiosity, if you run the test
for the plate locally, does test_plate_plan_serialization
fail for you?
nope, and not on CI either obviously... whats your traceback
nope, and not on CI either obviously... whats your traceback
the well_points_plan is always defaulting to Position()...
def test_plate_plan_serialization() -> None:
pp = useq.WellPlatePlan(
plate=96,
a1_center_xy=(500, 200),
rotation=5,
selected_wells=np.s_[1:5:2, :6:3],
well_points_plan=useq.RandomPoints(num_points=10),
)
js = pp.model_dump_json()
pp2 = useq.WellPlatePlan.model_validate_json(js)
> assert pp2 == pp
E AssertionError: assert WellPlatePlan(plate=WellPlate(rows=8, columns=12, well_spacing=(9.0, 9.0), well_size=(6.4, 6.4)), a1_center_xy=(500.0, 200.0), rotation=5.0, selected_wells=(slice(1, 5, 2), slice(None, 6, 3)), well_points_plan=Position()) == WellPlatePlan(plate=WellPlate(rows=8, columns=12, well_spacing=(9.0, 9.0), well_size=(6.4, 6.4)), a1_center_xy=(500.0, 200.0), rotation=5.0, selected_wells=(slice(1, 5, 2), slice(None, 6, 3)), well_points_plan=RandomPoints(num_points=10, max_width=6399.9, max_height=6399.9))
E
E At index 0 diff: Position(name='B1') != Position(x=2010.7489791050302, y=-10177.428033516471, name='B1_0000')
E Right contains 36 more items, first extra item: Position(x=1776.901041996079, y=-9937.020701044301, name='B1_0004')
E
E Full diff:
E - WellPlatePlan(plate=WellPlate(rows=8, columns=12, well_spacing=(9.0, 9.0), well_size=(6.4, 6.4)), a1_center_xy=(500.0, 200.0), rotation=5.0, selected_wells=(slice(1, 5, 2), slice(None, 6, 3)), well_points_plan=RandomPoints(num_points=10, max_width=6399.9, max_height=6399.9))
E ? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E + WellPlatePlan(plate=WellPlate(rows=8, columns=12, well_spacing=(9.0, 9.0), well_size=(6.4, 6.4)), a1_center_xy=(500.0, 200.0), rotation=5.0, selected_wells=(slice(1, 5, 2), slice(None, 6, 3)), well_points_plan=Position())
E ? ^^^^^^^^^^^
the well_points_plan is always defaulting to Position()...
strange... not sure. what's in your env? it must be environment, since it's working on CI, but I wonder what it could be.
the well_points_plan is always defaulting to Position()...
strange... not sure. what's in your env? it must be environment, since it's working on CI, but I wonder what it could be.
ok fixed it, not sure what was the conflict...
linked to #173
I removed all the change of sign we had in the
WellPlatePlan
code and only invert the y axis when we apply the transformation so that the y axis is-y down
and+y up
. This way we use the same cartesian coordinate system that we are already using in the_PointsPlans
.