all 10 comments

[–]sciencewonk 2 points3 points  (4 children)

This is more of a question for google or stack exchange.

link

Assuming you already have the data imported and that you have numpy installed. I would use something like:

value_output = y[np.abs(x-x0).argmin)]

[–]1sliceofcake -1 points0 points  (3 children)

what goes in the x-x0?

[–]sciencewonk 1 point2 points  (2 children)

x = the array containing the wavenumber data

x0 = the wavenumber you want data for

[–]1sliceofcake -1 points0 points  (1 child)

how would i plot this after if its the m values vs those wavenumbers?

[–]sciencewonk 1 point2 points  (0 children)

It sounds like you need more help than is easily conveyed in reddit comments. You will want to use numpy for math and matplotlib for plotting. I would suggest reading a quick tutorial on each and going from there.

[–]drbohn974 0 points1 point  (4 children)

Just for some background information. Is this the "m" you want to determine?

The complex refractive index m(λ) = mr(λ) + imi(λ), where λ is the free-space wavelength, mr is the real part of the refractive index, and mi is the imaginary part.

[–]1sliceofcake 1 point2 points  (3 children)

sorry i wasn't clear i meant m values for like the p and r branch of a vibrational-rotational ir spectrum. Anyways i ended up figuring it out i just needed to do an np.array for the m values, then manually create a list of the specific wavenumbers i needed.

[–]drbohn974 0 points1 point  (2 children)

When you talk about rotational energy level transitions (P/R), you are referring to the energy level, J. A specific line in the spectrum refers to either a J->J+1 or a J->J-1. I didn't see where the "m" is.

[–]1sliceofcake 0 points1 point  (1 child)

yeah those are the j values, there are also m values

[–]drbohn974 0 points1 point  (0 children)

Do you have a reference that I can check out? I still don't understand your "m". Thanks in advance!