-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: define sum options for ranges and integrals when initiating the …
…spectrum
- Loading branch information
1 parent
e1cddc3
commit d1fc56f
Showing
6 changed files
with
56 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import merge from 'lodash/merge'; | ||
import { Spectrum1D } from 'nmr-load-save'; | ||
import { Peaks, mapPeaks } from 'nmr-processing'; | ||
import { mapPeaks } from 'nmr-processing'; | ||
|
||
export function initiatePeaks( | ||
options: Partial<{ peaks: Peaks }>, | ||
inputSpectrum: Partial<Spectrum1D>, | ||
spectrum: Spectrum1D, | ||
) { | ||
return merge({ values: [], options: {} }, options.peaks, { | ||
values: mapPeaks(options?.peaks?.values || [], spectrum), | ||
return merge({ values: [], options: {} }, inputSpectrum.peaks, { | ||
values: mapPeaks(inputSpectrum?.peaks?.values || [], spectrum), | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters