HPInc / HP-Digital-Microfluidics

HP Digital Microfluidics Software Platform and Libraries
MIT License
2 stars 0 forks source link

Pipette dispending same reagent multiple times #111

Open EvanKirshenbaum opened 5 months ago

EvanKirshenbaum commented 5 months ago

Checkout branch issue.111 and run:

> python3 tests/test_splashzones.py
...
  6906|   INFO|Pipettor("Dummy") Thread|dummy_pipettor.py:105:perform|Aspirating 1.0000000000000005e-08 m**3 of R from reagent block.
  7406|   INFO|Pipettor("Dummy") Thread|dummy_pipettor.py:115:perform|Dispensing 1.0000000000000003e-09 m**3 of R to ExtractionPoint[XYCoord(13,15)].
  8008|   INFO|Pipettor("Dummy") Thread|dummy_pipettor.py:115:perform|Dispensing 1.0000000000000003e-09 m**3 of R to ExtractionPoint[XYCoord(13,15)].
  8610|   INFO|Pipettor("Dummy") Thread|dummy_pipettor.py:115:perform|Dispensing 1.0000000000000003e-09 m**3 of R to ExtractionPoint[XYCoord(13,15)].
Migrated from internal repository. Originally created by Rares Vernica on May 18, 2022 at 12:58 PM PDT.
EvanKirshenbaum commented 5 months ago

Merged the latest changes from master into the repro branch issue.111

Migrated from internal repository. Originally created by Rares Vernica on May 18, 2022 at 1:16 PM PDT.
EvanKirshenbaum commented 5 months ago

So what I thought might be the problem wasn't. It had looked as though it was aspirating one drop and trying to dispense several. But it turns out it only looked like that because (1) you were allowing it to print the volume in its default units m**3 and (2) you specified exactly ten waste drops.

When I added

Volume.default_units = uL

what I got instead was

  7631|   INFO|Pipettor("Dummy") Thread|dummy_pipettor.py:105:perform|Aspirating 10.000000000000002 μl of R from reagent block.
  8106|   INFO|Pipettor("Dummy") Thread|dummy_pipettor.py:115:perform|Dispensing 1.0 μl of R to ExtractionPoint[XYCoord(13,15)].
  8536|   INFO|Pipettor("Dummy") Thread|dummy_pipettor.py:115:perform|Dispensing 1.0 μl of R to ExtractionPoint[XYCoord(13,15)].
  9177|   INFO|Pipettor("Dummy") Thread|dummy_pipettor.py:115:perform|Dispensing 1.0 μl of R to ExtractionPoint[XYCoord(13,15)].

I hadn't noticed that the exponent on the aspiration was 8 rather than 9.

So I think it's doing what you're asking it to. We just need to figure out how to make it do what you want. (And then make it harder for this to happen to others when they're not expecting it.)


I also fixed a couple of things that MyPy was (reasonably) griping about. One of them (the fact that path steps only took Optional[Ticks] for their after param rather than Optional[DelayType], which made it complain about your passing in 1*s) I fixed in master and merged back into this branch.

Migrated from internal repository. Originally created by @EvanKirshenbaum on May 19, 2022 at 11:22 AM PDT.
EvanKirshenbaum commented 5 months ago

Since there wasn't an actual description of what the problem was in the initial comment:

The code asked to dispense multiple (in this case 10) drops of the same reagent to the same extraction point. Since it had to wait on earlier transfers, these all got combined into a single aspiration, but due to unclear messages, it appeared that it was aspirating a single drop and then trying to dispense several.

The real problem is that the timing is such that with a speeded-up dummy pipettor and the pipettor already in position, it sometimes got to a subsequent dispense when there was a nearby drop, which got pulled toward the dispensed drop, resulting in the drop not being where its current motion thought it should be. What was desired (I assume) was that the subsequent dispensing be held off until the prior drops were out of the way.

Migrated from internal repository. Originally created by @EvanKirshenbaum on May 19, 2022 at 11:33 AM PDT.