FormatMRC
invert slow axis for non-FEI files
#202
Closed
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.
As pointed out by @huwjenkins, there is a lack of consensus regarding the position of the origin for images represented by MRC files. Software like IMOD and EMAN2 take the origin at bottom left, whereas ThermoFisher adopts the typical raster-scan convention of having the origin at the upper-left.
I think this is a symptom of the abuse of MRC (a map data format) to hold image data.
Anyway, we suspect that any data from a non-FEI source (i.e. lacking the
FEI
extended header) will use the bottom-left convention. This change ensures that by inverting the direction of the slow axis. Then also the distance must be inverted. Note, the actual image array is left unchanged.A minor annoyance for non-FEI images is that if you want to override the distance at import you will have to provide a negative distance.