chianti-atomic / ChiantiPy

ChiantiPy is a python package to calculate the radiative properties of astrophysical plasmas based on the CHIANTI atomic database
62 stars 33 forks source link

Getting spectrum from Ch.spectrum without smoothing/filtering #419

Open MadFisa opened 1 year ago

MadFisa commented 1 year ago

Hi,

As mentioned in title, is there a way to calculate spectra without the smoothing/filtering? I have a specific application where the instrument response is applied by another code to the synthetic spectra and therefore the ChiantipPy spectra should be unfiltered/nonsmoothed?

How can I get a spectra without smoothing with ChiantiPy? Will I have to write some kind of impulse response filter to do that?

kdere commented 1 year ago

A relatively simple way to do this without recoding anything would be to create a fllter function that recreates an array of ones the same size of the wavelength (wvl) array. I have not had time to try it but I believe that it should work,

MadFisa commented 1 year ago

Hi, That’s what I meant by an impulse response filter. But, shouldn’t the filter be an array with 1 at Center wavelength and 0 at everywhere else(analogous to an infinitely narrow gaussian), instead of all ones? Anyways I will try it out and update , thanks.

kdere commented 1 year ago

Yes, I think you are right

kdere commented 1 year ago

you may also need to multiply by the wavelength increment