Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-peak-shape-generator

Package Overview
Dependencies
Maintainers
5
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-peak-shape-generator - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

src/types/compute-erfinv/index.d.ts

7

CHANGELOG.md
# Changelog
### [2.0.1](https://www.github.com/mljs/peak-shape-generator/compare/v2.0.0...v2.0.1) (2021-08-09)
### Bug Fixes
* exhaustive switch and export interfaces ([#48](https://www.github.com/mljs/peak-shape-generator/issues/48)) ([590fbaa](https://www.github.com/mljs/peak-shape-generator/commit/590fbaa976de614fc637e208f46917cc023f657e))
## [2.0.0](https://www.github.com/mljs/peak-shape-generator/compare/v1.0.0...v2.0.0) (2021-08-06)

@@ -4,0 +11,0 @@

6

lib-esm/util/getShape1D.js

@@ -15,7 +15,9 @@ import { Gaussian } from '../shapes/1d/gaussian/Gaussian';

return new PseudoVoigt(shapeOptions);
default:
default: {
const unHandled = kind;
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
throw new Error(`getShape1D: unknown shape kind: ${kind}`);
throw Error(`Unknown distribution ${unHandled}`);
}
}
}
//# sourceMappingURL=getShape1D.js.map

@@ -9,7 +9,9 @@ import { Gaussian2D } from '../shapes/2d/gaussian2D/Gaussian2D';

return new Gaussian2D(shapeOptions);
default:
default: {
const unHandled = kind;
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
throw new Error(`getShape2D: unknown shape kind: ${kind}`);
throw Error(`Unknown distribution ${unHandled}`);
}
}
}
//# sourceMappingURL=getShape2D.js.map

@@ -9,1 +9,6 @@ export * as gaussian from './shapes/1d/gaussian/Gaussian';

export * from './shapes/2d/Shape2D';
export type { XYNumber } from './shapes/2d/gaussian2D/Gaussian2D';
export type { GaussianClassOptions } from './shapes/1d/gaussian/Gaussian';
export type { LorentzianClassOptions } from './shapes/1d/lorentzian/Lorentzian';
export type { PseudoVoigtClassOptions } from './shapes/1d/pseudoVoigt/PseudoVoigt';
export type { Gaussian2DClassOptions } from './shapes/2d/gaussian2D/Gaussian2D';

@@ -12,7 +12,2 @@ import { Shape1D } from '../Shape1D';

fwhm?: number;
/**
* The halft width between the inflection points or standard deviation.
* If it is defined the fwhm would be re-assigned.
*/
sd?: number;
}

@@ -19,0 +14,0 @@ export interface GetDataOptions extends LorentzianClassOptions {

import { Shape2D } from '../Shape2D';
export { widthToFWHM, fwhmToWidth } from '../../1d/gaussian/Gaussian';
export interface XYNumber {

@@ -7,3 +6,4 @@ x: number;

}
export interface Gaussian2DOptions {
export { widthToFWHM, fwhmToWidth } from '../../1d/gaussian/Gaussian';
export interface Gaussian2DClassOptions {
/**

@@ -25,3 +25,3 @@ * The maximum z value of the shape

}
export interface GetDataOptions extends Gaussian2DOptions {
export interface GetDataOptions extends Gaussian2DClassOptions {
/**

@@ -63,3 +63,3 @@ * number of points along an specific axis.

height: number;
constructor(options?: Gaussian2DOptions);
constructor(options?: Gaussian2DClassOptions);
fct(x: number, y: number): number;

@@ -66,0 +66,0 @@ getData(options?: GetDataOptions): any[];

import { XYNumber } from './gaussian2D/Gaussian2D';
export interface GetDat2DOptions {
export interface GetData2DOptions {
length?: number | XYNumber;

@@ -15,3 +15,3 @@ factor?: number | XYNumber;

abstract getFactor(area?: number): number;
abstract getData(options: GetDat2DOptions): Float64Array[];
abstract getData(options: GetData2DOptions): Float64Array[];
}

@@ -18,5 +18,7 @@ "use strict";

return new PseudoVoigt_1.PseudoVoigt(shapeOptions);
default:
default: {
const unHandled = kind;
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
throw new Error(`getShape1D: unknown shape kind: ${kind}`);
throw Error(`Unknown distribution ${unHandled}`);
}
}

@@ -23,0 +25,0 @@ }

@@ -12,5 +12,7 @@ "use strict";

return new Gaussian2D_1.Gaussian2D(shapeOptions);
default:
default: {
const unHandled = kind;
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
throw new Error(`getShape2D: unknown shape kind: ${kind}`);
throw Error(`Unknown distribution ${unHandled}`);
}
}

@@ -17,0 +19,0 @@ }

{
"name": "ml-peak-shape-generator",
"version": "2.0.0",
"version": "2.0.1",
"description": "Generate various peak shapes",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -10,1 +10,7 @@ export * as gaussian from './shapes/1d/gaussian/Gaussian';

export * from './shapes/2d/Shape2D';
export type { XYNumber } from './shapes/2d/gaussian2D/Gaussian2D';
export type { GaussianClassOptions } from './shapes/1d/gaussian/Gaussian';
export type { LorentzianClassOptions } from './shapes/1d/lorentzian/Lorentzian';
export type { PseudoVoigtClassOptions } from './shapes/1d/pseudoVoigt/PseudoVoigt';
export type { Gaussian2DClassOptions } from './shapes/2d/gaussian2D/Gaussian2D';

@@ -14,7 +14,2 @@ import { ROOT_THREE } from '../../../util/constants';

fwhm?: number;
/**
* The halft width between the inflection points or standard deviation.
* If it is defined the fwhm would be re-assigned.
*/
sd?: number;
}

@@ -21,0 +16,0 @@

@@ -6,4 +6,2 @@ import { GAUSSIAN_EXP_FACTOR } from '../../../util/constants';

export { widthToFWHM, fwhmToWidth } from '../../1d/gaussian/Gaussian';
export interface XYNumber {

@@ -14,3 +12,5 @@ x: number;

export interface Gaussian2DOptions {
export { widthToFWHM, fwhmToWidth } from '../../1d/gaussian/Gaussian';
export interface Gaussian2DClassOptions {
/**

@@ -33,3 +33,3 @@ * The maximum z value of the shape

export interface GetDataOptions extends Gaussian2DOptions {
export interface GetDataOptions extends Gaussian2DClassOptions {
/**

@@ -74,3 +74,3 @@ * number of points along an specific axis.

public constructor(options: Gaussian2DOptions = {}) {
public constructor(options: Gaussian2DClassOptions = {}) {
super();

@@ -77,0 +77,0 @@ let { fwhm = 50, sd, height } = options;

import { XYNumber } from './gaussian2D/Gaussian2D';
export interface GetDat2DOptions {
export interface GetData2DOptions {
length?: number | XYNumber;

@@ -18,3 +18,3 @@ factor?: number | XYNumber;

abstract getFactor(area?: number): number;
abstract getData(options: GetDat2DOptions): Float64Array[];
abstract getData(options: GetData2DOptions): Float64Array[];
}

@@ -21,6 +21,8 @@ import { Gaussian } from '../shapes/1d/gaussian/Gaussian';

return new PseudoVoigt(shapeOptions);
default:
default: {
const unHandled: never = kind;
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
throw new Error(`getShape1D: unknown shape kind: ${kind}`);
throw Error(`Unknown distribution ${unHandled}`);
}
}
}

@@ -15,6 +15,8 @@ import { Gaussian2D } from '../shapes/2d/gaussian2D/Gaussian2D';

return new Gaussian2D(shapeOptions);
default:
default: {
const unHandled: never = kind;
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
throw new Error(`getShape2D: unknown shape kind: ${kind}`);
throw Error(`Unknown distribution ${unHandled}`);
}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc