Add Dask tools for VDS creation and simple image binning#14
Merged
benjaminhwilliams merged 46 commits intomainfrom Mar 31, 2021
Merged
Add Dask tools for VDS creation and simple image binning#14benjaminhwilliams merged 46 commits intomainfrom
benjaminhwilliams merged 46 commits intomainfrom
Conversation
noemifrisina
approved these changes
Mar 10, 2021
noemifrisina
approved these changes
Mar 10, 2021
Contributor
noemifrisina
left a comment
There was a problem hiding this comment.
Just in case, nexus file generation for the image file added in branch add-nexgen-to-dask.
1cd3910 to
d7123be
Compare
Co-authored-by: Markus Gerstel <markus.gerstel@diamond.ac.uk>
# Conflicts: # src/tristan/make_single_image.py # src/tristan/make_vds.py
A precursor to a Dask alternative to VDS, reusing much of the VDS code.
Tidy up the VDS code to rationalise the operation of some functions. Return VDS-specific code to the VDS module, since it seems to be of little use in constructing the Dask alternative.
There is a regression in dask.array.bincount that prevents slicing, see dask/dask#7361. This has been fixed on dask:main and the fix will likely be included in a release soon.
Includes tools for single- and multi-image binning, without regard to trigger signal slicing. Scripts for trigger signal slicing (for pump-probe data) to follow.
We don't use the event_energy data set for anything (yet).
- If missing an input NeXus file, prompt the user. - If the output file already exists, open in "w" or "x" mode as per user instruction.
These seem to have got missed in a mangled merge resolution.
Exploit the trivial broadcasting of divmod over NumPy and Dask arrays to simplify the function definition and doc.
This comes at the cost of some code clarity because it's been done in a bit of a hurry!
- Move command-line tools to a dedicated command_line submodule. - Use argparse subparsers for the various different image binning commands.
Use flatnonzero in place of argwhere.
This gets done for all the images command-line programs, so code reuse makes sense.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a tool to do each of the following:
Closes #6.