Surface statevector hookups and overhaul.#871
Conversation
250ec24 to
b2ad2a0
Compare
|
|
This looks good! @evan-greenbrg I like the way that folding glint priors into the .mat file makes it easier to keep the config file assumptions consistent with the .mat file. e.g. to avoid double bookkeeping glinty libraries with a physical glint model. |
b2ad2a0 to
ae0fb08
Compare
|
Ensure that setting the values is reasonably intuitive. |
|
Hitting an edge case here when initializing the forward model with an already existing main config file: if that file does not include the Solution could be to implement a check if the surface mat file that is indicated in the main config provides the |
|
Discussed solution:
|
82defbc to
f654b33
Compare
Surface statevector can come from surface.json. Overhaul internal surface statevector hookups Typo Breaking out RT, surface, instrument StateVectorConfig Debugging examples Logging bug Change get_config_single_element to get Added some additonal comments typo
…heck Backwards compatability Typo
7fe2088 to
d2328bb
Compare
|
📊 Generated results:
URL: isofit/isofit-test-results#25 |
|
Thanks for the tests @evan-greenbrg. Given that sun & sky glint are now config terms, and given that the glint model requires (based on indexing) both of them to be populated in order to use, we should have a condition in the configuration that requires the mutual presence of both parameters if either is populated and we're in glint mode. I don't see it - am I missing it, or is this something we need to fill in? Outside of this, I'm ready to merge. |
This is a good point. As it's currently written, the user could theoretically only provide one of the glint terms in the config, and the other config value would be pulled from the default. No matter if specified, the necessary glint config terms for the prior and scale values will be accessible. We could add an explicit check that if one of the terms is specified custom within the config, the other would have to be as well. Surface statevector terms are treated independently from a config standpoint--analogous to the RT statevector terms. |
|
Agreed - given this is an uncommon pathway, I'd be willing to merge as we flag to fix later - thoughts? Or would you prefer to fix first? |
I'm conflicted on this. In the glint case, I think a check that raises some log if a Default config is used is a useful one. However, this PR would be nice to get in before the RT refactor as the config/state variable configs may change when removing Barring any strong reservations, I would lean to consider merging this, then patching. |


Early stages, needs to be tested. Description also to be fleshed out.
This does two things:
surface.jsonfile. This can be done by explicitly pointing to a surface model, or broadly including the relevant parameters.I'll include more fleshed out specifics, but along the lines of:
These will propagate into the surface.mat file, which will in turn be read by the build_config script.
I updated how we read in surface statevector optimziation parameters. These now come from (if not specified) named tuples in the same format as the StatevectorConfigElement. Default StatevectorConfigElement are then used for the surface models that have non-rfl state-vector elements. Within this context, values specified in the
surface.jsonact as "overrides" for the defaults.I added a
warningssection forcheck_config_validity(). Currently, this is only used for matching the non-reflectance surface statevector elements between.jsonand.matfiles. Failing the check prints a warning: