Skip to content

Bmad File Loading - #23

Open
electronsandstuff wants to merge 12 commits into
masterfrom
pierce/bmad
Open

Bmad File Loading#23
electronsandstuff wants to merge 12 commits into
masterfrom
pierce/bmad

Conversation

@electronsandstuff

@electronsandstuff electronsandstuff commented Aug 26, 2026

Copy link
Copy Markdown
Owner

This PR resolves an issue loading files from Bmad using Parcel. Also some misc cleanup.

  • Add output from Bmad's particle dump feature and unit test recreating the issue.
  • Some cleanup of pmd_open_series
    • Refactor out find_first_iteration_file - finds first file matching filename with placeholder
    • Refactor out path_after_directory - Get the portion of the path relative to directory
    • Break out ensure_base_path_groups - Creates HDF5 groups up to iteration placeholder
  • String handling methods for parsing and dealing with iterations are updated to include a padding argument: extract_iteration_from_name and replace_iteration
  • The series handle is updated to include an iteration_padding parameter. In pmd_open_series, when the file being opened already exists, the padding is read from the name (file-based iterations) or group (group-based iterations) and stored. pmd_parse_iterations and pmd_open_iteration are updated to use the series padding setting.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant