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

Backend: VoxelSpacing used by AlignmentImporter is read from (potentially wrong) input MRC-header #1384

Open
uermel opened this issue Dec 6, 2024 · 0 comments
Assignees
Labels
backend bug Something isn't working data

Comments

@uermel
Copy link
Contributor

uermel commented Dec 6, 2024

Describe the bug
The volume dimensions in the alignment metadata are provided in Angstrom (physical dimensions). They should be computed by multiplying the tomogram's voxelspacing with its voxel dimensions. In many cases we are overriding the voxel spacing in the input tomograms with a curator-provided voxel spacing, because the input files have known bad metadata.

In case of the current AlignmentImporter, the Importer seems to use the voxelspacing of the input MRCs to compute volume dimensions instead of the correct one from the config files.

Example: Dataset 10302, run 14042022_BrnoKrios_Arctis_grid5_Position_37

Correct VoxelSpacing: 7.84
input MRC VoxelSpacing: 7.28
Volume voxel dimensions: 1024x1024x512

Alignment Metadata:

{
    "format": "ARETOMO3",
    "method_type": "patch_tracking",
    "per_section_alignment_parameters": [],
    "alignment_path": null,
    "tilt_path": null,
    "tiltx_path": null,
    "tiltseries_path": "10302/14042022_BrnoKrios_Arctis_grid5_Position_37/TiltSeries/100/tiltseries_metadata.json",
    "files": [
        "10302/14042022_BrnoKrios_Arctis_grid5_Position_37/Alignments/100/ctfphaseflip_ctffind4.txt"
    ],
    "volume_dimension": {
        "x": 7454.72,
        "y": 7454.72,
        "z": 3727.36
    },
    "affine_transformation_matrix": [
        [
            1,
            0,
            0,
            0
        ],
        [
            0,
            1,
            0,
            0
        ],
        [
            0,
            0,
            1,
            0
        ],
        [
            0,
            0,
            0,
            1
        ]
    ],
    "alignment_type": "GLOBAL",
    "is_portal_standard": false,
    "volume_offset": {
        "x": 0,
        "y": 0,
        "z": 0
    },
    "tilt_offset": 0,
    "x_rotation_offset": 0,
    "deposition_id": 10300,
    "last_updated_at": 1729266327
}

When computing the expected volume size, e.g. for x/y dimensions:

7454.72 / 7.84 = 950.8571428571429

7454.72 / 7.28 = 1024

I.e. the wrong voxelspacing from the MRC-header was used in this computation.

Expected volume size would be:

    "volume_dimension": {
        "x": 8028.16,
        "y": 8028.16,
        "z": 4014.08
    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working data
Projects
None yet
Development

No branches or pull requests

2 participants