Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Dimple anode viewer does not focus on blobs

Offen
#392 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
65/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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)
Vorherrschende Sprache
Python
Sterne
2
Forks
3
Ø Merge
1 T. 14 Std.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus DiamondLightSource/python-dlstbx

Alle Issues in DiamondLightSource/python-dlstbx

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.