Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pulse_lib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QuTech QDLabs
pulse_lib
Commits
4a00af3e
Commit
4a00af3e
authored
2 years ago
by
Sander Snoo
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
63d49aac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pulse_lib/segments/data_classes/data_generic.py
+10
-21
10 additions, 21 deletions
pulse_lib/segments/data_classes/data_generic.py
with
10 additions
and
21 deletions
pulse_lib/segments/data_classes/data_generic.py
+
10
−
21
View file @
4a00af3e
...
...
@@ -15,7 +15,6 @@ class parent_data(ABC):
makes a template for default functions that are expected in a data object
"""
start_time
=
0
software_marker_data
=
dict
()
waveform_cache
=
LruCache
(
100
)
...
...
@@ -81,16 +80,6 @@ class parent_data(ABC):
'''
raise
NotImplementedError
()
def
add_software_marker
(
self
,
marker_name
,
time
):
'''
add a marker in software (used as arguments for HVI commands)
Args:
marker_name (str) : name of the maker
time (double) : time in ns where to apply the marker
'''
self
.
software_marker_data
[
marker_name
]
=
time
def
render
(
self
,
sample_rate
=
1e9
,
ref_channel_states
=
None
,
LO
=
None
):
'''
renders pulse
...
...
@@ -165,29 +154,29 @@ class data_container(np.ndarray):
def
total_time
(
self
):
shape
=
self
.
shape
if
shape
==
(
1
,):
return
np
.
array
([
self
[
0
].
total_time
])
# fast short cut
times
=
np
.
empty
(
shape
)
times
[
0
]
=
self
[
0
].
total_time
return
times
self
=
self
.
flatten
()
times
=
np
.
empty
(
self
.
shape
)
flat
=
self
.
flatten
()
times
=
np
.
empty
(
flat
.
shape
)
for
i
in
range
(
len
(
times
)):
times
[
i
]
=
self
[
i
].
total_time
times
[
i
]
=
flat
[
i
].
total_time
self
=
self
.
reshape
(
shape
)
times
=
times
.
reshape
(
shape
)
return
times
@property
def
start_time
(
self
):
shape
=
self
.
shape
self
=
self
.
flatten
()
times
=
np
.
empty
(
self
.
shape
)
flat
=
self
.
flatten
()
times
=
np
.
empty
(
flat
.
shape
)
for
i
in
range
(
len
(
times
)):
times
[
i
]
=
self
[
i
].
start_time
times
[
i
]
=
flat
[
i
].
start_time
self
=
self
.
reshape
(
shape
)
times
=
times
.
reshape
(
shape
)
return
times
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment