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
bd8df759
Commit
bd8df759
authored
5 years ago
by
Constantin Pape
Browse files
Options
Downloads
Patches
Plain Diff
Fix calculation of scale factors for bdv-n5
parent
a0402789
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
scripts/files/for_upload.py
+2
-12
2 additions, 12 deletions
scripts/files/for_upload.py
with
2 additions
and
12 deletions
scripts/files/for_upload.py
+
2
−
12
View file @
bd8df759
...
@@ -12,9 +12,6 @@ from pybdv.metadata import write_n5_metadata, get_resolution, indent_xml
...
@@ -12,9 +12,6 @@ from pybdv.metadata import write_n5_metadata, get_resolution, indent_xml
def
normalize_scale_factors
(
scale_factors
,
start_scale
):
def
normalize_scale_factors
(
scale_factors
,
start_scale
):
if
start_scale
==
0
:
return
scale_factors
# we expect scale_factors[0] == [1 1 1]
# we expect scale_factors[0] == [1 1 1]
assert
np
.
prod
(
scale_factors
[
0
])
==
1
assert
np
.
prod
(
scale_factors
[
0
])
==
1
...
@@ -25,15 +22,8 @@ def normalize_scale_factors(scale_factors, start_scale):
...
@@ -25,15 +22,8 @@ def normalize_scale_factors(scale_factors, start_scale):
scale_factors
[
scale
-
1
])]
scale_factors
[
scale
-
1
])]
rel_scales
.
append
(
rel_factor
)
rel_scales
.
append
(
rel_factor
)
# start at new scale
# return the relative scales starting at the new scale
new_factors
=
[[
1
,
1
,
1
]]
+
rel_scales
[(
start_scale
+
1
):]
new_factors
=
[[
1.
,
1.
,
1.
]]
+
rel_scales
[(
start_scale
+
1
):]
# back to absolute factors
for
scale
in
range
(
1
,
len
(
new_factors
)):
new_factor
=
[
sf
*
prev_sf
for
sf
,
prev_sf
in
zip
(
new_factors
[
scale
],
new_factors
[
scale
-
1
])]
new_factors
[
scale
]
=
new_factor
return
new_factors
return
new_factors
...
...
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