Skip to content

BandStructure2D follow-ups after #304 #309

Open

Description

@lllangWV

Found by the verifiers of #304. These exist on dev at 499b1bc after #304's grid fix.

  • The 1e-12 edge inset is not enough when fractional slice points carry float32 rounding (about 1e-8). BiSb with normal=(1,1,0), 30x30, padding 10, fractional mode leaves 12 NaN points at grid points (28,0) and (29,0). The comment at bandstructure2D.py:155 overstates the fix. A RegularGridInterpolator on the padded fractional mesh would remove the hull edge case.
  • Planes whose cut through the mesh is not a parallelogram (for example normal (1,1,1)) still leave about half the rectangular grid NaN.
  • No test uses a plane whose normal is not along kz: replacing the computed across axis with 2 (bandstructure2D.py:159) passes every test, and leaves 900/900 points NaN on a vertical plane.
  • The grid_interpolation docstrings say "(u, v) directions", but for normal=(0,1,0) axis 0 now runs along v.
  • PlaneInfo.u_limits/v_limits hold the slice's Cartesian bounding box, not the grid's extent.
  • A point with NaN height still gets NaN x and y from the 2 pi scale.
  • get_uv_bands_grid in plotter/bs_2d_plot.py is dead code.

Activity

  1. added
    bugSomething isn't working
    agent-queueAgent follow-up; worked through by a backlog sweep
    on Oct 4, 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

    agent-queueAgent follow-up; worked through by a backlog sweepbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions