-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/triton_200/master' into triton_2…
…00/marcel_dev/check_pulse_params_fun
- Loading branch information
Showing
80 changed files
with
8,047 additions
and
2,564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function AWGwatch() | ||
% starts a matlab (vers 2018a) app to DISPLAY SEQUENCER TABLES AND | ||
% WAFEFORMS in qctoolkit and on the Tabor AWG simulatar | ||
% ------------------------------------------------------------------------- | ||
% - to edit the app open awgdisp_app.mlapp in the Matlab app designer | ||
% - user preferences can be edited in the app private properties directly | ||
% at the top in awgdisp_app.mlapp | ||
% ------------------------------------------------------------------------- | ||
% App written by Marcel Meyer 08|2018 marcel.meyer1@rwth-aachen.de | ||
|
||
disp('AWGwatch - app is started'); | ||
|
||
% the app is not on path +qc because matlab then one has problems debugging it | ||
pathOfApp = which('qc.AWGwatch'); | ||
pathOfApp = pathOfApp(1:end-10); | ||
pathOfApp = [pathOfApp 'AWGwatch']; | ||
addpath(pathOfApp); | ||
|
||
awgdisp_app(); | ||
|
||
end |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
function awgdisp(source) | ||
|
||
if nargin < 1 | ||
source = 'qctk'; | ||
end | ||
|
||
% get AWG objects | ||
switch source | ||
case 'qctk' | ||
disp('source = qctoolkit') | ||
case 'sim' | ||
disp('simulaotr') | ||
otherwise | ||
disp('no input') | ||
end | ||
|
||
|
||
% get sequence tables | ||
|
||
% create app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
% function to get waveforms and sequence tables from the AWG | ||
% ------------------------------------------------------------------------- | ||
% Notes: | ||
% - the function only works with the Tabor AWG Simulator not on the real | ||
% Tabor AWG | ||
% - the function arms the program that is inspected | ||
% ------------------------------------------------------------------------- | ||
% written by Marcel Meyer 08|2018 | ||
|
||
function awg_memory_struct = get_awg_memory(program_name, awg_channel_pair_identifier) | ||
|
||
global plsdata | ||
|
||
assert(ischar(program_name), 'first argument of get_awg_memory must be string'); | ||
|
||
if nargin < 2 || isempty(awg_channel_pair_identifier) | ||
awg_channel_pair_identifier = 'AB'; | ||
else | ||
assert(ischar(awg_channel_pair_identifier), 'second argument of get_awg_memory must be string'); | ||
end | ||
|
||
% get AWG channelpair python object | ||
hws = plsdata.awg.hardwareSetup; | ||
known_awgs = util.py.py2mat(hws.known_awgs); | ||
sort_indices = cellfun(@(x)(~isempty(strfind(char(x.identifier), awg_channel_pair_identifier))), known_awgs); | ||
channelpair = known_awgs(find(sort_indices)); | ||
channelpair = channelpair{1}; | ||
|
||
% arm program at AWG | ||
try | ||
channelpair.arm(program_name); | ||
catch err | ||
warning('program seems not to be on AWG, upload it first, returning without returning memory'); | ||
warning(err.message); | ||
return | ||
end | ||
|
||
% get a plottable program object -> qctoolkit Tabor driver gets sequence | ||
% tables and waveforms from the simulator | ||
plottableProgram = channelpair.read_complete_program(); | ||
|
||
awg_memory_struct = util.py.py2mat(plottableProgram.to_builtin()); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function seq_table = get_awg_seq_table(varargin) | ||
|
||
global plsdata | ||
|
||
defaultArgs = struct(... | ||
'programName', plsdata.awg.currentProgam, ... | ||
'advancedSeqTableFlag', false ... | ||
); | ||
args = util.parse_varargin(varargin, defaultArgs); | ||
|
||
seq_table = qc.get_sequence_table(args.programName, args.advancedSeqTableFlag); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
function [wf1, wf2] = get_segment_waveform(program_name, channel_pair_index, memory_index, awg_channel_pair_identifiers) | ||
% Get Wafeform of Sequencer Table Element | ||
% PLEASE NOTE: works only for the Tabor AWG SIMULATOR | ||
% PLEASE NOTE: program gets armed by calling this function | ||
% | ||
% --- Outputs ------------------------------------------------------------- | ||
% wf1 : first channel y-values of AWG channelpair | ||
% wf2 : second channel y-values of AWG channelpair | ||
% | ||
% --- Inputs -------------------------------------------------------------- | ||
% program_name : Program name for which wafeform is | ||
% returned | ||
% channel_pair_index : 1 for channelpair AB and 2 for channelpair | ||
% CD. Also see awg_channel_pair_identifier | ||
% input | ||
% memory_index : identifier number of element at the Tabor | ||
% AWG (corresponds to second column in | ||
% Sequencer Table | ||
% awg_channel_pair_identifiers : Some substring in the channel pair | ||
% identifiers to be matched. Sequence tables | ||
% are sorted in the same order as channel | ||
% pair identifiers substrings passed in this | ||
% variable. Default is {'AB', 'CD'}. | ||
% | ||
% ------------------------------------------------------------------------- | ||
% 2018/08 Marcel Meyer | ||
% (marcel.meyer1@rwth-aachen.de) | ||
|
||
global plsdata | ||
hws = plsdata.awg.hardwareSetup; | ||
|
||
if nargin < 4 || isempty(awg_channel_pair_identifiers) | ||
awg_channel_pair_identifiers = {'AB', 'CD'}; | ||
end | ||
|
||
known_awgs = util.py.py2mat(hws.known_awgs); | ||
sort_indices = cellfun(@(x)(find( cellfun(@(y)(~isempty(strfind(char(x.identifier), y))), awg_channel_pair_identifiers) )), known_awgs); | ||
known_awgs = known_awgs(sort_indices); | ||
|
||
%one has to arm the program to access the plottableProgram object of the | ||
%program | ||
known_awgs{channel_pair_index}.arm(program_name); | ||
|
||
plottableProgram = known_awgs{channel_pair_index}.read_complete_program(); | ||
|
||
wf1 = plottableProgram.get_segment_waveform(uint8(0), uint8(memory_index)); | ||
wf2 = plottableProgram.get_segment_waveform(uint8(1), uint8(memory_index)); | ||
|
||
wf1 = util.py.py2mat(wf1); | ||
wf2 = util.py.py2mat(wf2); | ||
|
||
wf1 = cell2mat(wf1); | ||
wf2 = cell2mat(wf2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.