Conversation
|
Let me know when to do a first review. |
… acquisition cards The code is a slightly modified version of the code written by Raphaël and Zaki.
|
I have rebased this PR on #56, started testing it and you can start reviewing it |
|
I will try to have a look next week (I am in vacation). |
| """Command to send and load and .awg file into the AWG | ||
| awg_file = bytearray | ||
| filename = str | ||
| timeout = float |
There was a problem hiding this comment.
Format de docstring incorrect (see Numpy docstring style guide)
|
|
||
| """ | ||
| self.write('SEQuence:ELEMent{}:JTARget:TYPE INDex'.format(position)) | ||
| self.write('SEQuence:ELEMent{}:JTARget:INDex {}'.format(position, jump)) |
There was a problem hiding this comment.
If the AWG accepts you could concatenate the two messages (using ;).
| self.write('SEQuence:ELEMent{}:JTARget:INDex {}'.format(position, jump)) | ||
|
|
||
| @secure_communication() | ||
| def send_event(self): |
There was a problem hiding this comment.
You could check the codebase but this looks like a trigger firing. So we may call it fire_trigger as in other places.
| if value in ('RUN', 1, 'True'): | ||
| self.write('AWGC:RUN:IMM') | ||
| if self.ask_for_values('AWGC:RST?')[0] not in (1, 2): | ||
| values = self.query('AWGC:RST?', format=2, delay=self.delay) |
There was a problem hiding this comment.
query is not defined and does not have a format argument in recent version of pyvisa I would advise to simply parse the answer.
| to_send or traceback : dict | ||
| Dict of {channel: array of (bytearrays,intarray,intarray)} to send | ||
| to the AWG in case of success containing waveform, position(s) and | ||
| repeat(s) or the traceback of the issues in case of failure. |
There was a problem hiding this comment.
The docstring is not up to date.
|
|
||
| """ | ||
| channel_cfg = self.format_and_eval_string(self.awg_configuration) | ||
| # print(channel_cfg) |
| self.write('*WAI') | ||
|
|
||
| @secure_communication() | ||
| def send_load_awg_file(self, awg_file, filename='setup', timeout=100): |
There was a problem hiding this comment.
Since awg_file is actually byte data, I would prefer awg_file_content. Otherwise I would naively think of a path.
| @@ -0,0 +1,484 @@ | |||
| # -*- coding: utf-8 -*- | |||
There was a problem hiding this comment.
This is probably similar enough to the other existing task to factor some common code and limit the duplication.
| @@ -0,0 +1,398 @@ | |||
| # -*- coding: utf-8 -*- | |||
| # ----------------------------------------------------------------------------- | |||
| # Copyright 2015-2016 by EcpyPulses Authors, see AUTHORS for more details. | |||
There was a problem hiding this comment.
And same comment as for the task itself we can probably reuse some parts of the other tasks (in particular none of the functions looks like they need to be duplicated).
| text := model.value | ||
| entries_updater << model.task.list_accessible_database_entries | ||
| tool_tip = EVALUATER_TOOLTIP | ||
|
|
This is a cleaned up version of the code present in the catlab branch. It cannot be merged before #56.