diff --git a/src/core/Value.d.ts b/src/core/Value.d.ts index 3d3f938..c0c77a0 100644 --- a/src/core/Value.d.ts +++ b/src/core/Value.d.ts @@ -6,6 +6,6 @@ export interface Value { value: number; /** */ precision?: number; - /**A string or text indicating the unit of measurement. The unit could be validated in the input form based on the UN/CEFACT Common Code list */ + /** A string or text indicating the unit of measurement. The unit could be validated in the input form based on the UN/CEFACT Common Code list */ units?: string; } diff --git a/src/measurements/common/MeasurementVariable.d.ts b/src/measurements/common/MeasurementVariable.d.ts index fb383fa..dcdfa81 100644 --- a/src/measurements/common/MeasurementVariable.d.ts +++ b/src/measurements/common/MeasurementVariable.d.ts @@ -17,13 +17,11 @@ export interface MeasurementVariable< *@TJS-examples ["absolute pressure"] */ label: string; - /** - * - */ + /** Scale representation of variable */ + scale?: 'linear' | 'log' + /** Is not the independent variable */ isDependent?: boolean; - /** - * An array containing numerical data - */ + /** An array containing numerical data */ data: DataType; /** One letter that allows to define the variable */ symbol?: OneLetter; @@ -33,4 +31,6 @@ export interface MeasurementVariable< max?: number; /** If defined indicates (true or false) if the data series is monotone */ isMonotone?: boolean; + /** This variable doesn't change with the dependent variable */ + isConstant?: boolean; } diff --git a/todo/general/CalculationLimits.d.ts b/todo/general/CalculationLimits.d.ts new file mode 100644 index 0000000..02fae02 --- /dev/null +++ b/todo/general/CalculationLimits.d.ts @@ -0,0 +1,8 @@ +import { ValueXY } from './ValueXY'; + +export interface CalculationLimits { + from: ValueXY; + to: ValueXY; +} + + diff --git a/todo/general/Integral.d.ts b/todo/general/Integral.d.ts new file mode 100644 index 0000000..d745cd3 --- /dev/null +++ b/todo/general/Integral.d.ts @@ -0,0 +1,4 @@ +import { Value } from "../../src"; +import { CalculationLimits } from "./CalculationLimits"; + +export type Integral = CalculationLimits & Value; diff --git a/todo/general/Slope.d.ts b/todo/general/Slope.d.ts new file mode 100644 index 0000000..48ccc49 --- /dev/null +++ b/todo/general/Slope.d.ts @@ -0,0 +1,15 @@ +// import type { RegressionScore } from 'ml-regression-base'; +import { CalculationLimits } from "./CalculationLimits"; + +interface RegressionScore { + r: number; + r2: number; + chi2: number; + rmsd: number; +} + +export interface Slope extends CalculationLimits { + slope: number; + score: RegressionScore; + units?: string; +} diff --git a/todo/general/ValueXY.d.ts b/todo/general/ValueXY.d.ts new file mode 100644 index 0000000..1c381a9 --- /dev/null +++ b/todo/general/ValueXY.d.ts @@ -0,0 +1,9 @@ +import { Value } from "../../src"; + +export interface ValueXY { + x: Value; + xLabel: string; + y: Value; + yLabel: string; + index: number; +} diff --git a/todo/spectra/IV/IV.d.ts b/todo/spectra/IV/IV.d.ts new file mode 100644 index 0000000..394e884 --- /dev/null +++ b/todo/spectra/IV/IV.d.ts @@ -0,0 +1,23 @@ +import { MeasurementBase } from '../MeasurementBase'; +import { MeasurementVariable, Value } from '../../../src' +import { BaseDerivedProperty } from '../core/BaseDerivedProperty'; +import { ValueXY } from '../../general/ValueXY'; +import { Slope } from '../../general/Slope'; +import { Integral } from '../../general/Integral'; +import { VariablesRecord } from '../../utils/VariablesRecord'; + +export interface IV extends MeasurementBase { + settings?: { + /** Area to calculate the density values */ + surfaceArea?: Value + } + derived?: { + thresholdVoltage?: ValueXY; + subthresholdSlope?: Slope; + resistanceOn?: Slope; + capacitanceIntegral?: Integral; + meta?: Record; + }; + + variables: VariablesRecord; +} diff --git a/todo/spectra/MeasurementBase.d.ts b/todo/spectra/MeasurementBase.d.ts index d241883..adc1c7a 100644 --- a/todo/spectra/MeasurementBase.d.ts +++ b/todo/spectra/MeasurementBase.d.ts @@ -2,14 +2,12 @@ import { DataSource } from '../general/DataSource'; import { HTMLString } from '../general/HtmlString'; import { Instrument } from '../general/Instrument'; -import { BaseDerivedProperty } from './core/BaseDerivedProperty'; - -/**Generic type for the result of a measurement, e.g., a spectrum or result from a crystallographic experiment */ +/** Generic type for the result of a measurement, e.g., a spectrum or result from a crystallographic experiment */ export interface MeasurementBase { - /**Instrument that was used to perform the measurement */ + /** Instrument that was used to perform the measurement */ instrument: Instrument; /** Description of the source of the data*/ dataSource?: DataSource; - /**Results obtained from analysing the data */ + /** Results obtained from analyzing the data */ remarks?: HTMLString; } diff --git a/todo/utils/VariablesRecord.d.ts b/todo/utils/VariablesRecord.d.ts new file mode 100644 index 0000000..0904740 --- /dev/null +++ b/todo/utils/VariablesRecord.d.ts @@ -0,0 +1,3 @@ +import { OneLetter } from "../../src"; + +export type VariablesRecord = Partial> & Record;