This module provides functionality to read the contents of files in the PTW file format and convert the raw data to source radiance or souorce temperature (provided that the instrument calibration data is available).
Functions are provided to read the binary Agema/Cedip/FLIR Inc PTW format into data structures for further processing.
The following functions are available to read PTW files:
readPTWHeader(ptwfilename)showHeader(header)getPTWFrame (header, frameindex)
readPTWHeader(ptwfilename) : Returns a class object defining all the header information in ptw file.
showHeader(header) : Returns nothing. Prints the PTW header content to the screen.
getPTWFrame (header, frameindex) : Return the raw DL levels of the frame defined by frameindex.
The authors wish to thank FLIR Advanced Thermal Solutions for the permission to publicly release our Python version of the ptw file reader. Please note that the copyright to the proprietary ptw file format remains the property of FLIR Inc.
This package was partly developed to provide additional material in support of students and readers of the book Electro-Optical System Analysis and Design: A Radiometry Perspective, Cornelius J. Willers, ISBN 9780819495693, SPIE Monograph Volume PM236, SPIE Press, 2013. http://spie.org/x648.html?product_id=2021423&origin_id=x646
Container to describe the calibration data of a Jade camera.
Write the calibration data file data to a string and return string.
Class to store the ptw file header information.
Given a ptw filename, read the header and return the header to caller
Utility function to print the PTW header information to stdout
Retrieve a single PTW frame, given the header and frame index
This routine also stores the data array as part of the header. This may change - not really needed to have both a return value and header stored value for the DL valueheader. This for a historical reason due to the way GetPTWFrameFromFile was written
Retrieve a number of PTW frames, given in a list of frameheader.
Iterate through string and terminate on first zero