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
8ef9b850
Commit
8ef9b850
authored
2 years ago
by
Alán Muñoz
Browse files
Options
Downloads
Patches
Plain Diff
add docs
parent
3e3081f0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
extraction/core/extractor.py
+14
-3
14 additions, 3 deletions
extraction/core/extractor.py
with
14 additions
and
3 deletions
extraction/core/extractor.py
+
14
−
3
View file @
8ef9b850
...
...
@@ -256,9 +256,18 @@ class Extractor(ProcessABC):
self
,
traps
:
Union
[
np
.
array
,
None
],
masks
:
list
,
red_metrics
:
dict
,
**
kwargs
)
->
dict
:
"""
Wrapper to apply reduction and then extraction.
Parameters
----------
:param red_metrics: dict in which keys are reduction funcions and
values are strings indicating the metric function
:**kwargs: All other arguments, must include masks and traps.
Returns
------
Dictionary of dataframes with the corresponding reductions and metrics nested.
"""
reduced_traps
=
{}
...
...
@@ -280,8 +289,9 @@ class Extractor(ProcessABC):
return
d
def
reduce_dims
(
self
,
img
:
np
.
array
,
method
=
None
)
->
np
.
array
:
# assert len(img.shape) == 3, "Incorrect number of dimensions"
"""
Collapse a z-stack into a single file. It may perform a null operation.
"""
if
method
is
None
:
return
img
...
...
@@ -297,6 +307,8 @@ class Extractor(ProcessABC):
**
kwargs
,
)
->
dict
:
"""
Extract individual time-point from images and masks
:param tp: int timepoint from which to extract results
:param tree: dict of dict {channel : {reduction_function : metrics}}
:**kwargs: Must include masks and preferably labels.
...
...
@@ -398,7 +410,6 @@ class Extractor(ProcessABC):
**
kwargs
,
)
# del traps, masks
return
d
def
get_imgs
(
self
,
channel
,
traps
,
channels
=
None
):
...
...
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