Skip to content

fix(meep): log z_crop application instead of silently rewriting layers#116

Merged
vvahidd merged 1 commit intomainfrom
fix/meep-z-crop-logging
Apr 19, 2026
Merged

fix(meep): log z_crop application instead of silently rewriting layers#116
vvahidd merged 1 commit intomainfrom
fix/meep-z-crop-logging

Conversation

@vvahidd
Copy link
Copy Markdown
Contributor

@vvahidd vvahidd commented Apr 19, 2026

Summary

  • When geometry.z_crop is set, _apply_z_crop() silently rewrote every layer's zmin/zmax/thickness and then cleared z_crop. Users had no way to see which layers were trimmed or removed.
  • Emits a single logger.info summarizing the reference layer, crop range, and the trimmed/removed layer names.
  • Documents why z_crop is cleared (repeat build_config() calls would otherwise re-crop an already-cropped stack).

Part of a broader audit for silent config overrides in gsim.meep/gsim.palace. Follow-ups for higher-severity Palace items (material-type inference, mesh auto-sizing, planar_conductors carryover) to come.

When geometry.z_crop is set, _apply_z_crop() rewrites every layer's
zmin/zmax/thickness and then clears z_crop. This was previously silent.

Emit a single logger.info summarizing the reference layer, crop range,
which layers were trimmed, and which were removed entirely. Also
document why z_crop is cleared (repeat build_config() calls would
otherwise re-crop an already-cropped stack).
@github-actions github-actions bot added the bug Something isn't working label Apr 19, 2026
@vvahidd vvahidd merged commit 5588fd9 into main Apr 19, 2026
6 checks passed
@vvahidd vvahidd deleted the fix/meep-z-crop-logging branch April 19, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant