salilab / imp

The Integrative Modeling Platform
https://integrativemodeling.org
GNU General Public License v3.0
74 stars 30 forks source link

Handle MRC files with non-standard indexing #1055

Closed benmwebb closed 3 years ago

benmwebb commented 3 years ago

This should address the issue of loading an MRC file where mapc,mapr,maps != 1,2,3 and close #1053, maybe also point to a solution for #1054. Please review and merge if it looks good to you.

ichem001 commented 3 years ago

I use the test https://github.com/salilab/imp/blob/adc556d48d67722ead4983cf2c1c1dd93ed51b80/modules/em/test/test_mrc_indexing.py#L22-L25 as a template to modify python code (only) on my local branch for assessing whether set_origin() would fix the #1054. It seems it does fix the issue. I will have to do a more thorough assessment on the develop branch this weekend but I am confident that fixed that issue at least.

If this PR fixes the issue, should we implement it in the CPP code so that it is always corrected upon reading a MRC file?