Dimple anode viewer does not focus on blobs
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
Look for the dimple anode viewer code, likely in a file related to dimple or viewer. The provided helper function shows how to focus on an isosurface. Find where the viewer currently focuses on the nearest atom and modify it to use the isosurface focus method. Test by running the viewer with anomalous density blobs to ensure the view centers on the blob.
由索引模型根据 Issue 内容生成。
描述
The dimpe anode viewer focusses on the nearest atom to the blob. In cases of unmodelled anomalous density, the blob can be outside of the focussed view as it picks the nearest atom.
Encountered a similar problem when making the metal_iid viewer and solved it with this helper function, which focusses on the isosurface itself rather than the nearest atom:
def generate_isosurfaces_and_focus_on_current_peak(
builder: mvs.Builder,
peaks: list[Peak],
focus_peak_num: int,
isovalue=5,
):
for peak_num, _ in enumerate(peaks, start=1):
# Add anomalous double difference map for the current peak
ccp4 = builder.download(url=f"map{peak_num}").parse(format="map")
isosurface_peak = (
ccp4.volume()
.representation(
type="isosurface",
relative_isovalue=isovalue,
show_wireframe=True,
show_faces=False,
)
.color(color="#da21fa")
.opacity(opacity=0.25)
)
if peak_num == focus_peak_num:
isosurface_peak.focus() # focus on the current peak site
# Add 2FO-FC map for the current peak
ccp4_2fo_fc = builder.download(url=f"fmap{peak_num}").parse(format="map")
ccp4_2fo_fc.volume().representation(
type="isosurface",
relative_isovalue=1.5,
show_wireframe=True,
show_faces=False,
).color(color="#2f78d7").opacity(opacity=0.25)
def generate_isosurfaces_and_focus_on_current_peak(
builder: mvs.Builder,
peaks: list[Peak],
focus_peak_num: int,
isovalue=5,
):
for peak_num, _ in enumerate(peaks, start=1):
# Add anomalous double difference map for the current peak
ccp4 = builder.download(url=f"map{peak_num}").parse(format="map")
isosurface_peak = (
ccp4.volume()
.representation(
type="isosurface",
relative_isovalue=isovalue,
show_wireframe=True,
show_faces=False,
)
.color(color="#da21fa")
.opacity(opacity=0.25)
)
if peak_num == focus_peak_num:
isosurface_peak.focus() # focus on the current peak site
# Add 2FO-FC map for the current peak
ccp4_2fo_fc = builder.download(url=f"fmap{peak_num}").parse(format="map")
ccp4_2fo_fc.volume().representation(
type="isosurface",
relative_isovalue=1.5,
show_wireframe=True,
show_faces=False,
).color(color="#2f78d7").opacity(opacity=0.25)
- 主要语言
- Python
- 星标
- 2
- 派生
- 3
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 5
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DiamondLightSource/python-dlstbx 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 52/100
-
难度 4/5 3-5 天 新手友好度 35/100
DiamondLightSource/python-dlstbx#322 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 42/100
-
难度 4/5 3-5 天 新手友好度 35/100
DiamondLightSource/python-dlstbx#289 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 42/100
DiamondLightSource/python-dlstbx#255 · 4 条评论 ·
查看 DiamondLightSource/python-dlstbx 的全部 Issue
相似的 Issue
-
needs triage
难度 2/5 1-3 小时 新手友好度 83/100
darnitdevorg/darnit#587 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
accessibility good first issue
难度 1/5 1-3 小时 新手友好度 92/100
维护者通常 1 天内回复
-
llm translation
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
bug bug-hunt
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复