Float being converted to Int in Star backend

Running

lh.aspirate(lh.deck.get_resource(plate)[well], vols=[volume], flow_rates=[flow_rate], settling_time=[settling_time], swap_speed=[swap_speed], transport_air_volume=[transport_air_volume], blow_out_air_volume=[blow_out_air_volume])

settling_time is a float value, all values are floats

After reaching STAR_backend.py the values are correct.
The function _fill_in_defaults changes the original float values to int before passing to aspirate_pip. I believe this is the issue.

settling_time = _fill_in_defaults(
      settling_time,
      default=[
        hlc.dispense_settling_time if hlc is not None else 0 for hlc in hamilton_liquid_classes
      ],
    )

Not using hamilton liquid classes.

  if t in [int, float]:
    return [t(v) for v in val]  # type: ignore

I believe this is causing the issue.

Printing before and after the _fill_in_defaults() function give the following result:

setting time before aspirate [9.84]
settling time before pip [9]

Similar issues with air_volumes.
Should I be doing this a different way?

what is expected? rounding?

firmware takes all parameters as ints, but slightly higher resolution than plr-native units (typically tenths, e.g. [0.1mm], [0.1ul], etc.)

I believe it should remain as 9.84 in aspirate (float). When it is multiplied and rounded in the parameters of pip_aspirate it will become 98 in Hamilton units. Currently it will become 90.

1 Like

oh oh i see, yes :man_facepalming:

do you wanna make a PR :slight_smile:

2 Likes