Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
.svn
.vscode
.idea
.venv
__pycache__/
*.py[cod]
bindings/python/passthrough_saved.*
.DS_Store
.cproject
.project
Expand All @@ -23,4 +27,4 @@ CMakeCache.txt
cmake_install.cmake
install_manifest.txt
.vs/
out/
out/
5 changes: 5 additions & 0 deletions bindings/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ spec = SpecUtils.SpecFile()
# Load a spectrum file
spec.loadFile("spectrum_file.n42", SpecUtils.ParserType.Auto)

# Or: load from a Python binary stream (uses Auto parser selection).
# The pseudo-filename is used to prioritize parsers (e.g., by extension).
with open("spectrum_file.n42", "rb") as f:
spec.loadFileFromStream(f, "spectrum_file.n42")

# Get list of all individual records in the spectrum file
meass = spec.measurements()
print( "There are", len(meass), "spectrum records." )
Expand Down
Loading