Skip to content

shift_fidfilemarkers.py

Chris Churas edited this page Oct 21, 2016 · 8 revisions

shift_fidfilemarkers.py shifts markers in IMOD fiducial file generated by ETspec.

Using IMOD tools this script reads in an IMOD .fid file to obtain markers. The script then shifts these markers by values set in --xshift and --yshift writing the results to another IMOD .fid file. It is assumed the input file is a binary IMOD file and the IMOD command model2point is used to convert the file to an ascii format that is parsed. After shift_fidfilemarkers.py shifts the markers they are saved back as an IMOD binary .fid file using point2model

Example

This example takes this 2Dmarkers_all.fid file and shifts the marker positions in the x by 100.

View of 2Dmarkers_all.fid in IMOD before shifting:

Originial Marker Positions

View of output of shift_fidfilemarkers.py (100shift.fid) after shifting:

Marker Positions shifted 100 in X

Command to run:

NOTE: To run this IMOD must be installed and the IMOD commands model2point and point2model must be in your path.

Before running please download ((2d markers file here) and then run the command below in the same directory 2Dmarkers_all.fid is located.

shift_fidfilemarkers.py --xshift 100 --yshift 0 2Dmarkers_all.fid 100shift.fid
Clone this wiki locally