Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dark pixel indices for ST #194

Merged
merged 1 commit into from
May 9, 2023
Merged

dark pixel indices for ST #194

merged 1 commit into from
May 9, 2023

Conversation

ericmorelle
Copy link
Contributor

Hi Andreas,
sorry to bother you again but I managed to find the dark pixel indices with your hints in #192 and wanted to include them.

I also found some codes for the OBP2Protocol on the way that I included for potential future developement ;-)

and OBP2Protocol codes
@ap--
Copy link
Owner

ap-- commented May 7, 2023

No need to apologize! Thank you so much for contributing ❤️

2 quick questions before I merge this and prepare a new release:

  1. One of the commands you added is GET_OPTICAL_DARK_PIXELS. Did you manage to match the range you set for the dark pixels to data returned from the spectrometer (by reading the packet capture)?

  2. (related) are any of the pixels in the range you specified for the dark pixels constant, and don't change their value at all? (If so, those should be excluded)

Basically the readout from dark pixels should be independent of the incoming light but dependent on other noise sources (like temperature, and inherent noise of the electronics). Some pixels might be just pulled to ground and have a constant value, which is why those should be excluded from the range.

It should be easy to test, by just checking over multiple reads if the set of dark pixels you chose has any change in value at all.

Cheers,
Andreas 😄

@ericmorelle
Copy link
Contributor Author

One of the commands you added is GET_OPTICAL_DARK_PIXELS. Did you manage to match the range you set for the dark pixels to data returned from the spectrometer (by reading the packet capture)?

Not yet. As I said: I'm not really experienced with USB communication. I was able to pinpoint the command and added it because I thought it might be handy in the future. Maybe I can have another look at it in the coming weeks.

(related) are any of the pixels in the range you specified for the dark pixels constant, and don't change their value at all? (If so, those should be excluded)

I checked that: none of the pixels (of the entire spectrum) are constant.

The device also provides a GET_TRANSITION_PIXELS (I hope I remember the name correctly) method that returns the indices of a few pixels between the actual active pixels and the dark pixels. I assume they are to some extend exposed to stray light and therefore not completely 'dark'. As you can imagine, I did not include those into the range for the dark pixels.

@ap--
Copy link
Owner

ap-- commented May 9, 2023

Perfect!

Thank you again for contributing!
I'll wait a bit with the new release to see if I can address #193 before

@ap-- ap-- merged commit 2dbb45b into ap--:main May 9, 2023
8 checks passed
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.

None yet

2 participants