HPInc / HP-Digital-Microfluidics

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

Thermocyclers shouldn't indirect to find heaters #195

Open EvanKirshenbaum opened 5 months ago

EvanKirshenbaum commented 5 months ago

While refactoring things to make the heater type user-specifiable and the layout obtainable from Glider (#122) for Bilby, it dawned on me that Thermocycler and its components are defined kind of weirdly. In particular, Thermocycler holds two arrays:

Channel = tuple[ChannelEndpoint, ChannelEndpoint]

class Thermocycler:
    heaters: Final[Sequence[Heater]]
    channels: Final[Sequence[Channel]]
    ...

where ChannelEndpoint holds, among other things, a heater number as an index into the heaters array:

class ChannelEndpoint(NamedTuple):
    heater_no: int

I think that the notion here was that we might want to specify the channels by topology before we actually have the heaters, but thinking about it more, it seems as though it would make more sense to simply have ChannelEndpoint hold its Heater directly.

Migrated from internal repository. Originally created by @EvanKirshenbaum on Aug 22, 2022 at 2:32 PM PDT.