AlanRace / SpectralAnalysis

Software for the analysis and interactive exploration of spectral imaging data
https://alanrace.github.io/SpectralAnalysis/
Apache License 2.0
29 stars 9 forks source link

Question on recent alterations of peak picking. #31

Closed inesboxexa closed 4 years ago

inesboxexa commented 4 years ago

Hi Alan,

I got the error below:

Error using SpectralPeakDetection/process Too many input arguments.

Error in f_saving_peaks_details (line 24) [ ~, ~, peakDetails ] = peakPicking.process(totalSpectrum_mzvalues, totalSpectrum_intensities); % peak pick total spectrum

Could you help?

Thanks, Teresa

AlanRace commented 4 years ago

Hi Teresa, The new process function takes a SpectralData instance and returns an array of Peak instances.

You should be able to change your line to:

peaks = peakPicking.process(SpectralData(totalSpectrum_mzvalues, totalSpectrum_intensities));

The peaks array then has fields for the peak centroid, min and max spectral channels etc. You can get these as a vector for example:

centroids = [peaks.centroid];

Hope that helps!

Alan

inesboxexa commented 4 years ago

Hi Alan,

Thank you very much, issue solved!

Teresa

From: Alan Race notifications@github.com Sent: 01 August 2020 09:49 To: AlanRace/SpectralAnalysis SpectralAnalysis@noreply.github.com Cc: Teresa Murta teresa.murta@npl.co.uk; Author author@noreply.github.com Subject: [EXTERNAL] Re: [AlanRace/SpectralAnalysis] Question on recent alterations of peak picking. (#31)

CAUTION: This email originated from outside of NPL. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi Teresa, The new process function takes a SpectralData instance and returns an array of Peak instances.

You should be able to change your line to:

peaks = peakPicking.process(SpectralData(totalSpectrum_mzvalues, totalSpectrum_intensities));

The peaks array then has fields for the peak centroid, min and max spectral channels etc. You can get these as a vector for example:

centroids = [peaks.centroid];

Hope that helps!

Alan

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/AlanRace/SpectralAnalysis/issues/31#issuecomment-667497442, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJCQ7MAP5HEG5GSTIYYQTP3R6PJGRANCNFSM4PQR5QHQ.

Visit the NPL websitehttps://www.npl.co.uk/ and find out how our cutting-edge measurement science has a positive impact in the real world.


[http://resource.npl.co.uk/images/npl-logo.jpg]http://www.npl.co.uk/?utm_source=Email%20Footer&utm_medium=email&utm_campaign=Homepage Keep in touchhttp://www.npl.co.uk/contact [http://resource.npl.co.uk/images/twitter.jpg] http://www.twitter.com/npl [http://resource.npl.co.uk/images/facebook.jpg] http://www.facebook.com/npldigital [http://resource.npl.co.uk/images/youtube.jpg] http://www.youtube.com/npldigital


NPL Privacy Policyhttp://www.npl.co.uk/privacy-policy/

If you have received this message in error, please notify us and remove it from your system. NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses.

NPL Management Ltd is a company registered in England and Wales, number: 2937881 Registered office: National Physical Laboratory | Hampton Road | Teddington, Middlesex | UK | TW11 0LW