Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
reversaal
OhmPi
Commits
683938bb
Commit
683938bb
authored
Dec 18, 2019
by
Forquet Nicolas
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab-ssh.irstea.fr:remi.clement/ohmpy into develop
parents
076f8cee
d28ee65f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
ohmpy_v_1_01.py
ohmpy_v_1_01.py
+12
-5
No files found.
ohmpy_v_1_01.py
View file @
683938bb
...
...
@@ -53,12 +53,19 @@ def switch_mux(quadripole):
# function to find rows with identical values in different columns
def
find_identical_in_line
(
array_object
):
output
=
[]
for
i
in
range
(
len
(
array_object
[:,
1
]))
:
temp
=
numpy
.
zeros
(
len
(
array_object
[
1
,:])
)
for
j
in
range
(
len
(
array_object
[
1
,:]
)):
temp
[
j
]
=
numpy
.
count_nonzero
(
array_object
[
i
,:]
==
array_object
[
i
,
j
])
if
array_object
.
ndim
==
1
:
temp
=
numpy
.
zeros
(
4
)
for
i
in
range
(
len
(
array_object
)):
temp
[
i
]
=
numpy
.
count_nonzero
(
array_object
==
array_object
[
i
])
if
any
(
temp
>
1
):
output
.
append
(
i
)
output
.
append
(
0
)
else
:
for
i
in
range
(
len
(
array_object
[:,
1
])):
temp
=
numpy
.
zeros
(
len
(
array_object
[
1
,:]))
for
j
in
range
(
len
(
array_object
[
1
,:])):
temp
[
j
]
=
numpy
.
count_nonzero
(
array_object
[
i
,:]
==
array_object
[
i
,
j
])
if
any
(
temp
>
1
):
output
.
append
(
i
)
return
output
# read quadripole file and apply tests
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment