Is there a way to synthesize a spectrum for specific x axis values? #73
-
I want to synthesize a spectrum which has a given x-axis range. Normally, if I get the x-axis vector of a spectrum, the space between the x-axis points are not equal. Is there a straight forward way to do so within ramanchada2? I see there is the xcal option, but could I used it to load a given x-axis vector? Thank you in advance for your time! |
Beta Was this translation helpful? Give feedback.
Answered by
georgievgeorgi
Mar 24, 2023
Replies: 1 comment 2 replies
-
Yes, here is the example: import numpy as np
import ramanchada2 as rc2
xarr = np.array([1, 1.1, 2, 2.2, 3, 3.3, 4, 4.4, 5, 5.5])
yarr = np.random.exponential(size=len(xarr))
rc2.spectrum.Spectrum(x=xarr, y=yarr).plot(fmt=':.') |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
nicocopez
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, here is the example: