Skip to content

Commit ba65bd1

Browse files
committed
add more skip options in star.setup, request tip after pre-init
1 parent b0f3ca3 commit ba65bd1

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,8 @@ def _parse_response(self, resp: str, fmt: str) -> dict:
13411341

13421342
async def setup(
13431343
self,
1344+
skip_instrument_initialization=False,
1345+
skip_pip=False,
13441346
skip_autoload=False,
13451347
skip_iswap=False,
13461348
skip_core96_head=False,
@@ -1357,9 +1359,6 @@ async def setup(
13571359

13581360
self.id_ = 0
13591361

1360-
tip_presences = await self.request_tip_presence()
1361-
self._num_channels = len(tip_presences)
1362-
13631362
# Request machine information
13641363
conf = await self.request_machine_configuration()
13651364
self._extended_conf = await self.request_extended_configuration()
@@ -1378,13 +1377,16 @@ async def setup(
13781377

13791378
initialized = await self.request_instrument_initialization_status()
13801379

1381-
if not initialized:
1380+
if not initialized and not skip_instrument_initialization:
13821381
logger.info("Running backend initialization procedure.")
13831382

13841383
await self.pre_initialize_instrument()
13851384

1385+
tip_presences = await self.request_tip_presence()
1386+
self._num_channels = len(tip_presences)
1387+
13861388
async def set_up_pip():
1387-
if not initialized or any(tip_presences):
1389+
if (not initialized or any(tip_presences)) and not skip_pip:
13881390
await self.initialize_pip()
13891391

13901392
async def set_up_autoload():

pylabrobot/liquid_handling/backends/hamilton/STAR_chatterbox.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ def __init__(self, num_channels: int = 8, core96_head_installed: bool = True):
1616
self._iswap_parked = True
1717
self.core96_head_installed = core96_head_installed
1818

19-
async def setup(self, skip_autoload=False, skip_iswap=False, skip_core96_head=False) -> None:
19+
async def setup(
20+
self,
21+
skip_instrument_initialization=False,
22+
skip_pip=False,
23+
skip_autoload=False,
24+
skip_iswap=False,
25+
skip_core96_head=False,
26+
):
2027
await LiquidHandlerBackend.setup(self)
2128

2229
async def request_tip_presence(self):

0 commit comments

Comments
 (0)