Skip to content

Reformatted fm.K, removed drdn_dsurface from fm.drdn_dRT and handle drdn_dsurface in surface models#641

Closed
evan-greenbrg wants to merge 1 commit into
isofit:devfrom
evan-greenbrg:clean/surface_dRT
Closed

Reformatted fm.K, removed drdn_dsurface from fm.drdn_dRT and handle drdn_dsurface in surface models#641
evan-greenbrg wants to merge 1 commit into
isofit:devfrom
evan-greenbrg:clean/surface_dRT

Conversation

@evan-greenbrg

@evan-greenbrg evan-greenbrg commented Feb 11, 2025

Copy link
Copy Markdown
Collaborator

Related to #637

Objective: To remove explicit handling of particular surfaces in the function RT.drdn_dRT. We were previously handling explicit surface cases in an if statement.

It ended up being a more involved change. Now all handling of derivative construction is relegated to fm.K where the function now accumulates necessary RT and Surface quantities, passes them to the corresponding RT and surface functions to construct the K matrix. Ideally, we wouldn't have to awkwardly pass surface vectors back into the surface module, but: #642. This should be abstracted to the point where if one wanted to create a new surface, or alter the derivatives within a particular surface, they can do so by only accessing the surface file itself.

I also moved the check_coszen_and_cos_i function into the geom class. This was originally so I could call it in surface models, but now I limit the calls to fm and RT so this change can be walked back,

I've tested with all surface types except surface_lut because I don't have a test case.

1:1 tests for the 4 surfaces I could test: The delta is the difference between these updates and dev results. Also, this is from the full pixel inversion not the analytical solution.
SurfaceCleanupVal

@evan-greenbrg

Copy link
Copy Markdown
Collaborator Author

Note: Should all be included in #637. Should merge that and close this..

@evan-greenbrg

Copy link
Copy Markdown
Collaborator Author

This will be included w/in #637 if implemented.

@evan-greenbrg evan-greenbrg deleted the clean/surface_dRT branch April 16, 2025 22:27
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.

1 participant