Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Commit

Permalink
ensure than from is smaller than to
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Jun 15, 2019
1 parent 9330841 commit 78b9e3a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 19 deletions.
60 changes: 42 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/Spectra.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ export class Spectra {
exclusions: []
}
: options.normalization;
if (this.normalizationOptions.from > this.normalizationOptions.to) {
[this.normalizationOptions.from, this.normalizationOptions.to] = [
this.normalizationOptions.to,
this.normalizationOptions.from
];
}
if (Array.isArray(this.normalizationOptions.exclusions)) {
this.normalizationOptions.exclusions = this.normalizationOptions.exclusions.filter(
(exclusion) => !exclusion.ignore
Expand Down
1 change: 0 additions & 1 deletion src/spectrum/getNormalized.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import equallySpaced from 'ml-array-xy-equally-spaced';
import Util from 'ml-array-utils';
import hash from 'hash-it';
import Stat from 'ml-stat/array';

Expand Down

0 comments on commit 78b9e3a

Please sign in to comment.