Skip to content

Commit

Permalink
fix: remove code
Browse files Browse the repository at this point in the history
  • Loading branch information
jobo322 committed Aug 1, 2024
1 parent 2fef3e7 commit 0c03e09
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/data/SpectraManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
serializeNmriumState,
CURRENT_EXPORT_VERSION,
spectrum1DToJcamp,
Spectrum1D,
} from 'nmr-load-save';

import { State } from '../component/reducer/Reducer';
Expand Down Expand Up @@ -146,7 +145,7 @@ export function exportAsJcamp(
let jcamp: string | null = null;
if (isSpectrum1D(spectrum)) {
const { dataExportStage = 'PROCESSED', onlyReal } = options;
const { originalData, originalInfo, data, info, filters, meta } = spectrum;
const { originalData, originalInfo, data, info, filters } = spectrum;

if (onlyReal && info.isFid) {
throw new Error('FID data should be complex');
Expand All @@ -157,17 +156,11 @@ export function exportAsJcamp(
}

if (dataExportStage === 'PROCESSED') {
const isFT = filters.find((f) => f.name === 'fft')?.flag;
jcamp = spectrum1DToJcamp(
{
...spectrum,
data,
info,
meta: {
...meta,
SYMBOL: onlyReal ? '' : meta.SYMBOL,
DATATYPE: !info.isFid || isFT ? 'NMR SPECTRUM' : 'NMR FID',
},
filters,
},
{ onlyReal },
Expand Down

0 comments on commit 0c03e09

Please sign in to comment.