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
61b2a2c3
Commit
61b2a2c3
authored
2 years ago
by
pswain
Browse files
Options
Downloads
Patches
Plain Diff
changed @cached_property to @property to run in 3.7
parent
57252253
Branches
dev_python3_7
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/agora/io/cells.py
+3
-3
3 additions, 3 deletions
src/agora/io/cells.py
src/agora/io/signal.py
+9
-8
9 additions, 8 deletions
src/agora/io/signal.py
src/aliby/pipeline.py
+6
-2
6 additions, 2 deletions
src/aliby/pipeline.py
with
18 additions
and
13 deletions
src/agora/io/cells.py
+
3
−
3
View file @
61b2a2c3
...
...
@@ -3,7 +3,7 @@ import typing as t
from
collections.abc
import
Iterable
from
itertools
import
groupby
from
pathlib
import
Path
,
PosixPath
from
functools
import
lru_cache
,
cached_property
from
functools
import
lru_cache
import
h5py
import
numpy
as
np
...
...
@@ -268,7 +268,7 @@ class Cells:
def
mothers_in_trap
(
self
,
trap_id
:
int
):
return
self
.
mothers
[
trap_id
]
@
cached_
property
@property
def
mothers
(
self
):
"""
Return nested list with final prediction of mother id for each cell
...
...
@@ -280,7 +280,7 @@ class Cells:
self
.
ntraps
,
)
@
cached_
property
@property
def
mothers_daughters
(
self
)
->
np
.
ndarray
:
"""
Return mothers and daugters as a single array with three columns:
...
...
This diff is collapsed.
Click to expand it.
src/agora/io/signal.py
+
9
−
8
View file @
61b2a2c3
import
typing
as
t
from
copy
import
copy
from
functools
import
cached_property
,
lru_cache
#from functools import cached_property, lru_cache
from
functools
import
lru_cache
from
pathlib
import
PosixPath
import
bottleneck
as
bn
...
...
@@ -77,12 +78,12 @@ class Signal(BridgeH5):
)
return
df
@
cached_
property
@property
def
ntimepoints
(
self
):
with
h5py
.
File
(
self
.
filename
,
"
r
"
)
as
f
:
return
f
[
"
extraction/general/None/area/timepoint
"
][
-
1
]
+
1
@
cached_
property
@property
def
tinterval
(
self
)
->
int
:
tinterval_location
=
"
time_settings/timeinterval
"
with
h5py
.
File
(
self
.
filename
,
"
r
"
)
as
f
:
...
...
@@ -214,12 +215,12 @@ class Signal(BridgeH5):
for
sig
in
self
.
siglist
:
print
(
sig
)
@
cached_
property
@property
def
p_available
(
self
):
"""
Print signal list
"""
self
.
datasets
@
cached_
property
@property
def
available
(
self
):
"""
Return list of available signals
"""
try
:
...
...
@@ -237,17 +238,17 @@ class Signal(BridgeH5):
def
get_merged
(
self
,
dataset
):
return
self
.
apply_prepost
(
dataset
,
picks
=
False
)
@
cached_
property
@property
def
merges
(
self
):
with
h5py
.
File
(
self
.
filename
,
"
r
"
)
as
f
:
dsets
=
f
.
visititems
(
self
.
_if_merges
)
return
dsets
@
cached_
property
@property
def
n_merges
(
self
):
return
len
(
self
.
merges
)
@
cached_
property
@property
def
picks
(
self
):
with
h5py
.
File
(
self
.
filename
,
"
r
"
)
as
f
:
dsets
=
f
.
visititems
(
self
.
_if_picks
)
...
...
This diff is collapsed.
Click to expand it.
src/aliby/pipeline.py
+
6
−
2
View file @
61b2a2c3
...
...
@@ -7,7 +7,11 @@ import re
import
traceback
import
typing
as
t
from
copy
import
copy
from
importlib.metadata
import
version
try
:
from
importlib.metadata
import
version
except
ImportError
:
# for python < 3.8
from
importlib_metadata
import
version
from
pathlib
import
Path
,
PosixPath
from
time
import
perf_counter
from
typing
import
Union
...
...
@@ -597,7 +601,7 @@ class Pipeline(ProcessABC):
]:
"""
Initialise pipeline components and if necessary use
exising file to continue existing experiments.
exis
t
ing file to continue existing experiments.
Parameters
...
...
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