# Data import on BornAgain

file:///usr/share/doc/bornagain/html/ref/fit/data-import/index.html Recent content in Data import on BornAgain Hugo en-us

# TIFF

file:///usr/share/doc/bornagain/html/ref/fit/data-import/tiff.html Mon, 01 Jan 0001 00:00:00 +0000 file:///usr/share/doc/bornagain/html/ref/fit/data-import/tiff.html <h2 id="tiff-data-format">TIFF data format</h2> <p>Before loading the main binary data, BornAgain reads the following metadata tags from <code>tiff</code> file:</p> <ul> <li><a href="https://www.awaresystems.be/imaging/tiff/tifftags/imagewidth.html">ImageWidth</a></li> <li><a href="https://www.awaresystems.be/imaging/tiff/tifftags/imagelength.html">ImageLength</a></li> <li><a href="https://www.awaresystems.be/imaging/tiff/tifftags/bitspersample.html">BitsPerSample</a></li> <li><a href="https://www.awaresystems.be/imaging/tiff/tifftags/samplesperpixel.html">SamplesPerPixel</a></li> <li><a href="https://www.awaresystems.be/imaging/tiff/tifftags/sampleformat.html">SampleFormat</a></li> </ul> <p>If any of these tags is not found, an error message will be shown.</p> <p>The requirement to values of the tags are following:</p> <ul> <li><code>BitsPerSample</code> should be 8, 16 or 32.</li> <li><code>SamplesPerPixel</code> should be 1, which means grayscale image with one channel, corresponding to signal intensity.</li> <li><code>SampleFormat</code> should be 1, 2 (integer numbers) or 3 (floating-point numbers). <code>SampleFormat==3</code> requires value of <code>BitsPerSample==32</code>.</li> </ul> <h3 id="checking-tags">Checking tags</h3> <p>File tags can be checked by external utilites.</p>