rampy icon indicating copy to clipboard operation
rampy copied to clipboard

synergies with infrared emission code?

Open erwanp opened this issue 5 years ago • 2 comments

Hello,

I see that rampy is used to process IR spectra, but I do not know the needs of the geophysicist community : I've developed a high-resolution infrared emission code for gases, called RADIS. Do you ever need to calculate such spectra?

In that case, I'm considering updating my code (https://github.com/radis/radis) to make the output compatible with the rampy analysis tools

erwanp avatar Jun 20 '19 16:06 erwanp

Hi,

Well, it could be useful for some of us for treatment of spectra acquired on gas inclusions for instance!

Rampy is not limited for use in geosciences, but aimed at providing help for treatment of spectral data in general. It is built with a KISS principle in mind: data are numpy arrays, most of the processing remains low level (functions allow to fit baselines, smooth spectra, etc., but you have to chain them yourself) except the machine learning stuffs that are high level API to scikit-learn algorithms. This is to actually allow easy interfacing of rampy with the other libraries like scipy, numpy, pandas or scikit-learn.

So as long as you can enter x-y spectra as numpy arrays, interfacing with rampy should be easy!

Now, your project is interesting and I think I will add a comment on Rampy README referring to it, so users are guided toward it if they need to do this kind of processing. We could also consider adding a API toward RADIS in Rampy if you want.

charlesll avatar Jun 21 '19 09:06 charlesll

Thanks for your answer and your interest! I'm glad there may be some use case: I guess gas inclusion experiments return transmittance spectra?

In that case everything could be done on the user side and be as simple as:

from radis import calc_spectrum
s = calc_spectrum(....)    # species, pressure, temperature, mole fraction etc.
s.apply_slit(...)                # apply spectrometer broadening function
spectrum = np.array(s.get('transmittance'))
# And then use rampy magics on the spectrum object

We could simply suggest that in the docs and there is no real need for an interface.

To start with, I referenced rampy in the new version of the radis readme and website.

erwanp avatar Jun 25 '19 15:06 erwanp