Skip to content
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

Sweep functionality #362

Closed
dkazanc opened this issue Jun 6, 2024 · 1 comment · Fixed by #380
Closed

Sweep functionality #362

dkazanc opened this issue Jun 6, 2024 · 1 comment · Fixed by #380
Labels
enhancement New feature or request

Comments

@dkazanc
Copy link
Collaborator

dkazanc commented Jun 6, 2024

As this stands as a high priority to complete, I've been thinking how this can be done on a higher level first.

Here are some general constraints, that we probably should impose to make things simpler:

  • Only one parameter to optimise at the time
  • Input is always a small preview set of 5-7 slices. I'd go with >3 slices as it with 3d methods in place, we would like to have some adjacent neighbouring information vertically. The user can specify the previewed set but we always need to take middle 5 slices of that set. For the whole volume it will be the middle chunk.
  • The output does NOT go into the hdf5 file automatically. I'll work to resolve Autosave of the last method result into the file #283 so it is a user-controlled thing. Probably if the user enables saving, then we should warn and switch that off? The 4D dataset could be an option though, but might not necessarily needed, if the bellow option is enabled.
  • The output saves the series of tiffs with respect to each parameter value that is being optimised in the sweep selection. Only the mid-slice of the previewed 5- slices set is being saved in the tiff file.

Implementation notes:

  • we need a way how to loop the series of methods. Possibly a section should be created starting with the method which parameters are being optimised?
  • save_to_images probably can be auto-substituted but as we need just one file (mid-slice) to be saved may be we could come up with a slightly modified wrapper? The parameter value should be in the name of the tiff file created.
@dkazanc dkazanc added the enhancement New feature or request label Jun 6, 2024
@yousefmoazzam
Copy link
Collaborator

@dkazanc Regarding the criteria that the parameter value should be in the tiff filenames that are created: I think this isn't possible with only a modified image saver wrapper, because the method function in httomolib chooses the file names: https://github.com/DiamondLightSource/httomolib/blob/eab881480b5f277085f0113b234c01c8ccca16ec/httomolib/misc/images.py#L135-L138 and doesn't expose a way to change the filenames generated.

If we'd like the parameter sweep values to be in the tiff filenames, I think this would require a change to the actual method function in httomolib, do you see any other way to change the filenames without changing the method function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants