-
Notifications
You must be signed in to change notification settings - Fork 2
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
Decouple spline staging from class declaration #192
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I'm in favor of not loading in data files until it's needed. I think this would cause issues for parallelization as in #140, though I'm not sure if that is still being pursued.
Perhaps @kjmeagher and @briedel can comment, or at least take note of this PR.
Ah yes, parallelization 😄 Using this + multitasking + #174's updates helps to avoid the memory concerns that were addressed in #140. Of course, we'll have to test this to see what else needs to be addressed, but it's generally using a different paradigm. I'm planning to begin work on this in June (after vacation 🌴) |
This is fine with me. This is basically the same thing as I suggested |
new issue: #194 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good improvements. I have a couple requests, mainly for coding style.
There are no blocking concerns and I have manually tested We can then move the discussion to #189 . |
Addressing #191 as intermediate step for #189.
This PR decouples the spline staging and instantation of the photospline services from the class declaration, so that importing the class does not trigger file writes or memory allocation by I3PhotoSplineService.
I have the kept the structure of having everything implemented in static attributes / methods, so the class is still not meant to be instantiated, but I am considering taking a step further and changing this as well.
In principle, aside from readability concerns, there is nothing preventing us to define the reconstruction traysegment as a bound method (so I have been told), so instead of:
one would have:
I think this would provide more flexibility as well as a natural way of implementing configurability for the reconstruction algorithm (see #188).