Project

General

Profile

TIA raw data conversion » History » Version 1

Anchi Cheng, 10/27/2020 04:27 PM

1 1 Anchi Cheng
h1. TIA raw data conversion
2
3
h2. TIA raw (*.bin)
4
5
The raw format in TIA is a binary file with a header.  Similar to mrc format image files, this can be parsed and converted to numpy array and then converted to any other image format.  A python script that has a few basic functions such as read and readHeaderFromFile can be found in pyami/tiaraw.py
6
7
For microED purpose, we choose to save int32 data type since the image we received are gain/dark corrected.
8
9
h2. TIA raw to mrc
10
11
Within leginon/diffrtransfer.py script this image is converted to mrc format, also at int32.  If you want to do this yourself, you can use pyami/tiaraw2mrc.py to make the conversion.  See the script in the repository for instruction.
12
13
h2. mrc to SMV
14
15
SMV is a simple crystallography format that is typically in unint16.
16
17
To retain the statistical characterization, Leginon/diffrtransfer.py converts each of the diffraction series with a constant offset that is recorded in SMV header as LEGINON_OFFSET
18
LEGINON_OFFSET is (-1) * minimal of all image min values in the diffraction series.  This is not expected to be very large if the gain/dark reference are correct.  Larger values are usually caused by cosmic ray spike and should be ignored.  Therefore, we set a cut off at 2000.
19
20
DIALS does not read LEGINON_OFFSET but wants PEDESTRAL value.  We make an estimate of reasonable PEDESTRAL value as the maximum of all image min values in the diffraction series after LEGINON_OFFSET is applied.  This is defined as such since proper gain/dark corrected image should find its background value averaged at 0 in raw or mrc images.
21
22
For example, for a diffraction series that has three images.  Their raw/mrc  image minumal values are (-10000,-145,-200).  LEGINON_OFFSET will be 2000.  Any values in the first mrc image that is less than -2000 are truncated in the corresponding SMV file.  PEDESTRAL value = -(-2000) + (-145)
23
24
For more details, please examine leginon/diffrtransfer.py