Skip to content

309 code bug incorrect units on enclosed energy example#312

Merged
jehsharp merged 21 commits into
sandialabs:developfrom
bbean23:309-code-bug-incorrect-units-on-enclosed-energy-example
Dec 2, 2025
Merged

309 code bug incorrect units on enclosed energy example#312
jehsharp merged 21 commits into
sandialabs:developfrom
bbean23:309-code-bug-incorrect-units-on-enclosed-energy-example

Conversation

@bbean23
Copy link
Copy Markdown
Collaborator

@bbean23 bbean23 commented Nov 26, 2025

Purpose

Use the correct units on spot analysis visualizations.

fixes #309

Summary of changes

  • Add coordinates transforms to SpotAnalysisOperable
  • Update coordinates transforms in CroppingImageProcessor and TargetBoardLocatorImageProcessor
  • Utilize coordinates transforms when plotting images with visualization spot analysis image processors

Implementation notes

Correctness was verified with the addition of new unit tests.

Please note: some of the unit tests for the spot analysis image processors are skipped due to a bug in the way that Matplotlib handles closed plots. There is a note detailing this in these skipped tests.

Submission checklist

  • Target branch is develop, not main
  • Existing tests are updated or new tests were added
  • opencsp/test/test_DocStringsExist.py are verified to include this change or have been updated accordingly
  • .rst file(s) under doc/ are verified to include this change or have been updated accordingly

Additional information

We're using sympy expressions for the coordinate transforms because they are serializable, which is a key feature of the SpotAnalysisOperable class. We want to maintain its ability to be serialized so that it can be easily multi-processed using the multiprocessing library sometime in the future.

…pixels_transforms() methods, make PerspectiveTransform OpenCSP compliant by adding unit tests and docstrings
…_to_pixels_conversion() to PerspectiveTransform
…it tests for ViewCrossSectionImageProcessor, add invert_ylim option to View3d.draw_image()
…to use operable.transform_coordinates() in their visualizations
@bbean23 bbean23 requested review from jehsharp and rcbrost November 26, 2025 23:32
@bbean23 bbean23 added bug Something isn't working enhancement New feature or request labels Nov 26, 2025
@bbean23 bbean23 linked an issue Nov 26, 2025 that may be closed by this pull request
1 task
Copy link
Copy Markdown
Collaborator

@jehsharp jehsharp left a comment

Choose a reason for hiding this comment

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

Hey Ben, this looks good to me, thanks!

@jehsharp jehsharp merged commit 43c8d0a into sandialabs:develop Dec 2, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Code Bug]: incorrect units on enclosed energy example

2 participants