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.
Description of the change
Direct Electron allows for custom scan patterns/ non-linear distributed or serpentine scan patterns to be loaded. This is a nice feature, but sometimes it can be difficult to account for when loading data. Ultimately, the data is still locked to a grid, but no every pixel has to be scanned and the data is often not in the correct order.
Along with each .mrc file a scan_coordinates.csv file is also saved which is simply two columns with x, y scan positions. This file is likely to be updated in future with additional columns (time stamp, in situ information etc) but for now it should be relatively static.
Loading this type of data is a little tricky, but the core concept is that a fully dense array is created. If a scan position isn't scanned, it is set to all zeros and should be easy to ignore, mask etc. and it should compress down to almost nothing. Otherwise I could set those missing arrays to all nan but that would require casting from int to float which I would rather not do.
Progress of the PR
upcoming_changes
folder (seeupcoming_changes/README.rst
),docs/readthedocs.org:rosettasciio
build of this PR (link in github checks)Minimal example of the bug fix or the new feature