Stuermer / EchelleSimulator

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

Efficiency of the Spectrograph #23

Open maddalenabugatti opened 3 months ago

maddalenabugatti commented 3 months ago

Hello Julien, I have a little doubt about the efficiency that Pyechelle automatically applies on the spectrum. In my simulations, I did not set any specific efficiency while running the simulator and I use an input source in photon/s (CSV file). I thought that the efficiency was then automatically set to 1. However, once I extract the 1D spectrum I do not obtain something of the same order of magnitude as my input: let's say my input spectrum has an average of about 1000 photons/s, I would expect about the same average in the extracted 1D spectrum. But unfortunately I get systematically an average 40-50 times smaller than the input. I was wondering if an efficiency is automatically computed using the affine matrices, or using the model of the CCD. I tried the command 'sim.set_no_efficiency()' to avoid any extra efficiency, but it gives error (maybe I am calling it in a wrong way) . Thank you very much in advance, Cordially, Maddalena

Stuermer commented 3 months ago

Hi Maddalena, thanks for your report (next time though, please do it on PyEchelle repo :-) ). Can you send me your CSV file ? I'm almost done rewriting the whole python module that deals with input spectra - my guess is that your issue has to do with the fact that you specify ph/s, while PyEchelle normally expects ph/s/nm (a spectral flux). I can try my new code and see how it deals with ph/s. Best, Julian

maddalenabugatti commented 3 months ago

Oh gosh! Thanks for sending the correct Pyechelle Github site. That’s a great news about the new module that deals with the input spectra units :)

Sorry, I was not enough precise in the raised issue, I already used the spectral flux as input (ph/s/angstrom) and the wavelengths expressed also in angstrom… maybe I have to express the spectral flux in ph/s/nm, with the nm as mandatory units?

You can download a CSV that I use here: https://filesender.switch.ch/filesender2/?s=download&token=cccb72ac-eb13-4744-afbe-0aa5a68e3909

It’s very faint target because it’s the reflected spectrum of an exoplanet + star’s halo multiplied by all the efficiencies of all the instruments, so in Pyechelle the efficiency should be set to 1. The wavelengths are in angstrom and the spectral_flux is in ph/s/angstrom. I took an exposure of one hour and then divided the extracted 1D flux by 3600 to see if it was similar to the input one (re-expressed in in ph/s), but so far it’s always different. I also tried to play with the wavelength units, but maybe not enough eheh.

Thank you very much for your availability.

Have a nice weekend, Cordially, Maddalena

On 15 Mar 2024, at 19:57, Stuermer @.***> wrote:

Hi Maddalena, thanks for your report (next time though, please do it on PyEchelle repo https://gitlab.com/Stuermer/pyechelle :-) ). Can you send me your CSV file ? I'm almost done rewriting the whole python module that deals with input spectra - my guess is that your issue has to do with the fact that you specify ph/s, while PyEchelle normally expects ph/s/nm (a spectral flux). I can try my new code and see how it deals with ph/s. Best, Julian

— Reply to this email directly, view it on GitHub https://github.com/Stuermer/EchelleSimulator/issues/23#issuecomment-2000271718, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2XK6OPOWFAXV6LQDI7XQ4TYYNACBAVCNFSM6AAAAABEXYVWQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBQGI3TCNZRHA. You are receiving this because you authored the thread.