@zakodium/nmr-types 0.5.25 → 0.5.27
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.
- package/dist/nmr-types.d.ts +61 -1
- package/package.json +2 -2
package/dist/nmr-types.d.ts
CHANGED
|
@@ -704,6 +704,49 @@ export declare interface PolynomialOptions {
|
|
|
704
704
|
degree: number;
|
|
705
705
|
}
|
|
706
706
|
|
|
707
|
+
/**
|
|
708
|
+
* Information produced by processing operators.
|
|
709
|
+
* Plugins are able to use declaration merging on this interface.
|
|
710
|
+
* All properties in this interface must be optional so empty object is supported.
|
|
711
|
+
*
|
|
712
|
+
* The purpose of this interface is to allow easier communication between processing operators,
|
|
713
|
+
* because some operators depends on other operators (ex: fft behavior change if digitalFilter is applied or not).
|
|
714
|
+
* Other spectrum features can depend on other operator results.
|
|
715
|
+
* Like peak, range and integrals depends on shiftX.
|
|
716
|
+
*/
|
|
717
|
+
export declare interface ProcessingInfo1D {
|
|
718
|
+
/**
|
|
719
|
+
* If this property is missing, consider the value is 0 (no shifting).
|
|
720
|
+
* @default 0
|
|
721
|
+
*/
|
|
722
|
+
shiftX?: number;
|
|
723
|
+
/**
|
|
724
|
+
* digitalFilter value if applied.
|
|
725
|
+
*/
|
|
726
|
+
digitalFilterApplied?: number;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Information produced by processing operators.
|
|
731
|
+
* Plugins are able to use declaration merging on this interface.
|
|
732
|
+
* All properties in this interface must be optional so empty object is supported.
|
|
733
|
+
*
|
|
734
|
+
* The purpose of this interface is to allow easier communication between processing operators,
|
|
735
|
+
* because some operators depends on other operators.
|
|
736
|
+
*/
|
|
737
|
+
export declare interface ProcessingInfo2D {
|
|
738
|
+
/**
|
|
739
|
+
* Shift on horizontal axis.
|
|
740
|
+
* If missing, consider it is 0.
|
|
741
|
+
*/
|
|
742
|
+
shiftDirect?: number;
|
|
743
|
+
/**
|
|
744
|
+
* Shift on vertical axis.
|
|
745
|
+
* If missing, consider it is 0.
|
|
746
|
+
*/
|
|
747
|
+
shiftIndirect?: number;
|
|
748
|
+
}
|
|
749
|
+
|
|
707
750
|
/**
|
|
708
751
|
* Computed from Spectrum1DProcessingTypeRegistry and Spectrum2DProcessingTypeRegistry keys.
|
|
709
752
|
* Ensures type-safety on operator-registration.
|
|
@@ -849,6 +892,16 @@ export declare interface Spectrum1D extends BaseSpectrum {
|
|
|
849
892
|
* Can change anytime without migration.
|
|
850
893
|
*/
|
|
851
894
|
processings?: Array<Spectrum1DProcessingTypeRegistry[keyof Spectrum1DProcessingTypeRegistry]>;
|
|
895
|
+
/**
|
|
896
|
+
* State serialization should exclude this property.
|
|
897
|
+
* Before processing, it should be reset to `originalProcessingInfo`.
|
|
898
|
+
*/
|
|
899
|
+
processingInfo: ProcessingInfo1D;
|
|
900
|
+
/**
|
|
901
|
+
* State serialization should exclude this property.
|
|
902
|
+
* Before processing, it should be init to empty object.
|
|
903
|
+
*/
|
|
904
|
+
originalProcessingInfo: ProcessingInfo1D;
|
|
852
905
|
}
|
|
853
906
|
|
|
854
907
|
/**
|
|
@@ -895,6 +948,8 @@ export declare interface Spectrum2D extends BaseSpectrum {
|
|
|
895
948
|
* Can change anytime without migration.
|
|
896
949
|
*/
|
|
897
950
|
processings?: Array<Spectrum2DProcessingTypeRegistry[keyof Spectrum2DProcessingTypeRegistry]>;
|
|
951
|
+
processingInfo: ProcessingInfo2D;
|
|
952
|
+
originalProcessingInfo: ProcessingInfo2D;
|
|
898
953
|
}
|
|
899
954
|
|
|
900
955
|
/**
|
|
@@ -974,11 +1029,16 @@ export declare interface SpectrumProcessingOperator<SchemaSettings extends ZodTy
|
|
|
974
1029
|
* `null` if the operation doesn't need options, it implies `apply` will always receive `null` as options.
|
|
975
1030
|
*/
|
|
976
1031
|
schemaOptions: SchemaOptions;
|
|
1032
|
+
/**
|
|
1033
|
+
* Each operator should define the default settings of operation.
|
|
1034
|
+
* It generally depends on spectrum.
|
|
1035
|
+
*/
|
|
1036
|
+
getDefaultSettings: (spectrum: Spectrum) => SchemaSettings extends ZodType ? z.output<SchemaSettings> : null;
|
|
977
1037
|
/**
|
|
978
1038
|
* Function that takes the spectrum in the state of the current pipeline step,
|
|
979
1039
|
* the operation’s settings, and returns options to apply the operation.
|
|
980
1040
|
*/
|
|
981
|
-
computeOptions: (spectrum: Spectrum, settings: z.output<SchemaSettings>) => z.output<SchemaOptions
|
|
1041
|
+
computeOptions: (spectrum: Spectrum, settings: z.output<SchemaSettings>) => SchemaOptions extends ZodType ? z.output<SchemaOptions> : null;
|
|
982
1042
|
/**
|
|
983
1043
|
* Returns whether the operation can be applied on given data.
|
|
984
1044
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zakodium/nmr-types",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.27",
|
|
4
4
|
"description": "Types related to NMR data processing.",
|
|
5
5
|
"author": "Zakodium Sàrl",
|
|
6
6
|
"license": "CC-BY-NC-SA-4.0",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"volta": {
|
|
40
40
|
"extends": "../../../package.json"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "1cbf517ddf089539fd3f4db5d238a35a8b6c4863"
|
|
43
43
|
}
|