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
77450233
Commit
77450233
authored
10 months ago
by
pswain
Browse files
Options
Downloads
Patches
Plain Diff
added poetry.lock for python 3.10
parent
3152bb29
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
poetry3_10.lock
+2904
-0
2904 additions, 0 deletions
poetry3_10.lock
src/agora/io/metadata.py
+32
-0
32 additions, 0 deletions
src/agora/io/metadata.py
with
2936 additions
and
0 deletions
poetry3_10.lock
0 → 100644
+
2904
−
0
View file @
77450233
source diff could not be displayed: it is too large. Options to address this:
view the blob
.
This diff is collapsed.
Click to expand it.
src/agora/io/metadata.py
+
32
−
0
View file @
77450233
...
...
@@ -15,6 +15,7 @@ for tiler, segmentation, and extraction.
WARNING: grammars depend on the directory structure of a local log-file_parser
repository.
"""
import
glob
import
logging
import
numpy
as
np
...
...
@@ -187,6 +188,37 @@ def find_channels_by_position(meta):
return
channels_dict
def
dir_to_meta
(
path
:
Path
,
suffix
=
"
tiff
"
):
filenames
=
list
(
path
.
glob
(
f
"
*.
{
suffix
}
"
))
try
:
# Deduct order from filenames
dimorder
=
""
.
join
(
map
(
lambda
x
:
x
[
0
],
filenames
[
0
].
stem
.
split
(
"
_
"
)[
1
:])
)
dim_value
=
list
(
map
(
lambda
f
:
filename_to_dict_indices
(
f
.
stem
),
path
.
glob
(
"
*.tiff
"
),
)
)
maxes
=
[
max
(
map
(
lambda
x
:
x
[
dim
],
dim_value
))
for
dim
in
dimorder
]
mins
=
[
min
(
map
(
lambda
x
:
x
[
dim
],
dim_value
))
for
dim
in
dimorder
]
_dim_shapes
=
[
max_val
-
min_val
+
1
for
max_val
,
min_val
in
zip
(
maxes
,
mins
)
]
meta
=
{
"
size_
"
+
dim
:
shape
for
dim
,
shape
in
zip
(
dimorder
,
_dim_shapes
)
}
except
Exception
as
e
:
print
(
f
"
Warning:Metadata: Cannot extract dimensions from filenames. Empty meta set
{
e
}
"
)
meta
=
{}
return
meta
### legacy code for acq and log files ###
...
...
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