Skip to content

Conversation

@michael-petersen
Copy link
Owner

New feature: writing of PSP files.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds write capability to the PSP (Phase-Space Protocol) file I/O module, complementing the existing read functionality. The implementation includes support for writing all components of a PSP file, with a new write() method and supporting helper functions for header and data serialization.

Key changes:

  • Added write() method to enable writing PSP files (currently supports comp='all' only)
  • Implemented helper functions for writing primary headers, component headers, and component data
  • Enhanced component reading to support comp='all' mode for reading all components at once
  • Added _to_python() utility to convert numpy types to native Python types for YAML serialization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

michael-petersen and others added 7 commits December 11, 2025 22:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@michael-petersen
Copy link
Owner Author

This is not yet implemented for SPL files; it might be nice to extend the functionality there too.

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.

2 participants