Skip to content

frequency axis inverted #154

@dj136

Description

@dj136

When applying "plt.plot(data.frequency_axis(), data.spectrum().real)" the frequency axis is inverted so that the fat peak is to the right of the center at 220Hz (at 1.5T) instead of -220 Hz. The spectrometer is set to water protons so the water peak is at the center frequency (0Hz) but the fat peak should resonate below the center frequency at -220 Hz.

data.frequency_axis_ppm() on the other hand assigns the center frequency correctly to 4,7ppm and the fat peak is also at the correct position (1,3ppm).

Should the function def frequency_axis(self) which gives an array of frequencies in Hertz ranging from -sw/2 to sw/2 ( return numpy.linspace(-self.sw / 2, self.sw / 2, self.np, endpoint=False)) changed to
return numpy.linspace(self.sw / 2, -self.sw / 2, self.np, endpoint=False) in order for data.frequency_axis() to place the fat peak at the correct position at -220 Hz instead if 220Hz?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions