-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading different images in the same session #15
Comments
This note is about what happens when an image is loaded. This is relevant both to the question off what processing is necessary achieve a clean slate, the topic of this issue, and to my current efforts to generate images that have been processed in a variety of ways.
(*) I'm pretty sure Python allows you to do some tricks so an apparently non-functional setting like |
Point 6 above says
# In case parameter function or decay value were reset:
self.set_prior_from_param_func(self.param_func_type) That method does do some fixes, though it does not redo the settings of self.param_func_type = self.bas.param_func_type
self.param_func_choices = self.bas.param_func_choices
if self.param_func_type == "Inverse Power Decay":
self.bvec = self.bas.bvec_ixsc
elif self.param_func_type == "Banded Inverse Power Decay":
self.bvec = self.bas.bvec_ixscbanded
elif self.param_func_type == "Linear Decay":
self.bvec = self.bas.bvec_linsc in the if pft == "Inverse Power Decay":
self.prior_mean = self.bas.ixsc(self.bvec,self.kdist,self.decay)
self.prior_std = self.prior_scale*self.prior_mean # default for now so it seems to be making its own choices based on the current setting. However, note the use of That's the qualified good news. The bad news is that my earlier remark in point 7
is basically false. The The logic of keeping |
More issues with the same code. if self.param_func_type != "Empirical":
self.prior_std[np.where(self.prior_mean != 0.0)] = self.prior_scale*self.prior_mean[np.where(self.prior_mean != 0.0)]
self.prior_std[np.where(self.prior_mean == 0.0)] = self.prior_scale*self.prior_mean_init
self.prior_std2 = self.prior_std*self.prior_std
# In case parameter function or decay value were reset:
self.set_prior_from_param_func(self.param_func_type) The problem is that |
Scenario
In the GUI load one image, work with it, then load another image, possibly with different dimensions or other attributes.
Or load repeated images without the GUI.
Check
The second image is set the same way it would have been if it were loaded first.
Concern
The second image might carry over some settings from the first, or be missing some settings.
Background
Because of these concerns, Karl initially recreated self.mybifs with each new image load. Ross changed this to rely more on copying. I (Ross) think the motivations were two-fold:
In particular, commit 47f9171 introduced this change, with the cautionary note
Extra Credit
Create one or more automated tests for these issues.
The text was updated successfully, but these errors were encountered: