Skip to content

feat: prepare a frame so faint peaks are visible (UC-1.5) #11

Backlog

Description

@Akadib

Problem

As a labeler, I want to see faint Bragg peaks and ice rings that are invisible on a plain linear scale.

Proposed solution

  • prepare(frame, mask=None, saturation=None, binning=4) returns a float32 image:
    1. masked pixels and pixels at or above saturation become NaN
    2. shrink by keeping the maximum in each binning x binning block (nanmax)
    3. subtract the background: the median of each block of the shrunken image (nanmedian, block size background_block, default 16, numpy only)
    4. clip at a high percentile and scale to 0..1
  • show CLI draws the prepared frame with optional ice and resolution rings.
  • Prepare one full 3262 x 3108 frame in under 0.3 s on the lab Mac (measured with bench, UC-1.10).

Done when

  • Unit tests: masked pixels never become bright; output shape is input shape // binning
  • Screenshot of A07 frame 0 with rings in the PR
  • News file added

Activity

  1. added theissue type on Dec 1, 2026
  2. added
    enhancement
    good first issue
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions