Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alibylite
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
alibylite
Commits
b97331da
Commit
b97331da
authored
1 year ago
by
pswain
Browse files
Options
Downloads
Patches
Plain Diff
feature(Grouper): added specifying positions in concat_signal
parent
eb00e2b2
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
src/postprocessor/grouper.py
+11
-1
11 additions, 1 deletion
src/postprocessor/grouper.py
with
11 additions
and
1 deletion
src/postprocessor/grouper.py
+
11
−
1
View file @
b97331da
...
...
@@ -76,6 +76,7 @@ class Grouper(ABC):
path
:
str
,
pool
:
t
.
Optional
[
int
]
=
None
,
mode
:
str
=
"
retained
"
,
selected_positions
:
t
.
List
[
str
]
=
None
,
**
kwargs
,
):
"""
...
...
@@ -101,6 +102,8 @@ class Grouper(ABC):
identified mother.
If
"
families
"
, get Signal with merging, picking, and lineage
information applied.
selected_positions: list[str]
If defined, get signals for only these positions.
**kwargs : key, value pairings
Named arguments for concat_ind_function
...
...
@@ -111,6 +114,12 @@ class Grouper(ABC):
if
path
.
startswith
(
"
/
"
):
path
=
path
.
strip
(
"
/
"
)
good_positions
=
self
.
filter_positions
(
path
)
if
selected_positions
is
not
None
:
good_positions
=
{
key
:
value
for
key
,
value
in
good_positions
.
items
()
if
key
in
selected_positions
}
if
good_positions
:
kwargs
[
"
mode
"
]
=
mode
records
=
self
.
pool_function
(
...
...
@@ -189,7 +198,7 @@ class Grouper(ABC):
position_name
=
name
,
**
kwargs
,
)
for
name
,
position
in
self
.
positions
.
items
()
for
name
,
position
in
positions
.
items
()
]
return
records
...
...
@@ -283,6 +292,7 @@ def concat_one_signal(
if
position_name
is
None
:
# name of h5 file
position_name
=
position
.
stem
print
(
f
"
Finding signal for
{
position_name
}
.
"
)
if
mode
==
"
retained
"
:
combined
=
position
.
retained
(
path
,
**
kwargs
)
elif
mode
==
"
raw
"
:
...
...
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