Task #7306 (closed)
BUG: param range miscalculated
Reported by: | atarkowska | Owned by: | wmoore |
---|---|---|---|
Priority: | critical | Milestone: | OMERO-4.4 |
Component: | Scripting | Version: | n.a. |
Keywords: | n.a. | Cc: | jburel |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2011-12-13 (4) |
Description (last modified by atarkowska)
Referring to #7305 script misinterpret range values when they are set to '0'. The problem is in calculateRanges where commandArgs "T_End" and "Z_End" is 0 is treated as entire range rather then particular plane. Giving commandArgs= {"Z_Start":0, "Z_End":0,"T_Start": 1, "T_End": 5} will make movie for entire Z range and T in (1-5) rather then generate movie for first plane and T in (1-5)
Instead of:
if "Z_Start" in commandArgs and commandArgs["Z_Start"] = 0 and commandArgs["Z_Start"] < sizeZ: zStart = commandArgs["Z_Start"] if "Z_End" in commandArgs and commandArgs["Z_End"] = 0 and commandArgs["Z_End"] < sizeZ: zEnd = commandArgs["Z_End"]+1
should be:
if "Z_Start" in commandArgs and commandArgs["Z_Start"] >= 0 and commandArgs["Z_Start"] < sizeZ: zStart = commandArgs["Z_Start"] if "Z_End" in commandArgs and commandArgs["Z_End"] >= 0 and commandArgs["Z_End"] < sizeZ: zEnd = commandArgs["Z_End"]+1
Change History (8)
comment:1 Changed 12 years ago by atarkowska
- Summary changed from BUG to BUG: param range miscalculated
comment:2 Changed 12 years ago by atarkowska
- Cc jburel added
- Description modified (diff)
comment:3 Changed 12 years ago by atarkowska
- Description modified (diff)
comment:4 Changed 12 years ago by jburel
comment:5 Changed 12 years ago by jmoore
- Sprint changed from 2011-11-29 (3) to 2011-12-13 (4)
Moved from sprint 2011-11-29 (3)
comment:6 Changed 12 years ago by wmoore
- Status changed from new to accepted
comment:7 Changed 12 years ago by wmoore
- Resolution set to fixed
- Status changed from accepted to closed
comment:8 Changed 12 years ago by Will Moore <will@…>
- Remaining Time set to 0
(In [bb4b28074f10fadf502d3e0f1a8e6c25d9a40743/ome.git] on branch develop) Fix Z/T ranges in Make_Movie.py. Closes #7306
The script was initially only used from the viewer where the default z (resp. t) was used to set the plane. Now that we use it from other location it makes sense to adjust.
Changing the logic of the script is valid but we will have to announce it when we release so we reduce the impact.
I will review that when I come back.
You should have a scripts review sprint (e.g. #7102) to improve error handling and parameters check.