Skip to content

Add reference spectra example - #22

Draft
manke-cubert wants to merge 4 commits into
mainfrom
feature/add_reference_spectra_example
Draft

manke-cubert wants to merge 4 commits into
mainfrom
feature/add_reference_spectra_example

Conversation

@manke-cubert

Copy link
Copy Markdown
Contributor

No description provided.

@rajanish4 rajanish4 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran the notebook against the fixes build (3.6.0 build 7273199) with cuvis 3.6.0.0. No errors, all numbers are the same as in the committed outputs, and the plots look good. Some points:

  1. "Cuvis SDK 3.6 or newer" should be 3.6.1. On the released 3.6.0 the notebook runs, but cell 9 gives 0.0096 instead of 0.0000 (target spectrum not interpolated linearly). Also what the "fresh Measurement" cell says is not true there: a cleared target spectrum is still used when you apply again on the same measurement, and the white spectrum stays active after you set the White measurement back.
  2. The implicit reference part (cell 3) is right for a measurement processed with a context that doesn't know the spectrum. But when you reopen an exported file, ProcessingContext(session) loads the spectrum as explicit reference (has_reference is True), and the measurement has it as implicit one too. You need clear_reference and clear_implicit_reference, one alone is not enough. Maybe add a sentence for that.
  3. Raw vs dark-corrected: the notebook uses dark-corrected counts, but the set_reference docstring in cuvis 3.6.0.0 and the SDK header (cuvis.h) still say "raw sensor counts". I can't tell from the demo file which one is right, because its dark is basically 0 (mean 0.002 counts), so raw and dark-subtracted give the same spectrum. Can you check which one is correct and fix the other side?
  4. The pixel used for the plots (205, 205) goes up to about 225% reflectance at 400 nm and stays above 100% until around 600 nm. I guess that's because this spot is brighter than the white reference, but people who see the example for the first time might think something is wrong. Maybe pick a darker pixel or add a short note.
  5. The outputs come from build 8bd07b4 with Python 3.14, the other notebooks use 3.12.7. Please run it again with the released 3.6.1 before merging.

…one measurement 2 with a comparison figure. Example 5 has clearer camera comments.

@birkholz-cubert birkholz-cubert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nits:

  • requirements.txt doesn't pin cuvis, but Example 6 needs 3.6.1. Consider cuvis>=3.6.1.
  • The new pansharpening comparison cell in Example 4 hardcodes C:/Program Files/Cuvis/user/plugin/raw/00_RGB.xml, so it is Windows-only. The earlier cells already did that, but now that the path is used in three places, one variable at the top would help.
  • In Example 6, import os sits in cell 2 while the other imports are in cell 1.

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.

3 participants