Skip to content

skip superimposed element flattening flag - #664

Open
roussel-ryan wants to merge 4 commits into
desy-ml:masterfrom
roussel-ryan:skip-superimposed-flatten
Open

skip superimposed element flattening flag#664
roussel-ryan wants to merge 4 commits into
desy-ml:masterfrom
roussel-ryan:skip-superimposed-flatten

Conversation

@roussel-ryan

@roussel-ryan roussel-ryan commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

Add the flag skip_superimposed to segment.flatten() which allows the user to flatten segments without flattening superimposed elements (which are useful when not flattened).

Motivation and Context

This flag is helpful for flattening SLAC accelerator segments (which have many sub segments) into a single line, without removing the advantages of superimposed element definitions.

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)

Checklist

  • I have updated the changelog accordingly (required).
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.
  • I have reformatted the code and checked that formatting passes (required).
  • I have have fixed all issues found by flake8 (required).
  • I have ensured that all pytest tests pass (required).
  • I have run pytest on a machine with a CUDA GPU and made sure all tests pass (required).
  • I have checked that the documentation builds (required).

Note: We are using a maximum length of 88 characters per line.

@jp-ga jp-ga self-assigned this Aug 4, 2026
@jp-ga jp-ga added the enhancement New feature or request label Aug 4, 2026
@jp-ga
jp-ga requested a review from cr-xu August 4, 2026 20:35
@jp-ga

jp-ga commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

@cr-xu this is also ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants