nmr-processing 22.22.0 → 22.22.1

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.
@@ -69,6 +69,7 @@ import type { NmrData2DContent } from 'cheminfo-types';
69
69
  import type { NmrData2DFt } from 'cheminfo-types';
70
70
  import type { NMRPeak1D } from '@zakodium/nmr-types';
71
71
  import { NMRRange } from '@zakodium/nmr-types';
72
+ import type { NMRShape1D } from '@zakodium/nmr-types';
72
73
  import type { NMRSignal1D } from '@zakodium/nmr-types';
73
74
  import type { NumberArray } from 'cheminfo-types';
74
75
  import type { NUSDimension2Options } from '@zakodium/nmr-types';
@@ -88,7 +89,6 @@ import type { PhaseCorrectionTwoDOptions } from '@zakodium/nmr-types';
88
89
  import { PointXY } from 'cheminfo-types';
89
90
  import type { Range as Range_2 } from '@zakodium/nmr-types';
90
91
  import type { Ranges } from '@zakodium/nmr-types';
91
- import type { Shape1D } from 'ml-peak-shape-generator';
92
92
  import type { Shape1DWithFWHM } from '@zakodium/nmr-types';
93
93
  import type { Shapes } from '@zakodium/nmr-types';
94
94
  import type { Shift2DXFilterOptions } from '@zakodium/nmr-types';
@@ -968,7 +968,7 @@ export declare function getPeakDelta(peak: Peak1D | NMRPeak1D, shiftTarget: Shif
968
968
  x: number;
969
969
  };
970
970
 
971
- export declare interface GetPeakListOptions extends GSDOptions, OptimizePeaksOptions, JoinBroadPeaksOptions {
971
+ export declare interface GetPeakListOptions extends GSDOptions, OptimizeNMRPeaksOptions, JoinBroadNMRPeaksOptions {
972
972
  smoothedY: NumberArray;
973
973
  /**
974
974
  * If it is true, the peaks parameters will be optimized.
@@ -1029,6 +1029,10 @@ declare function getShifts(s: ShiftInput[]): ShiftOutput[];
1029
1029
 
1030
1030
  export declare function getShiftX(spectrum: Entry1D): number;
1031
1031
 
1032
+ declare type GSDNMRPeakOptimizedID = Omit<GSDPeakOptimizedID, 'shape'> & {
1033
+ shape: NMRShape1D;
1034
+ };
1035
+
1032
1036
  declare interface HOSEPrediction {
1033
1037
  /**
1034
1038
  * In case the prediction is based on HOSE codes, this is the sphere
@@ -1053,6 +1057,10 @@ export declare function isZoneExists(zone: Pick<Zone, 'x' | 'y'>, spectrum: Entr
1053
1057
 
1054
1058
  declare type JcouplingFromPrediction = MakeMandatory<Jcoupling, 'multiplicity' | 'diaIDs' | 'pathLength'>;
1055
1059
 
1060
+ declare type JoinBroadNMRPeaksOptions = Omit<JoinBroadPeaksOptions, 'shape'> & {
1061
+ shape?: NMRShape1D;
1062
+ };
1063
+
1056
1064
  declare type LevenbergMarquardtOptimizationOptionsDefaultsKeys = Extract<'minValues' | 'maxValues' | 'initialValues' | 'gradientDifference' | keyof typeof defaultLMOptimizationOptions, keyof LevenbergMarquardtOptions>;
1057
1065
 
1058
1066
  declare type LevenbergMarquardtOptionsDefault = Pick<LevenbergMarquardtOptions, LevenbergMarquardtOptionsWithDefaultKeys>;
@@ -1269,11 +1277,15 @@ declare interface OneDOptions {
1269
1277
 
1270
1278
  export declare type OneLetterMultiplet = 's' | 'd' | 't' | 'q' | 'i' | 'h' | 'p' | 'o' | 'n' | 'm';
1271
1279
 
1280
+ declare type OptimizeNMRPeaksOptions = Omit<OptimizePeaksOptions, 'shape'> & {
1281
+ shape?: NMRShape1D;
1282
+ };
1283
+
1272
1284
  export declare function optimizeSignals(data: DataXY, signals: Signal[], options: OptimizeSignalsOptions): {
1273
1285
  delta: number;
1274
1286
  js: Jcoupling[];
1275
1287
  shape: {
1276
- kind: "gaussian" | "lorentzian" | "pseudoVoigt" | "lorentzianDispersive" | "generalizedLorentzian" | "pseudoVoigtTCH";
1288
+ kind: "gaussian" | "lorentzian" | "pseudoVoigt" | "generalizedLorentzian";
1277
1289
  fwhm: number;
1278
1290
  };
1279
1291
  intensity: number;
@@ -1290,7 +1302,7 @@ export declare interface OptimizeSignalsOptions {
1290
1302
  * @default 'min intensity value'
1291
1303
  */
1292
1304
  baseline?: number;
1293
- shape?: Shape1D;
1305
+ shape?: NMRShape1D;
1294
1306
  parameters?: ParametersFromOptions;
1295
1307
  optimization?: OptimizeSignalsOptionsOptimization;
1296
1308
  simulation: SignalsToPointXYOptions;
@@ -1318,7 +1330,7 @@ declare interface OptionsPeaksToRanges {
1318
1330
  * Peak shape used to reconstruct additional or filtered peaks when compiling patterns.
1319
1331
  * @default { kind: 'gaussian' }
1320
1332
  */
1321
- shape?: Shape1D;
1333
+ shape?: NMRShape1D;
1322
1334
  /**
1323
1335
  * if it is true, it will join any overlaped ranges.
1324
1336
  * @default true
@@ -1384,7 +1396,7 @@ export declare interface OptionsSignalsToXY extends Partial<Simulate1DOptions> {
1384
1396
  /**
1385
1397
  * Shape options for ml-spectrum-generator
1386
1398
  */
1387
- shape?: Shape1D;
1399
+ shape?: NMRShape1D;
1388
1400
  /**
1389
1401
  * The linewidth of the output spectrum, expresed in Hz.
1390
1402
  * @default 1
@@ -1474,7 +1486,7 @@ declare type Parameter = 'delta' | 'intensity' | 'fwhm' | 'mu' | 'coupling' | 'g
1474
1486
 
1475
1487
  declare type ParametersFromOptions = Record<Parameter, Record<string, number | ((options?: {
1476
1488
  signal?: Signal;
1477
- shape?: Shape1D;
1489
+ shape?: NMRShape1D;
1478
1490
  index?: number;
1479
1491
  jCoupling?: Jcoupling;
1480
1492
  }) => number)>>;
@@ -2005,7 +2017,7 @@ export declare interface RangesToXYOptions {
2005
2017
  frequency?: number;
2006
2018
  nbPoints?: number;
2007
2019
  lineWidth?: number;
2008
- shape?: Shape1D;
2020
+ shape?: NMRShape1D;
2009
2021
  from?: number;
2010
2022
  to?: number;
2011
2023
  }
@@ -2039,7 +2051,7 @@ export declare interface RangeToXYOptions {
2039
2051
  /**
2040
2052
  * options of signals. default { kind: 'gaussian' }
2041
2053
  */
2042
- shape: Shape1D;
2054
+ shape: NMRShape1D;
2043
2055
  }
2044
2056
 
2045
2057
  export declare namespace RangeUtilities {
@@ -2153,7 +2165,7 @@ declare type ShiftX = FilterFactory<Entry1D, ShiftXOptions> & Pick<ShiftXFilterO
2153
2165
 
2154
2166
  export declare interface Signal extends NMRSignal1D {
2155
2167
  intensity?: number;
2156
- shape?: Shape1D;
2168
+ shape?: NMRShape1D;
2157
2169
  parameters?: ParametersFromSignal;
2158
2170
  }
2159
2171
 
@@ -2382,7 +2394,7 @@ export declare interface Simulate1DOptions extends SimulateXYPeaksOptions {
2382
2394
  * Shape options
2383
2395
  * @default {kind:'gaussian'}
2384
2396
  */
2385
- shape?: Shape1D;
2397
+ shape?: NMRShape1D;
2386
2398
  /**
2387
2399
  * Function to generate or add a baseline
2388
2400
  */
@@ -2748,7 +2760,7 @@ export declare function xyPeaksOptimization<T extends PeakXYWidth>(data: DataXY,
2748
2760
  id: string;
2749
2761
  } ? GSDPeakOptimizedID : GSDPeakOptimized)[];
2750
2762
 
2751
- export declare function xyPeaksOptimizationByStages(data: DataXY, peaks: PeakXYWidth[], options: XYPeaksOptimizationOptionsByStages): GSDPeakOptimizedID[];
2763
+ export declare function xyPeaksOptimizationByStages(data: DataXY, peaks: PeakXYWidth[], options: XYPeaksOptimizationOptionsByStages): GSDNMRPeakOptimizedID[];
2752
2764
 
2753
2765
  export declare interface XYPeaksOptimizationOptions extends OptimizePeaksOptions {
2754
2766
  /**