Documentation of the BYU-MERS "SIR" file format (c) 1999, 2014, 2019, 2022 BYU MERS The BYU-MERS "SIR" image file format was developed by the Brigham Young University (BYU) Microwave Earth Remote Sensing (MERS) research group in the 1990's to store scatterometer images of the earth along with the information required to earth-locate the image pixels, followed by a list of pixels values. The end of the file is padded with zeros to make its length an integer multiple of 512 bytes. A "sir" file consists of one or more 512 byte headers containing all the information required read the remainder of the file and the map projection information required to map pixels to lat/lon on the Earth surface. Pixel values are stored as 2-byte (high order byte first) integers though the values can optionally be stored as bytes or IEEE floating point. The latter is not portable to all machines. Scale factors to convert the integer or byte pixel values to native floating point units are stored in the file header. The header record id described in the file sir_header.txt The origin of the image is in the lower left corner. Pixel indexes run from 1 to N. Pixel (1,1) is in the lower left of the image. The Lat,Lon of a pixel corresponds to the lower left corner of the pixel The size of image is stored as the first two 2-byte integers in the header (NSX,NSY). The 1-based address of the Nth pixel is X=1+mod(N,NSX) Y=1+floor(N/NSX) where N=Y+(X-1)*NSX. Value of word (2-byte integer) 48 indicates of header record the data storage type. If its value is 1 the image data is stored as bytes (minv=128). If its value is 2 the image data is 2 byte integers (minv=32766). If its value is 4 the image data is store as floating point and needs no scaling. If the data is scaled, the conversion from integer to floating point values is given by float value = float(2-byte_integer_data_value+minv)/float(iscale)+ioff where iscale=header(11) and ioff=word(10). The standard sir format supports a variety of image projections including: 0. Rectangular array (no projection) 1. Rectangular lat/lon array 2. Two different types of Lambert equal-area projections which can be use in both non-polar and polar projections 3. Polar stereographic projections 4. EASE grid polar and global projections with various resolutions 5. EASE2 grid polar and global projection at various resolutions In may cases *.sir image data files have been generated using the scatterometer image reconstruction (SIR) resolution enhancement algorithm or one of its variants (rSIR) for radiometer processing. The images are then of normalized radar cross-section (typically in dB -32 to 0 dB) or radiometric brightness temperature (typically -160 to 290 K). Ancillary or other information can also be stored. The multivariate SIR algorithm is a non-linear resolution enhancement algorithm based on modified algebraic reconstruction and maximum entropy techniques. The algorithm is first described in Long, D.G., P.J. Hardin, and P.T. Whiting, "Resolution Enhancement of Spaceborne Scatterometer Data," IEEE Trans. Geoscience Remote Sens., Vol. 31, No. 3, pp. 700-715, doi:10.1109/36.225536, May 1993 with the theory covered in Early, D.S., and D.G. Long, "Image Reconstruction and Enhanced Resolution Imaging from Irregular Samples," IEEE Transactions on Geoscience and Remote Sensing, Vol. 39, No. 2, pp. 291-302, doi:10.1109/36.905237, 2001 Long, D.G., "Comparison of SeaWinds Backscatter Imaging Algorithms," IEEE Journal of Selected Topics in Applied Earth Observations, Vol. 10, No. 3, pp. 2214-2231, doi:10.1109/JSTARS.2016.2626966, 2017 and compared to the Backus-Gilbert method in Long, D.G., "Scatterometer Backscatter Imaging Using Backus-Gilbert Inversion," IEEE Transactions on Geoscience and Remote Sensing, Vol. 57, No. 6, pp. 3179-3190, doi:10.1109/TGRS.2018.2882136, 2019. The single variate (the one used radiometers known as rSIR) form of SIR is introduced in Long, D.G., and D.L. Daum, "Spatial Resolution Enhancement of SSM/I Data," IEEE Transactions on Geoscience and Remote Sensing, Vol. 36, No. 2, pp. 407-417, doi:10.1109/36.662726, Mar. 1998 optimized in Long, D.G., and M.J. Brodzik, "Optimum Image Formation for Spaceborne Microwave Radiometer Products," IEEE Transactions on Geoscience and Remote Sensing, Vol. 54, No. 5, pp. 2763-2779, doi:10.1109/TGRS.2015.2505677, 2016. and further analyzed in D.G. Long, M.J. Brodzik, and M. Hardman, "Enhanced Resolution SMAP Brightness Temperature Image Products," IEEE Transactions on Geoscience and Remote Sensing, Vol. 57. No. 7, pp. 4151-4163, doi:10.1109/TGRS.2018.2889427, 2019. For scatterometers, the multivariate form of the SIR algorithm models the dependence of sigma-0 on incidence angle as sigma-0 (in dB) = A + B * (Inc Ang - 40 deg) over the incidence angle range of 15 to 60 deg. The output of the SIR algorithm is images of the A and B coefficients. A represents the "incidence angle normalized sigma-0" (effectively the sigma-0 value at 40 deg incidence angle). The units of A are dB. Typically, +2 < A < -45 dB. However, A is clipped to a minimum -32 dB. Values of A < -32 are used to indicate no data as well The B coefficient describes the incidence angle dependence of sigma-0 an has the units of dB/deg. At Ku-band global average of B is approximately -0.13 dB/deg. Typically, -0.2 < B < -0.1. B is clipped to a minimum value of -3 dB/deg. This value is used to denote no data as well. Single variable SIR or SIRF algorithms are used for radiometers and rotating pencil beam scatterometers (e.g., SeaWinds) to produce only an A (the brightness temperature or backscatter) image. Be sure to use binary ftp to transfer *.sir files! Subdirectories: c/ Code to read & write sir files using C, including map projection code. Utilities to convert SIR images to other file types (e.g., tiff, gif) cpp/ Code to read & write sir files using C++. f/ Code to read & write sir files using fortran77, including map projection code. Utilities to SIR images to other file types (e.g., tiff, gif) f90/ Code to read & write sir files using fortran90, including map projection code. idl/ Code to load sir file images into IDL or PVWAVE, save to file and do forward/inverse transforms in IDL. see idl/readme.txt for information. matlab/ Code to load sir fileimages into matlab, save file, and to do forward/inverse transforms in matlab. Also includes some display routines. see matlab/readme.txt for information. py/ Code to read & write SIR files in python, including map projection code. sir_util/ C code to conver SIR files into other file formats Note: This code may be copied and modified so long as (1) original or modified code is not redistributed for profit and (2) acknowledgement is made that the original code was obtained courtesy of David G. Long at the Microwave Earth Remote Sensing Laboratory at Brigham Young University, Provo, UT. ============================================================================== Dr. David G. Long long@ee.byu.edu Professor voice: (801) 422-4383 Electrical and Computer Engineering Department fax: (801) 422-0201 450 Engineering Building, Brigham Young University, Provo, Utah 84602 ============================================================================== Last revised: 08 Oct 2022 DGL