nmr-processing 19.0.0 → 19.0.3

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.
@@ -57,7 +57,7 @@ import type { JoinBroadPeaksOptions } from 'ml-gsd';
57
57
  import type { LevenbergMarquardtOptions } from 'ml-levenberg-marquardt';
58
58
  import type { LightLogger } from 'cheminfo-types';
59
59
  import type { Logger } from 'cheminfo-types';
60
- import { MatchingMultiplicity as MatchingMultiplicity_2 } from '../index.js';
60
+ import { MatchingMultiplicity as MatchingMultiplicity_2 } from '../index.ts';
61
61
  import { Matrix } from 'ml-matrix';
62
62
  import type { MatrixOptions } from '@zakodium/nmr-types';
63
63
  import type { Molecule } from 'openchemlib';
@@ -68,7 +68,7 @@ import type { NmrData2DFt } from 'cheminfo-types';
68
68
  import type { NMRPeak1D } from '@zakodium/nmr-types';
69
69
  import { NMRRange } from '@zakodium/nmr-types';
70
70
  import type { NMRSignal1D } from '@zakodium/nmr-types';
71
- import { NMRZoneWithID as NMRZoneWithID_2 } from './xyzAutoZonesPicking.js';
71
+ import { NMRZoneWithID as NMRZoneWithID_2 } from './xyzAutoZonesPicking.ts';
72
72
  import type { NumberArray } from 'cheminfo-types';
73
73
  import type { NUSDimension2Options } from '@zakodium/nmr-types';
74
74
  import type { OCLMolecule } from 'cheminfo-types';
@@ -87,7 +87,7 @@ import type { PhaseCorrection2DOptions } from '@zakodium/nmr-types';
87
87
  import type { PhaseCorrectionTwoDFilter } from '@zakodium/nmr-types';
88
88
  import type { PhaseCorrectionTwoDOptions } from '@zakodium/nmr-types';
89
89
  import { PointXY } from 'cheminfo-types';
90
- import type { Range as Range_2 } from '@zakodium/nmr-types';
90
+ import type { Range } from '@zakodium/nmr-types';
91
91
  import type { Ranges } from '@zakodium/nmr-types';
92
92
  import type { Shape1D } from 'ml-peak-shape-generator';
93
93
  import type { Shapes } from '@zakodium/nmr-types';
@@ -110,7 +110,7 @@ import type { ZeroFillingOptions } from '@zakodium/nmr-types';
110
110
  import type { Zone } from '@zakodium/nmr-types';
111
111
  import type { Zones } from '@zakodium/nmr-types';
112
112
 
113
- declare function addDefaultSignal(range: Range_2): void;
113
+ declare function addDefaultSignal(range: Range): void;
114
114
 
115
115
  declare type Apodization1D = FilterFactory<Entry1D, Apodization1DOptions> & Pick<Apodization1DFilterOptions, 'name'>;
116
116
 
@@ -329,9 +329,9 @@ export declare function checkIntegralKind(integral: Integral): boolean;
329
329
 
330
330
  export declare function checkMultiplicity(multiplicity: string, rejected?: OneLetterMultiplet[]): boolean;
331
331
 
332
- declare function checkRangeKind(range: Range_2): boolean;
332
+ declare function checkRangeKind(range: Range): boolean;
333
333
 
334
- declare function checkSignalKinds(range: Range_2, kinds: string[]): boolean;
334
+ declare function checkSignalKinds(range: Range, kinds: string[]): boolean;
335
335
 
336
336
  declare interface CompilePatternOptions {
337
337
  observedFrequencies?: number[] | Float64Array;
@@ -888,7 +888,7 @@ export declare function getDatabase(url?: string, options?: {
888
888
  format?: 'tsv' | 'json';
889
889
  }): Promise<DatabaseNMREntry[]>;
890
890
 
891
- declare function getDiaIDs(range: Range_2): string[];
891
+ declare function getDiaIDs(range: Range): string[];
892
892
 
893
893
  /**
894
894
  * calculate the frequency of a nucleus with respect to a reference nucleus
@@ -909,7 +909,7 @@ declare interface GetKernelOptions {
909
909
 
910
910
  declare function getLineShapes(l: LineShapeData[]): LineShapeResult[];
911
911
 
912
- declare function getNbAtoms(range: Range_2, signalIndex?: number): number;
912
+ declare function getNbAtoms(range: Range, signalIndex?: number): number;
913
913
 
914
914
  export declare function getPeakDelta(peak: Peak1D | NMRPeak1D, shiftTarget: ShiftTarget, shift: number): {
915
915
  originalX: number;
@@ -994,7 +994,7 @@ export declare function isEmptyMolecule(molecule: Molecule): boolean;
994
994
 
995
995
  export declare function isMolfileNotEmpty(molFile?: string): molFile is string;
996
996
 
997
- export declare function isRangeExists(range: Pick<Range_2, 'from' | 'to'>, spectrum: Entry1D, error: number): true | undefined;
997
+ export declare function isRangeExists(range: Pick<Range, 'from' | 'to'>, spectrum: Entry1D, error: number): boolean;
998
998
 
999
999
  export declare function isZoneExists(zone: Pick<Zone, 'x' | 'y'>, spectrum: Entry2D, error: Zone2DError): boolean;
1000
1000
 
@@ -1072,7 +1072,7 @@ declare interface MapOptions {
1072
1072
 
1073
1073
  export declare function mapPeaks(peaks: Peak1D[], spectrum: Entry1D, options?: MapOptions): Peak1D[];
1074
1074
 
1075
- export declare function mapRanges(ranges: Range_2[] | NMRRange[], spectrum: Entry1D, options?: MapOptions): Range_2[];
1075
+ export declare function mapRanges(ranges: Range[] | NMRRange[], spectrum: Entry1D, options?: MapOptions): Range[];
1076
1076
 
1077
1077
  export declare function mapZones(zones: Zone[], datum: Entry2D, options?: MapOptions): {
1078
1078
  signals: {
@@ -1148,9 +1148,9 @@ export declare function matrixToBoxPlot(input: NumberArray[], options?: {
1148
1148
  colors?: string[];
1149
1149
  }): {
1150
1150
  color: (string | undefined)[];
1151
- median: Float64Array<ArrayBufferLike>;
1152
1151
  max: Float64Array<ArrayBufferLike>;
1153
1152
  min: Float64Array<ArrayBufferLike>;
1153
+ median: Float64Array<ArrayBufferLike>;
1154
1154
  q1: Float64Array<ArrayBufferLike>;
1155
1155
  q3: Float64Array<ArrayBufferLike>;
1156
1156
  };
@@ -1286,7 +1286,7 @@ export declare function optimizeSignals(data: DataXY, signals: Signal[], options
1286
1286
  delta: number;
1287
1287
  js: Jcoupling[];
1288
1288
  shape: {
1289
- kind: "gaussian" | "lorentzian" | "pseudoVoigt" | "generalizedLorentzian";
1289
+ kind: "gaussian" | "lorentzian" | "pseudoVoigt" | "lorentzianDispersive" | "generalizedLorentzian";
1290
1290
  fwhm: number;
1291
1291
  };
1292
1292
  intensity: number;
@@ -2020,7 +2020,7 @@ export declare function reimComplexBackwardLinearPrediction(data: DataReIm, opti
2020
2020
  im: Float64Array<ArrayBuffer>;
2021
2021
  };
2022
2022
 
2023
- declare function resetDiaIDs(range: Range_2): void;
2023
+ declare function resetDiaIDs(range: Range): void;
2024
2024
 
2025
2025
  declare interface RestrictionByCS {
2026
2026
  chemicalShiftRestriction: boolean;
@@ -2040,7 +2040,7 @@ export declare interface ResurrectOptions {
2040
2040
  logger?: Logger;
2041
2041
  }
2042
2042
 
2043
- declare function setNbAtoms(range: Range_2, signalIndex?: number): void;
2043
+ declare function setNbAtoms(range: Range, signalIndex?: number): void;
2044
2044
 
2045
2045
  declare type Shape1DWithFWHM = Omit<Shape1D, 'fwhm'> & {
2046
2046
  fwhm: number;
@@ -2324,6 +2324,11 @@ export declare interface Simulate1DOptions extends SimulateXYPeaksOptions {
2324
2324
  * Options to add noise to the spectrum
2325
2325
  */
2326
2326
  noise?: Extract<GenerateSpectrumOptions, 'noise'>;
2327
+ /**
2328
+ * assume the spin system is a 1/2 (proton), if it's doesn't exists
2329
+ * it is defined by checking if all the levels are 2.
2330
+ */
2331
+ isProton?: boolean;
2327
2332
  }
2328
2333
 
2329
2334
  declare interface SimulateXYPeaksOptions {
@@ -2489,7 +2494,7 @@ declare interface TwoDOptions {
2489
2494
  nbPoints: PointXY;
2490
2495
  }
2491
2496
 
2492
- declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
2497
+ declare function unlink(range: Range, options?: UnlinkOptions): Range;
2493
2498
 
2494
2499
  /**
2495
2500
  *