NelisW / pyradi

a Python toolkit to perform optical and infrared computational radiometry
http://nelisw.github.io/pyradi-docs/_build/html/index.html
MIT License
58 stars 34 forks source link

wavenumber definition #21

Closed 9com closed 4 years ago

9com commented 4 years ago

It seems I am mis-interpreting Pyradi's definition of wavenumber. the Pyradi manual shows that a wavenumber of 3300cm^-1 equals a wavelegnth = 3um. Does this means that Pyradi uses wavelegnth=1/wavenumber ? Of course we know that frequency = 1/wavenumber and that wavelegnth= 2*PI()/wavenumber.
Also, in the module " ryutils.convertSpectralDomain " the wavenumber range seems to be limited from 2000cm^-1 to 3300cm^-1. Is this true ? Reference: waven = np.arange(2000.0, 3300.0, 50).reshape(-1, 1) wavel= ryutils.convertSpectralDomain(waven, type='nl') Thank you !!

sfcook526 commented 4 years ago

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: 9commailto:notifications@github.com Sent: Thursday, January 9, 2020 12:16 PM To: NelisW/pyradimailto:pyradi@noreply.github.com Cc: Subscribedmailto:subscribed@noreply.github.com Subject: [NelisW/pyradi] wavenumber definition (#21)

Wavenumber is almost always expressed in units of cm-1 or inverse centimeters. The conversation from wavelength in um to wavenumber in cm-1 is

cm-1 = ((1/um)* 10000)

It seems I am mis-interpreting Pyradi's definition of wavenumber. the Pyradi manual shows that a wavenumber of 3300cm^-1 equals a wavelegnth = 3um. Does this means that Pyradi uses wavelegnth=1/wavenumber ? Of course we know that frequency = 1/wavenumber and that wavelegnth= 2*PI()/wavenumber. Also, in the module " ryutils.convertSpectralDomain " the wavenumber range seems to be limited from 2000cm^-1 to 3300cm^-1. Is this true ? Reference: waven = np.arange(2000.0, 3300.0, 50).reshape(-1, 1) wavel= ryutils.convertSpectralDomain(waven, type='nl') Thank you !!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/NelisW/pyradi/issues/21?email_source=notifications&email_token=ADDWHU2PLI4XHNDLADT5IPTQ45ZYDA5CNFSM4KE5ELRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IFEYK2A, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADDWHU3SOZAGJLHYS4OC2L3Q45ZYDANCNFSM4KE5ELRA.

9com commented 4 years ago

Thanks for your fast response.

If wavelegnth = 1.55um then Waven = 6451.61 cm-1 , Heres a wave number range: waven = np.arange(4500, 6500, 25).reshape(-1, 1) that would be required. I get: ValueError: A value in x_new is above the interpolation range. How can we use : waven = np.arange(4500, 6500, 25).reshape(-1, 1)

Thank you

NelisW commented 4 years ago

Thanks guys for the interest and response.

Indeed (wavenumber in cm-1)*(wavelength in um) = 10 000. There is no enforced limit on the values, except to standard numerical over/underflow, etc.

Your issue is a Python issue, not a pyradi issue. I don't use arange, normally use np.linspace. Without a https://en.wikipedia.org/wiki/Minimal_working_example I cannot really comment on your problem.