Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aliby-mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Swain Lab
aliby
aliby-mirror
Commits
5c298b49
Commit
5c298b49
authored
3 years ago
by
Alán Muñoz
Browse files
Options
Downloads
Patches
Plain Diff
change names
Former-commit-id: 20564313baff9451f0f8f86dc5300f4cfd8ffb3b
parent
6d46ec2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/processes/aggregate.py
+20
-11
20 additions, 11 deletions
core/processes/aggregate.py
core/processes/picker.py
+1
-1
1 addition, 1 deletion
core/processes/picker.py
core/processor.py
+6
-8
6 additions, 8 deletions
core/processor.py
with
27 additions
and
20 deletions
core/processes/aggregate.py
+
20
−
11
View file @
5c298b49
...
...
@@ -12,13 +12,13 @@ class aggregateParameters(ParametersABC):
reduction: str to be passed to a dataframe for collapsing across columns
"""
def
__init__
(
self
,
reduction
):
def
__init__
(
self
,
reduction
s
):
super
().
__init__
()
self
.
reduction
=
reduction
self
.
reduction
s
=
reduction
s
@classmethod
def
default
(
cls
):
return
cls
.
from_dict
({
"
reduction
"
:
"
mean
"
})
return
cls
.
from_dict
({
"
reduction
s
"
:
[
"
mean
"
,
"
median
"
,
"
max
"
]
})
class
aggregate
(
ProcessABC
):
...
...
@@ -31,13 +31,14 @@ class aggregate(ProcessABC):
def
run
(
self
,
signals
):
names
=
np
.
array
([
signal
.
index
.
names
for
signal
in
signals
])
if
not
np
.
all
(
names
==
names
[
0
]):
"
Not all indices are the same, selecting smallest set
"
index
=
signals
[
0
].
index
for
s
in
signals
[
0
:]:
index
=
index
.
intersection
(
s
.
index
)
index
=
signals
[
0
].
index
for
s
in
signals
[
0
:]:
index
=
index
.
intersection
(
s
.
index
)
signals
=
[
s
.
loc
[
index
]
for
s
in
signals
]
tmp_signals
=
[
s
.
loc
[
index
]
for
s
in
signals
]
for
i
,
s
in
enumerate
(
signals
):
tmp_signals
[
i
].
name
=
s
.
name
signals
=
tmp_signals
assert
len
(
signals
),
"
Signals is empty
"
...
...
@@ -54,9 +55,17 @@ class aggregate(ProcessABC):
for
ind
in
item
.
split
(
"
/
"
)
if
ind
not
in
bad_words
]
colnames
=
[
"
_
"
.
join
(
get_keywords
(
s
))
for
s
in
signals
]
colnames
=
[
"
_
"
.
join
(
get_keywords
(
s
)
+
[
red
])
for
s
in
signals
for
red
in
self
.
parameters
.
reductions
]
concat
=
pd
.
concat
(
[
getattr
(
signal
,
self
.
parameters
.
reduction
)(
axis
=
1
)
for
signal
in
signals
],
[
getattr
(
signal
,
red
)(
axis
=
1
)
for
signal
in
signals
for
red
in
self
.
parameters
.
reductions
],
names
=
signals
[
0
].
index
.
names
,
axis
=
1
,
)
...
...
This diff is collapsed.
Click to expand it.
core/processes/picker.py
+
1
−
1
View file @
5c298b49
...
...
@@ -10,7 +10,7 @@ from utils_find_1st import find_1st, cmp_equal
import
numpy
as
np
import
pandas
as
pd
from
core.cells
import
CellsHDF
from
p
core.cells
import
CellsHDF
from
agora.base
import
ParametersABC
,
ProcessABC
from
postprocessor.core.functions.tracks
import
max_ntps
,
max_nonstop_ntps
...
...
This diff is collapsed.
Click to expand it.
core/processor.py
+
6
−
8
View file @
5c298b49
...
...
@@ -8,10 +8,10 @@ import pandas as pd
from
tqdm
import
tqdm
from
agora.base
import
ParametersABC
from
core.io.writer
import
Writer
from
core.io.signal
import
Signal
from
p
core.io.writer
import
Writer
from
p
core.io.signal
import
Signal
from
core.cells
import
Cells
from
p
core.cells
import
Cells
from
postprocessor.core.processes.merger
import
mergerParameters
,
merger
from
postprocessor.core.processes.picker
import
pickerParameters
,
picker
...
...
@@ -82,15 +82,13 @@ class PostProcessorParameters(ParametersABC):
"
/extraction/em_ratio_bgsub/np_max/median
"
,
"
/extraction/gsum/np_max/median
"
,
"
/extraction/gsum/np_max/mean
"
,
"
/
postprocessing/bud_metric/extraction_general_None_volume
"
,
"
/
postprocessing/bud_metric/extraction_em_ratio_np_max_mean
"
,
"
/
postprocessing/bud_metric/extraction_em_ratio_np_max_median
"
,
"
postprocessing/bud_metric/extraction_general_None_volume
"
,
"
postprocessing/bud_metric/extraction_em_ratio_np_max_mean
"
,
"
postprocessing/bud_metric/extraction_em_ratio_np_max_median
"
,
"
postprocessing/dsignal/extraction_general_None_volume
"
,
"
postprocessing/dsignal/postprocessing_bud_metric_extraction_general_None_volume
"
,
"
postprocessing/dsignal/postprocessing_bud_metric_extraction_em_ratio_np_max_median
"
,
"
postprocessing/dsignal/postprocessing_bud_metric_extraction_em_ratio_np_max_mean
"
,
"
postprocessing/dsignal/postprocessing_bud_metric_extraction_em_ratio_bgsub_np_max_median
"
,
"
postprocessing/dsignal/postprocessing_bud_metric_extraction_em_ratio_bgsub_np_max_mean
"
,
]
],
),
...
...
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