Skip to content

Fix incorrect calls to ForwardModel.calc_rdn()#656

Merged
pgbrodrick merged 1 commit into
isofit:devfrom
barentsen:fix-calc-meas
Mar 24, 2025
Merged

Fix incorrect calls to ForwardModel.calc_rdn()#656
pgbrodrick merged 1 commit into
isofit:devfrom
barentsen:fix-calc-meas

Conversation

@barentsen

Copy link
Copy Markdown
Contributor

In #524, ForwardModel.calc_rdn() was updated to take rho_dir_dir and rho_dif_dir instead of a single rfl argument:

def calc_rdn(self, x, geom, rho_dir_dir=None, rho_dif_dir=None, Ls=None):

However, ForwardModel.calc_meas() wasn't updated accordingly and still passes a single rfl arg to calc_rdn:

rdn_hi = self.calc_rdn(x, geom, rfl, Ls)

As a result, any output relying on calc_meas -- such as radiometry_correction_file, path_radiance_file, and modeled_radiance_file -- appear to contain incorrect values.

We may want to use named arguments in function calls throughout ISOFIT to make bugs like this impossible.

Comment thread isofit/core/forward.py
@pgbrodrick

Copy link
Copy Markdown
Collaborator

Great catch, and good general suggestion. @unbohn , if you agree, let's get this merged in.

@unbohn

unbohn commented Mar 24, 2025

Copy link
Copy Markdown
Collaborator

Absolutely agreed! Thanks for the catch @barentsen. @pgbrodrick Please go ahead and merge.

@pgbrodrick pgbrodrick merged commit 8c8bf23 into isofit:dev Mar 24, 2025
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