Skip to content

Conversation

@krisgry
Copy link

@krisgry krisgry commented Sep 26, 2025

Hi,
I have tried to verify the calibration and dark-pixel offset in ramses_calibrate.py by testing with a RAMSES sensor in an optical lab with a mercury test tube. Below is a plot comparing the original pytrios code by a modification done by my former colleague Artur Zolich. The vertical lines are the expected peaks of mercury, at [365, 405, 435, 546] nm. As you can see, the code by Zolich fits better.

image

Let me know if you would like me to send you the numerical values used in the plot, and/or the raw data from the sensor.

To be clear: this fix was made by Artur by comparing the output from MSDA with pytrios. I know he has been in contact with you on that, via email. I have also been in contact with Triosm, who confirm that there is an error in the indexing in the interpolation in the manual (but frustratingly became radio-silent after that), and one of our research partners who also confirm having problems with this.

I hope that this PR can fix the problem, and clear the confusion.

Regards,
Kristoffer

@StefanSimis
Copy link
Owner

StefanSimis commented Sep 26, 2025 via email

@krisgry
Copy link
Author

krisgry commented Oct 3, 2025

For completeness: below is how another repo that is dealing with calibration of trios ramses data in python handles the interpolation:

https://github.com/hbliu104/PyRamses/blob/154df21a2dac0041f3585cffdc6ab0d706001c52/PyRamses.py#L336

Later in the code, the calibrated spectrum is accessed by discarding the first element (cal[1:])
https://github.com/hbliu104/PyRamses/blob/154df21a2dac0041f3585cffdc6ab0d706001c52/PyRamses.py#L670

@StefanSimis
Copy link
Owner

StefanSimis commented Oct 3, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants