Stuermer / EchelleSimulator

GNU General Public License v3.0
11 stars 2 forks source link

relative intensities when using --linelist option #15

Closed cmbergmann closed 2 years ago

cmbergmann commented 6 years ago

When creating simulated spectra with the --linelist option (eg a ThAr spectrum), I am not sure if the counts in the spectrum are correct. That is, when providing a line list table in the format "wavelength; relative_intensity", the counts in the lines in the fits file do not seem to be correlated with the relative intensities.

For example, here is an extract of a ThAr linelist showing 6 lines with vastly different relative intensities: 0.93310500; 1 0.93359800; 0 0.93361619; 210 0.93364483; 38 0.93387676; 46 0.93407047; 2400

But the extracted spectrum looks like this: thar_example

cmbergmann commented 6 years ago

I figured out what it is doing wrong with the relative intensities: instead of using the relative intensities for each line, the code uses the average of the relative intensities of the line itself and the next one (zero, in case of the last line). That is the i-th line ends up having (relint(i)+relint(i+1))/2 as its intensity - see screenshots below: relints_table_screenshot extracted

cmbergmann commented 6 years ago

Note in the example above that some lines only appear to have different heights because of the sampling (ie from left to right, lines 1-7, 8-9, 10-14 actually have the same integrated counts). However, lines 8 & 9 as well as 14 are actually different from the others

Stuermer commented 2 years ago

this should be fixed in PyEchelle. If not please reopen there...