Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
platy-browser-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Christian Tischer
platy-browser-data
Commits
ca709159
Commit
ca709159
authored
5 years ago
by
Kimberly Isobel Meechan
Browse files
Options
Downloads
Patches
Plain Diff
Changed to shape_pixelsize, no n_pixels in table
parent
46268e2c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!9
Morphology
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/extension/attributes/morphology_impl.py
+6
-4
6 additions, 4 deletions
scripts/extension/attributes/morphology_impl.py
with
6 additions
and
4 deletions
scripts/extension/attributes/morphology_impl.py
+
6
−
4
View file @
ca709159
from
datetime
import
datetime
#TODO - uncomment this part
# this is a task called by multiple processes,
# so we need to restrict the number of threads used by numpy
from
cluster_tools.utils.numpy_utils
import
set_numpy_threads
set_numpy_threads
(
1
)
#
from cluster_tools.utils.numpy_utils import set_numpy_threads
#
set_numpy_threads(1)
import
numpy
as
np
import
h5py
...
...
@@ -31,11 +32,12 @@ def get_scale_factor(path, key_full, key, resolution):
return
scale_factor
# changed to shape_pixel_size, is the plan to go to n_pixels in future?
def
filter_table
(
table
,
min_size
,
max_size
):
if
max_size
is
None
:
table
=
table
.
loc
[
table
[
'
n
_pixels
'
]
>=
min_size
,
:]
table
=
table
.
loc
[
table
[
'
shape
_pixels
ize
'
]
>=
min_size
,
:]
else
:
criteria
=
np
.
logical_and
(
table
[
'
n
_pixels
'
]
>
min_size
,
table
[
'
n
_pixels
'
]
<
max_size
)
criteria
=
np
.
logical_and
(
table
[
'
shape
_pixels
ize
'
]
>
min_size
,
table
[
'
shape
_pixels
ize
'
]
<
max_size
)
table
=
table
.
loc
[
criteria
,
:]
return
table
...
...
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