Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/Value.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
12 changes: 6 additions & 6 deletions src/measurements/common/MeasurementVariable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
8 changes: 8 additions & 0 deletions todo/general/CalculationLimits.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ValueXY } from './ValueXY';

export interface CalculationLimits {
from: ValueXY;
to: ValueXY;
}


4 changes: 4 additions & 0 deletions todo/general/Integral.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Value } from "../../src";
import { CalculationLimits } from "./CalculationLimits";

export type Integral = CalculationLimits & Value;
15 changes: 15 additions & 0 deletions todo/general/Slope.d.ts
Original file line number Diff line number Diff line change
@@ -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;
}
9 changes: 9 additions & 0 deletions todo/general/ValueXY.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Value } from "../../src";

export interface ValueXY {
x: Value;
xLabel: string;
y: Value;
yLabel: string;
index: number;
}
23 changes: 23 additions & 0 deletions todo/spectra/IV/IV.d.ts
Original file line number Diff line number Diff line change
@@ -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<string, BaseDerivedProperty>;
};

variables: VariablesRecord<MeasurementVariable>;
}
8 changes: 3 additions & 5 deletions todo/spectra/MeasurementBase.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 3 additions & 0 deletions todo/utils/VariablesRecord.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { OneLetter } from "../../src";

export type VariablesRecord<DataType, Obligatory extends string = 'x' | 'y'> = Partial<Record<OneLetter, DataType>> & Record<Obligatory, DataType>;