Skip to content

BUG - IDEX L2B spin phase coordinates should report bin centers #3452

Description

@aldo9253

Description of the issue

Problem

L2B correctly assigns events to these circular spin-phase ranges:

Range Correct center
━━━━━━━━━━ ━━━━━━━━━━━━━━━━
315–45° 0°
────────── ────────────────
45–135° 90°
────────── ────────────────
135–225° 180°
────────── ────────────────
225–315° 270°

However, the output spin_phase coordinate contains:

[45, 135, 225, 315]

These values are boundaries of the physical bins, not their centers. Each histogram count is therefore associated with a misleading DEPEND_1 coordinate.

Recommended changes

  1. Retain the existing circular binning algorithm.

  2. Publish the spin-phase coordinate as:

    [0, 90, 180, 270]

  3. Update metadata to explicitly describe the bin ranges and centers.

  4. Add tests that verify both event assignment and output coordinates.

Steps to reproduce the issue

No response

Expected vs Actual behavior

No response

Code Snippet (If applicable)

Code

Additional notes, affected areas, and suggested fixes

No response

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions