Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AWG control
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
whuie2
AWG control
Commits
e3024b2f
Commit
e3024b2f
authored
2 years ago
by
xiyehu2
Browse files
Options
Downloads
Patches
Plain Diff
added skipping case consideration in get_rearrange_paths
parent
d36659dc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Python/waveform.py
+3
-1
3 additions, 1 deletion
Python/waveform.py
with
3 additions
and
1 deletion
Python/waveform.py
+
3
−
1
View file @
e3024b2f
...
...
@@ -3,7 +3,7 @@ from typing import Dict, Tuple, Any, List
import
numpy
as
np
from
scipy.interpolate
import
interp1d
from
AWG
import
*
import
cupy
as
cp
#
import cupy as cp
import
scipy.optimize
as
spopt
...
...
@@ -319,6 +319,8 @@ def get_rearrange_paths(
:param t_idx: indices of tweezer positions in target pattern.
:returns: 2d numpy array containing moving path trajectories
"""
if
len
(
f_idx
)
<
len
(
t_idx
):
return
np
.
array
([])
cm
=
abs
(
np
.
subtract
.
outer
(
f_idx
,
t_idx
))
row
,
col
=
spopt
.
linear_sum_assignment
(
cm
)
return
np
.
stack
([
f_idx
[
row
],
t_idx
]).
T
...
...
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