Repository navigation
Conversation
- Fixed a bug where `proc_base.ls()` returned zeroed out data when left shifting by zero (pts=0), by adding a guard clause. - Minor changes: Changed the default parameter from `pts=0.0` to `pts=0` for clarity in a few functions, especially with the docstring describing `pts` as int
bugfix: Fix zero-shift bug in `proc_base.ls`
Fix deprecated scipy calls
Try second encoding for bruker jcamp-dx files when first fails
enable ci workflow on PRs
fix unpacking in jeol
NumPy 2.0 compatibility changes
bruker.write uses override argument when writing proc files
Deprecation Fix: np.fromstring to np.frombuffer
Fix: Handle UTF-8 BOM in JCAMP-DX files
Bugfix: Reading Floating Point Datasets (Topspin > 4.0)
A function to update the unit conversion object
Handle partially acquired datasets in Bruker
Closes #123. The PSEQ section of Tecmag .tnt files stores sequence tables (rfamp, delay tables, etc.) as pairs of length-prefixed Pascal strings. This adds guess_tables() to expose them as a dict. The pytnt library (chatcannon/pytnt, GPL-3.0) reads delay tables by matching the default TNMR naming pattern `de[0-9]+:[0-9]`. As noted by robbyblum in #123, most users assign descriptive names to their tables (e.g. "rfamp", "tp"), which pytnt's regex does not catch. This implementation generalizes the parser to find any valid Pascal-string pair in PSEQ, with strict length-prefix validation to reject coincidental substring matches. The function follows the API suggested by kaustubhmote in #123: a standalone guess_tables() function with optional name filtering. Single-value (scalar) entries are excluded since they typically represent sequence variable defaults rather than swept tables. SI-prefix conversion (e.g. '100u' -> 1e-4) mirrors pytnt's convert_si() behavior so unit-suffixed tokens are returned in base SI units. Tests cover the numeric parsing, SI conversion, scalar exclusion, name filtering, the convert_si=False mode, files without a PSEQ section, rejection of invalid length prefixes, rejection of non-ASCII names, and mixed whitespace separators.
Add guess_tables() to tecmag for reading sequence tables from PSEQ
drop support for Python 3.8,9 add 3.13,14
Fix Bruker magnitude-mode quadrature metadata
…tant Document the GM Gaussian constant discussed in #17
- Use t2=0.01 and halve the first FID point in the synthetic spectrum so it is not truncated and needs no intrinsic phase correction. - Check that the recovered phases undo the applied error (opt[0] ~ -p0, p1 ~ 0) instead of only comparing magnitudes. - Translate fmin-style kwargs (xtol, ftol, maxiter, maxfun, disp, initial_simplex) into minimize options when bounds are given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scipy silently broadcasts a single (min, max) pair to both phases, so bounds=[(-180, 180)] also constrained p1. Require exactly two pairs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Explain (None, None) to leave one phase unbounded, with examples. - Note that hard p0 limits can trap the optimiser near +-180 since the phase is periodic; the zero-order example now leaves p0 unbounded. - Test single-phase bounds and p0 recovery near 180 with p0 unbounded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The zero-order phase is periodic, so hard limits on it can trap the optimiser at a limit while p1 absorbs the remaining error (e.g. a 170 degree p0 error gave p0=-180, p1=22). p0 is now always optimised without limits and wrapped into [-180, 180) on return; only p1 can be bounded, via p1_bounds=(min, max). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add optional bounds parameters to autophase
Replace removed pinv2 in linear prediction
FIX: update FDSPECNUM properly when using pipe_proc.ext on 2D data set
* Fixes to JCAMP-DX udic & FID handling --------- Co-authored-by: Juuso Lehtivarjo <jlehtivarjo@nmrsolutions.fi>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.