[WIP] Ats9360 with channels#816
Conversation
…ith updated ATS driver
…rrectly and new eg notebook (needs cleaning up)
…TS get_sample_speed
damazter
left a comment
There was a problem hiding this comment.
We will continue later with reviewing of the other files
| raise Exception("Unsupported OS") | ||
|
|
||
| # TODO (W) make the board id more general such that more than one card | ||
| # per system configurations are supported |
There was a problem hiding this comment.
isn't it the case that multiple boards are already supported?
| # as up to date since it's not being pushed to | ||
| # the instrument at any time and is never used | ||
| if clock_source == 'EXTERNAL_CLOCK_10MHz_REF': | ||
| sample_rate = self.external_sample_rate |
There was a problem hiding this comment.
couldn't the parameters external_sample_rate and sample_rate be merged into a single parameter? I don;t see the need for two separate parameters
| ctypes.c_uint32, | ||
| ctypes.c_uint32, | ||
| ctypes.c_uint32, | ||
| ctypes.c_uint32] |
| if self.channel_selection._get_byte() == 3: | ||
| number_of_channels = 2 | ||
| else: | ||
| number_of_channels = 1 |
There was a problem hiding this comment.
it should probably be generalised to more than 2 channels at some point
| buffer_recycling = (self.buffers_per_acquisition._get_byte() > | ||
| self.allocated_buffers._get_byte()) | ||
| done_setup = time.clock() | ||
| while (buffers_completed < self.buffers_per_acquisition._get_byte()): |
There was a problem hiding this comment.
the outer brackets here are not PEP8 compatible right?
| logger.info("Capture took {}".format(capture_time)) | ||
| logger.info("abort took {}".format(abort_time)) | ||
| logger.info("handling took {}".format(handling_time)) | ||
| logger.info("free mem took {}".format(free_mem_time)) |
There was a problem hiding this comment.
Would it be sensible to add an option to disable all this timing debug info, we don't always want to delay our measurements by printing this stuff
| else: | ||
| args_out.append(arg) | ||
|
|
||
| logger.debug("calling dll func {} with args: \n {}".format(func_name, args_out)) |
There was a problem hiding this comment.
does this line delay the code? if so, we might want to disable it
| self._set(value) | ||
|
|
||
| def get(self): | ||
| def get_raw(self): |
There was a problem hiding this comment.
why is this not just get?
get_raw seems to imply some byte code or something, which it does not do.
| value='AUX_IN_AUXILIARY', | ||
| byte_to_value_dict={0: 'AUX_OUT_TRIGGER', | ||
| 1: 'AUX_IN_TRIGGER_ENABLE', | ||
| 13: 'AUX_IN_AUXILIARY'}) |
There was a problem hiding this comment.
is 13 a valid value? we could not find it in the manual
There was a problem hiding this comment.
For the 9360 it is but maybe that we have to overwrite this in that class
| value='NONE', | ||
| byte_to_value_dict={0: 'NONE', | ||
| 1: 'TRIG_SLOPE_POSITIVE', | ||
| 2: 'TRIG_SLOPE_NEGATIVE'}) |
|
Not relevant anymore, The controllers are in qdev-wrappers |
Driver for ATS9360 and new controller that supports capturing from both physical channels as well as with and without software demodulation. The controller works using the new channels api. Per default it does not define any channels but you can setup channels that will return data in any 0d to 2d shape of buffers, records and samples and with and without sorfware demodulation
@nataliejpg It would be great if you can have a look at the notebook in https://github.com/jenshnielsen/Qcodes/blob/9a3822fb56134c7f2693306f068e95cdab23e58c/docs/examples/driver_examples/Qcodes%20example%20with%20Alazar%20ATS9360.ipynb
to see if it does what you want.
@damazter
This contains some changes to the existing driver in
ATS.pyATS9870.pyThese are mainly:
AlazarPostAsyncBuffertoctypes.cast(buf.addr, ctypes.c_void_p)I found that this wasneeded to get the code to actually run on some machines (As far as I can tell it depends on the windows version)
I would like your input on these before we merge this. I do not have a 9870 card to test with at the moment.