Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue] spectrum generation #38

Open
inesboxexa opened this issue Sep 7, 2020 · 0 comments
Open

[issue] spectrum generation #38

inesboxexa opened this issue Sep 7, 2020 · 0 comments
Assignees

Comments

@inesboxexa
Copy link

Hi Alan,

I started to get the following error recently:

In f_saving_spectra_details (line 16)
! Running pre-processing and generating representative spectra...
Warning: Error occurred while executing the listener callback for event FastMethods defined for class TotalSpectrum:
Error using num2str (line 45)
Input to num2str must be numeric.

Error in f_saving_spectra_details>@(src,canUseFastMethods)disp(['! Using fast Methods? A: ',num2str(canUseFastMethods)]) (line 36)
addlistener(spectrumGeneration, 'FastMethods', @(src, canUseFastMethods)disp(['! Using fast Methods? A: ' num2str(canUseFastMethods)]));

Error in PostProcessing/setUpFastMethods (line 159)
notify(this, 'FastMethods', BooleanEventData(canUseFastMethods));

Error in TotalSpectrum/process (line 26)
[canUseFastMethods, workflow] = this.setUpFastMethods(dataRepresentation);

Error in f_saving_spectra_details (line 57)
totalSpectrum = spectrumGeneration.process(data); % create total spectrum

In PostProcessing/setUpFastMethods (line 159)
In TotalSpectrum/process (line 26)
In f_saving_spectra_details (line 57)
com.alanmrace.JSpectralAnalysis.Spectrum@5a6482a9
Error using TotalSpectrum/process (line 33)
Java exception occurred:
java.lang.ArrayIndexOutOfBoundsException: -1

at com.alanmrace.JSpectralAnalysis.zerofilling.InterpolationRebinZeroFilling.interpLinear(InterpolationRebinZeroFilling.java:95)

at com.alanmrace.JSpectralAnalysis.zerofilling.InterpolationRebinZeroFilling.process(InterpolationRebinZeroFilling.java:45)

at com.alanmrace.JSpectralAnalysis.PreprocessingWorkflow.process(PreprocessingWorkflow.java:32)

at com.alanmrace.JSpectralAnalysis.spectralrepresentation.MultithreadedSpectralRepresentationGeneration.createSpectrumList(MultithreadedSpectralRepresentationGeneration.java:85)

at com.alanmrace.JSpectralAnalysis.spectralrepresentation.MultithreadedSpectralRepresentationGeneration.generateTotalSpectrum(MultithreadedSpectralRepresentationGeneration.java:103)

Error in f_saving_spectra_details (line 57)
totalSpectrum = spectrumGeneration.process(data); % create total spectrum

This is the code that I'm running:

addJARsToClassPath()
preprocessing = PreprocessingWorkflow;
preprocessing.loadWorkflow(preprocessing_file);

    parser = ImzMLParser([filesToProcess(file_index).folder filesep filesToProcess(file_index).name]);
    parser.parse; % parse the imzML file
    
    % Total Spectrum
    
    spectrumGeneration = TotalSpectrum();
    spectrumGeneration.setPreprocessingWorkflow(preprocessing); % set preprocessing workflow

    addlistener(spectrumGeneration, 'FastMethods', @(src, canUseFastMethods)disp(['! Using fast Methods? A: ' num2str(canUseFastMethods)]));        
    
    data = DataOnDisk(parser);
    totalSpectrum = spectrumGeneration.process(data); % create total spectrum
    totalSpectrum = totalSpectrum.get(1);

Is it anything you changed recently? Or is it my fault? I just updated Java but that didn't solve it.

Thank you,
Teresa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants