Skip to content

How to use mean_spectra correctly? #36

@darioxjose

Description

@darioxjose

Hi!

I started using RamanSPy to evaluate my Raman data, since I map a large area (15 x 700 spectra).

I want to divide these along the y-direction, so along the 700 spectra, by a wanted number of sections, e.g. num_sections = 6.
But when I apply the mean_spectra function with the plot_type argument, the spectra will be plotted as plotted in style 'single' independent 'stacked' or 'single stacked' is given as argument.

I already tried the following (and more)

ramanData = rp.load.renishaw('filepath for .wdf-file')
num_sections = 6
width = ramanData.shape[1] # the number of spectra in y-direction
for i in range(int(num_sections)):
rp.plot.mean_spectra(ramanData[:, int(i * (width / int(num_sections))):int((i + 1) * (width / int(num_sections)))])

that gives all spectra, but overlapping and in the same color
while

rp.plot.mean_spectra([ramanData[:, int(i * (width / int(num_sections))):int((i + 1) * (width / int(num_sections)))] for i in range(int(num_sections))], plot_type='single stacked')

gives only the mean of all spectra and does not distinguish between the single spectra.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions