Open EvanKirshenbaum opened 5 months ago
This issue was referenced by the following commits before migration:
Also need to do this for pad expressions (lower left should be (1,1)
).
And need click traces to take this into account as well.
I might want to bite the bullet and just change the notion throughout the actual code.
Working on it a little, I'm coming to the conclusion that this is silly. I'm going to just bite the bullet and get rid of the index base
notion and say that counting just starts from one. Having to always go through the Environment
means that I'm continually going out of my way to make sure I have access to one, and with Attribute
s (e.g., number
, row
) that becomes difficult. And it's unnecessary.
So I'm going to change this to simply say that numbered items, rows, and columns just start numbering from one, and that's the way it is in the MPAM code as well as in the macro language. That way things will print as expected. I'll probably need to add in adapters on the order of well_number(n)
to avoid having people indexing directly in the lists, but that's probably a good thing anyway.
I think it's all there, now. Things that have lists of subcomponents (e.g., Board.wells
, Well.shared_pads
) now also have methods that take a number (e.g., Board.well_number(n)
).
I also added Board.edge(dir)
to give the row or column number of the edge based on the direction (by default, delegating to max_row
and its siblings based on the orientation
).
I also changed the thermocycling support so that ChannelEndpoint
s now hold Heater
s (actually, TemperatureControl
s) directly rather than by index into an array.
The hardest thing to do was actually to change all of the magic numbers in the device definitions (and @cumbiem will be checking to make sure I didn't screw up the wombat pin mappings) and the existing macros and tasks. The combinatorial synthesis task appears to work, so I'm reasonably confident.
Currently,
index base
defaults to0
. This is really awkward in expressions likewell #0
, so I should change it to1
.Also, the same
index base
should be used in theINDEX
function used inw[n]
expressions to get well pads.Should probably also add a cmd-line argument (
--zero-index
) that allows you to specify that the scripts you use use it.Eventually, will probably want to get rid of
index base
entirely.Migrated from internal repository. Originally created by @EvanKirshenbaum on Feb 04, 2023 at 2:38 PM PST.