# Float being converted to Int in Star backend

**URL:** <https://discuss.pylabrobot.org/t/float-being-converted-to-int-in-star-backend/254>\
**Category:** General\
**Created:** [June 19, 2025, 9:07pm UTC](https://discuss.pylabrobot.org/t/float-being-converted-to-int-in-star-backend/254 "2025-06-19T21:07:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![linx5o](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/linx5o/32/272_2.png) [@linx5o](https://discuss.pylabrobot.org/u/linx5o)\
**Post date:** [June 19, 2025, 9:07pm UTC](https://discuss.pylabrobot.org/t/float-being-converted-to-int-in-star-backend/254/1 "2025-06-19T21:07:55Z")

</div>

Running

```auto
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.

```auto
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.

```auto
  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:

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

```

Similar issues with `air_volume`s.  
Should I be doing this a different way?

---

<div class="post-metadata">

**Author:** ![rickwierenga](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/rickwierenga/32/963_2.png) [@rickwierenga](https://discuss.pylabrobot.org/u/rickwierenga)\
**Post date:** [June 19, 2025, 9:42pm UTC](https://discuss.pylabrobot.org/t/float-being-converted-to-int-in-star-backend/254/2 "2025-06-19T21:42:21Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![linx5o](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/linx5o/32/272_2.png) [@linx5o](https://discuss.pylabrobot.org/u/linx5o)\
**Post date:** [June 19, 2025, 10:27pm UTC](https://discuss.pylabrobot.org/t/float-being-converted-to-int-in-star-backend/254/3 "2025-06-19T22:27:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rickwierenga](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/rickwierenga/32/963_2.png) [@rickwierenga](https://discuss.pylabrobot.org/u/rickwierenga)\
**Post date:** [June 19, 2025, 10:28pm UTC](https://discuss.pylabrobot.org/t/float-being-converted-to-int-in-star-backend/254/4 "2025-06-19T22:28:18Z")

</div>

oh oh i see, yes 🤦‍♂️

do you wanna make a PR 🙂
