PyLynx VVP arrays inherit from Pandas (and consequently Numpy) dataframes, so you can use the same notation for modifying them.
Initializing a VVPArray
object creates an 8x12 dataframe of all zeros:
0 1 2 3 4 5 6 7 8 9 10 11
A 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
B 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
C 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
D 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
E 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
F 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
G 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
H 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
You can reference ranges in this dataframe with the .loc
method:
array.loc['A':'C',] = 20.0
array.loc['F':'H', 1:4] = 100.0
print(array)
0 1 2 3 4 5 6 7 8 9 10 11
A 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0
B 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0
C 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0
D 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
E 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
F 0.0 100.0 100.0 100.0 100.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
G 0.0 100.0 100.0 100.0 100.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
H 0.0 100.0 100.0 100.0 100.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
This can get passed to VVP commands as the array variable
lynx.aspirate_96_vvp(plate = plate, array = array)