Correct way to aspirate/dispense to/from a "1-well" reservoir using the 96 head

I’m trying to aspirate from the AGenBio_1_WP_Fl using the 96 head. This plate has only 1 well defined:

image

I get the following error

> await workcell.lh.aspirate96(workcell.cell_plate, 50)

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[12], line 1
----> 1 await workcell.lh.aspirate96(workcell.reagent_reservoir, 50)

File ~/Documents/wetlab_workcell/src/pylabrobot/pylabrobot/liquid_handling/liquid_handler.py:1384, in LiquidHandler.aspirate96(self, resource, volume, offset, flow_rate, blow_out_air_volume, **backend_kwargs)
   1381       raise ValueError("All wells must be in the same plate")
   1383 if not len(wells) == 96:
-> 1384   raise ValueError(f"aspirate96 expects 96 wells, got {len(wells)}")
   1386 for well, channel in zip(wells, self.head96.values()):
   1387   # superfluous to have append in two places but the type checker is very angry and does not
   1388   # understand that Optional[Liquid] (remove_liquid) is the same as None from the first case
   1389   if well.tracker.is_disabled or not does_volume_tracking():

ValueError: aspirate96 expects 96 wells, got 1

*edit: Trying to hack around this by passing the same well 96 times works like so:

> await workcell.lh.aspirate96([workcell.reagent_reservoir.children[0]] * 96, 50)

However, in this case, I need to pass an offset that resolves the distance between the center of the single well and the center of a “virtual” A0 well in the top left corner:

offset = Coordinate(-workcell.cell_plate.children[0].get_size_x() / 2 + 4.5, workcell.cell_plate.children[0].get_size_y() / 2 - 4.5)
await workcell.lh.aspirate96([workcell.cell_plate.children[0]] * 96, 10, offset = offset)

This works.

the api does not support this specific use case in a neat way yet.

I would recommend starting with await lh.aspirate96(reagent_reservoir.get_item("A1")) (aspirating using the 96 head from a single resource). Currently, this will move the first tip to the lbb (left back bottom), but i think it would be good to center the 96 in the requested single container by default. I can make a PR for this.

the api for aspirating from multiple wells is to support full plates with one channel going into each well. (it is checked that the number of wells passed is 96 in that case.)