import qcodes
from qcodes.tests.data_mocks import *
def DataSet2D(location=None):
# DataSet with one 2D array with 4 x 6 points
yy, xx = numpy.meshgrid(range(4), range(6))
zz = xx**2+yy**2
# outer setpoint should be 1D
xx = xx[:, 0]
x = DataArray(name='x', array_id='x', label='X', preset_data=xx, is_setpoint=True)
y = DataArray(name='y', array_id='y', label='Y', preset_data=yy, set_arrays=(x,),
is_setpoint=True)
z = DataArray(name='z', array_id='z', label='Z', preset_data=zz, set_arrays=(x, y))
#return new_data(arrays={'x': x, 'y': y, 'z': z}, location=location) # this would fail
return new_data(arrays=[x,y,z], location=location)
d=DataSet2D()
print(d)
The following code created a dataset, but only the
zarray is shown.There are two issues here:
xandyarrays do not show. This is something related to the.action_indicesarraysshould be adict, but that generates an error@alexcjohnson @giulioungaretti