Skip to content

Commit 0a9e6e1

Browse files
committed
Fixing some residual bugs from previous branch.
1 parent bb393c2 commit 0a9e6e1

File tree

5 files changed

+12
-21
lines changed

5 files changed

+12
-21
lines changed

exopy_pulses/pulses/manifest.enaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,6 @@ enamldef PulsesManagerManifest(PluginManifest):
438438
Shape:
439439
shape = 'tanh_shape:TanhShape'
440440
view = 'views.tanh_shape_view:TanhShapeView'
441-
Shape:
442-
shape = 'arbitrary_shape:ArbitraryShape'
443-
view = 'views.arbitrary_shape_view:ArbitraryShapeView'
444441

445442
PulsesBuildingDependenciesExtension:
446443
pass

exopy_pulses/pulses/shapes/gaussian_shape.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from numbers import Real
1313

1414
import numpy as np
15-
from atom.api import Unicode
15+
from atom.api import Str
1616

1717
from ..utils.validators import Feval
1818

@@ -24,8 +24,8 @@ class GaussianShape(AbstractShape):
2424
2525
"""
2626
#: Amplitude of the pulse this should be a number between -1.0 and 1.0
27-
amplitude = Unicode('1.0').tag(pref=True, feval=Feval(types=Real))
28-
sigma = Unicode('10.0').tag(pref=True, feval=Feval(types=Real))
27+
amplitude = Str('1.0').tag(pref=True, feval=Feval(types=Real))
28+
sigma = Str('10.0').tag(pref=True, feval=Feval(types=Real))
2929

3030
def eval_entries(self, root_vars, sequence_locals, missing, errors):
3131
""" Evaluate the amplitude of the pulse.

exopy_pulses/pulses/shapes/tanh_shape.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from numbers import Real
1313

1414
import numpy as np
15-
from atom.api import Unicode
15+
from atom.api import Str
1616

1717
from ..utils.validators import Feval
1818

@@ -24,8 +24,8 @@ class TanhShape(AbstractShape):
2424
2525
"""
2626
#: Amplitude of the pulse this should be a number between -1.0 and 1.0
27-
amplitude = Unicode('1.0').tag(pref=True, feval=Feval(types=Real))
28-
sigma = Unicode('10.0').tag(pref=True, feval=Feval(types=Real))
27+
amplitude = Str('1.0').tag(pref=True, feval=Feval(types=Real))
28+
sigma = Str('10.0').tag(pref=True, feval=Feval(types=Real))
2929

3030
def eval_entries(self, root_vars, sequence_locals, missing, errors):
3131
""" Evaluate the amplitude of the pulse.

exopy_pulses/tasks/tasks/instrs/transfer_pulse_loop_task.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from collections import OrderedDict
1616

1717
import numpy as np
18-
from atom.api import (Value, Unicode, Float, Typed, Bool, set_default, Enum)
18+
from atom.api import (Value, Str, Float, Typed, Bool, set_default, Enum)
1919

2020
from exopy.tasks.api import (InstrumentTask)
2121
from exopy.utils.atom_util import ordered_dict_from_pref, ordered_dict_to_pref
@@ -27,7 +27,7 @@ class TransferPulseLoopTask(InstrumentTask):
2727
"""
2828

2929
#: Sequence path for the case of sequence simply referenced.
30-
sequence_path = Unicode().tag(pref=True)
30+
sequence_path = Str().tag(pref=True)
3131

3232
#: Time stamp of the last modification of the sequence file.
3333
sequence_timestamp = Float().tag(pref=True)
@@ -45,17 +45,17 @@ class TransferPulseLoopTask(InstrumentTask):
4545
#: Loop variables: channels on which the loop will be done, loop parameters
4646
#: names, start value, stop value and number of points per loop
4747

48-
loop_start = Unicode('0').tag(pref=True)
48+
loop_start = Str('0').tag(pref=True)
4949

50-
loop_stop = Unicode('0').tag(pref=True)
50+
loop_stop = Str('0').tag(pref=True)
5151

52-
loop_points = Unicode('2').tag(pref=True)
52+
loop_points = Str('2').tag(pref=True)
5353

5454
#: run mode of the awg
5555
run_mode = Enum('Ext Trig', 'Int Trig', 'Continuous').tag(pref=True)
5656

5757
#: Internal trigger period in mus
58-
trigger_period = Unicode('20').tag(pref=True)
58+
trigger_period = Str('20').tag(pref=True)
5959

6060
parameters = Typed(OrderedDict, ()).tag(pref=[ordered_dict_to_pref,
6161
ordered_dict_from_pref])
@@ -155,9 +155,7 @@ def perform(self):
155155
self.write_in_database(name_parameter, loop_value[ii])
156156
for k, v in self.sequence_vars.items():
157157
seq.external_vars[k] = self.format_and_eval_string(v)
158-
# context.sequence_name = '{}_{}'.format(seq_name_0, nn+1) #RL replaced, caused bug
159158
context.sequence_name = '{}_{}'.format('', nn+first_index)
160-
# print(context.sequence_name)
161159
res, infos, errors = context.compile_and_transfer_sequence(
162160
seq,
163161
driver=self.driver)
@@ -208,7 +206,6 @@ def perform(self):
208206
self.driver.get_channel(current_ch).set_sequence_pos(current_wf,
209207
current_index)
210208
self.driver.set_jump_pos(current_index, 1)
211-
# print(channels_to_turn_on)
212209
self.driver.set_goto_pos(current_index, 1)
213210
self.write_in_database('num_loop', current_index)
214211
for cc in channels_to_turn_on:

exopy_pulses/tasks/tasks/instrs/transfer_sequence_task.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import matplotlib.pyplot as plt
2222
import numpy as np
2323

24-
2524
class TransferPulseSequenceTask(InstrumentTask):
2625
"""Build and transfer a pulse sequence to an instrument.
2726
@@ -39,7 +38,6 @@ class TransferPulseSequenceTask(InstrumentTask):
3938
sequence_vars = Typed(OrderedDict, ()).tag(pref=(ordered_dict_to_pref,
4039
ordered_dict_from_pref))
4140

42-
4341
def check(self, *args, **kwargs):
4442
"""Check that the sequence can be compiled.
4543
@@ -91,7 +89,6 @@ def perform(self):
9189
for k, v in self.sequence_vars.items():
9290
seq.external_vars[k] = self.format_and_eval_string(v)
9391

94-
# self.driver.run_mode = 'CONT'
9592
res, infos, errors = context.compile_and_transfer_sequence(seq,
9693
self.driver)
9794
if not res:

0 commit comments

Comments
 (0)