Skip to content

Commit e3cd563

Browse files
committed
Minor Changes
1 parent a8b79c9 commit e3cd563

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

pyepr/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def downconvert_dataset(dataset, filter_type='boxcar',IF=None,reduce=True,sampli
436436

437437

438438
if filter_type == 'boxcar':
439-
filter_width = kwargs.get('filter_width',20)
439+
filter_width = int(round(kwargs.get('filter_width',20)))
440440
funct = lambda data: np.convolve(data,np.ones(filter_width),mode='same')
441441
dc_first=True
442442
elif isinstance(filter_type, ad_pulses.Pulse): # match filter to a epr Pulse

pyepr/sequences.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,11 @@ def _estimate_time(self) -> float:
218218
"""
219219
self._buildPhaseCycle()
220220
acqs = self.averages.value * self.shots.value * self.pcyc_dets.shape[0]
221+
222+
reptime = np.mean(val_in_us(self.reptime))
221223
if hasattr(self,'evo_params'):
222224
acqs *= np.prod([np.prod(param.dim) for param in self.evo_params])
223-
time = acqs * self.reptime.value * 1e-6
225+
time = acqs * reptime * 1e-6
224226

225227
self.time = Parameter(name="time", value=f"{(time // 3600):.0f}:{(time % 3600) // 60:.0f}:{(time % 60):.0f}", unit="HH:MM:SS",
226228
description="Estimated sequence run time")
@@ -428,6 +430,9 @@ def __str__(self):
428430
if type(param.value) is str:
429431
seq_param_string += "{:<10} {:<12} {:<10} {:<30} \n".format(
430432
param.name, param.value, unit, param.description)
433+
elif param.value is None:
434+
seq_param_string += "{:<10} {:<12} {:<10} {:<30} \n".format(
435+
param.name, "None", unit, param.description)
431436
else:
432437
seq_param_string += "{:<10} {:<12.5g} {:<10} {:<30} \n".format(
433438
param.name, param.value, unit, param.description)
@@ -945,9 +950,9 @@ def __init__(self, *, B, freq, Bwidth, reptime, averages, shots, **kwargs) -> No
945950
shots=shots, **kwargs)
946951
self.name = "FieldSweepSequence"
947952

948-
953+
dim = Bwidth // kwargs.get('step',1)
949954
self.B = Parameter(
950-
"B", value=B, start = -Bwidth/2, step=1, dim=Bwidth, unit="Gauss", description="Field sweep width"
955+
"B", value=B, start = -Bwidth/2, step=kwargs.get('step',1), dim=dim, unit="Gauss", description="Field sweep width"
951956
)
952957

953958
self.evolution([self.B])

0 commit comments

Comments
 (0)