nmr-processing 16.0.0 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -294,19 +294,7 @@ export declare const carbonImpurities: DatabaseNMREntry[];
294
294
  */
295
295
  export declare function checkIntegralKind(integral: Integral): boolean;
296
296
 
297
- /**
298
- * check if the input string corresponds to a multiplet (pattern), it could has a common name, acs or one letter abbreviation.
299
- * @param string - pattern name or abbreviation.
300
- * @param rejected - list of patterns that should not match with the input pattern. e.g 'massive' as input will return false if rejected = ['m'].
301
- */
302
- export declare function checkMultiplet(string: string, rejected?: string[]): boolean | undefined;
303
-
304
- /**
305
- * check the input string corresponds to a composed pattern like dt or dd. it splits into indivitual patterns and use checkMultiplet function.
306
- * @param multiplicity - pattern name or abbreviation.
307
- * @param rejected - list of patterns that should not match with any pattern. e.g 'dt' as input will return false if rejected = ['t'].
308
- */
309
- export declare function checkMultiplicity(multiplicity: string, rejected?: string[]): boolean;
297
+ export declare function checkMultiplicity(multiplicity: string, rejected?: OneLetterMultiplet[]): boolean;
310
298
 
311
299
  declare function checkRangeKind(range: Range_2): boolean;
312
300
 
@@ -325,7 +313,7 @@ declare interface CompilePatternOptions {
325
313
 
326
314
  export declare const couplingACSPatterns: string[];
327
315
 
328
- export declare const couplingPatterns: string[];
316
+ export declare const couplingPatterns: OneLetterMultiplet[];
329
317
 
330
318
  export declare function createApodizationWindowData(options: {
331
319
  windowOptions: {
@@ -644,7 +632,21 @@ export { Filters2DManager }
644
632
  * Look for a multiplet based on the pattern name or abbreviation.
645
633
  * @param name - pattern name or abbreviation.
646
634
  */
647
- export declare function findMultiplet(name: string): MultipletDefinition | undefined;
635
+ export declare function findMultiplet(name: string): MatchingMultiplicity | undefined;
636
+
637
+ /**
638
+ * Finds a peak that can serve as a pivot point within specified boundaries.
639
+ * The pivot is selected based on its y-value being above a threshold and its position
640
+ * being closest to either boundary (minX or maxX).
641
+ *
642
+ * @param peaks - Array of points containing x and y coordinates
643
+ * @param options - Configuration object for finding the pivot
644
+ *
645
+ * @returns The peak that serves as pivot point
646
+ *
647
+ * @throws {Error} If peaks array is empty
648
+ */
649
+ export declare function findPivot(peaks: PointXY[], options: XYObjectSidePointOptions): PointXY;
648
650
 
649
651
  declare type FordwardLPDimension1 = FilterFactory<Entry2D, Partial<BackwardLPOptions>> & Pick<FordwardLPDimension1Options, 'name'>;
650
652
 
@@ -1133,6 +1135,11 @@ export declare function mapZones(zones: Zone[], datum: Entry2D, options?: MapOpt
1133
1135
 
1134
1136
  export declare function markSolventPeaks<T extends NMRRange>(input: T[], solventSignals: NMRSignal1D[], options?: any): T[];
1135
1137
 
1138
+ export declare type MatchingMultiplicity = MultipletDefinition & {
1139
+ match: string;
1140
+ isBroad: boolean;
1141
+ };
1142
+
1136
1143
  declare interface MatrixFilter {
1137
1144
  name: FilterXYType['name'];
1138
1145
  properties: MatrixProperties;
@@ -1195,7 +1202,7 @@ declare interface MatrixToStocsyOptions {
1195
1202
 
1196
1203
  export declare interface MultipletDefinition {
1197
1204
  label: string;
1198
- value: string;
1205
+ value: OneLetterMultiplet;
1199
1206
  acs?: string;
1200
1207
  names: string[];
1201
1208
  multiplicity: number | null;
@@ -1343,6 +1350,8 @@ declare interface OneDOptions {
1343
1350
  lineWidth: number;
1344
1351
  }
1345
1352
 
1353
+ export declare type OneLetterMultiplet = 's' | 'd' | 't' | 'q' | 'i' | 'h' | 'p' | 'o' | 'n' | 'm';
1354
+
1346
1355
  export declare function optimizeSignals(data: DataXY, signals: Signal[], options: OptimizeSignalsOptions): {
1347
1356
  delta: number;
1348
1357
  js: Jcoupling[];
@@ -2485,11 +2494,11 @@ export declare interface SpinSystem {
2485
2494
  }
2486
2495
 
2487
2496
  /**
2488
- * split a composed pattern like dt or ddt into ['d','t'] and ['d','d','t']
2497
+ * split a composed pattern like dt or ddt into an array of objects
2489
2498
  * @param multiplet - pattern or abbreviation.
2490
2499
  * @returns
2491
2500
  */
2492
- export declare function splitPatterns(multiplet: string): string[];
2501
+ export declare function splitPatterns(multiplet: string): MatchingMultiplicity[];
2493
2502
 
2494
2503
  export declare interface SplitSpinSystemOptions {
2495
2504
  /**
@@ -2664,12 +2673,23 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
2664
2673
  regression: T1Regression;
2665
2674
  };
2666
2675
 
2676
+ export declare function xyGetPivot(data: DataXY<Float64Array>, options?: {
2677
+ thresholdFactor?: number;
2678
+ frequency?: number;
2679
+ }): PointXY;
2680
+
2667
2681
  export declare function xyKineticFirstOrder(data: DataXY): {
2668
2682
  regression: ExponentialRegression;
2669
2683
  rateConstant: number;
2670
2684
  initialConcentration: number;
2671
2685
  };
2672
2686
 
2687
+ declare interface XYObjectSidePointOptions {
2688
+ minX: number;
2689
+ maxX: number;
2690
+ thresholdFactor?: number;
2691
+ }
2692
+
2673
2693
  export declare function xyPeaksOptimization<T extends PeakXYWidth>(data: DataXY, peaks: T[], options: XYPeaksOptimizationOptions): (T extends {
2674
2694
  id: string;
2675
2695
  } ? GSDPeakOptimizedID : GSDPeakOptimized)[];