"READ ME" File for ToTIF.EXE V1.3 --------------------------------- Written by: David J. Lane Observatory Technician/Systems Administrator Department of Astronomy and Physics Saint Mary's University Halifax, Nova Scotia Canada B3H 3C3 Phone: 902-420-5633 E-Mail: dlane@ap.stmarys.ca Archive: The most recent version of "ToTIF" is at http://apwww.stmarys.ca/dlane/tofits/totif.zip File Updated: December 2000 Requirements: "ToTIF" is a DOS protected mode program (DPMI) and requires a driver such as HIMEM.SYS to be loaded in order to access extended memory used for image buffer storage. A minimum of 2 megabytes of total memory is required. The two files "rtm.exe" and "dmpi16bi.ovl", distributed with "ToTIF", must be in the DOS execution PATH or in the same directory as "ToTIF". Status: ToTIF is copyrighted "freeware" and is freely distributable so long as it is not modified, includes this text file, and contains credit to the author and Saint Mary's University. Note: Also available is "ToFITS", an SBIG to FITS convertor program. INTRODUCTION ------------ ToTIF.EXE is an MS-DOS-based program which "batch" converts Santa Barbara Instrument Group (SBIG) Type 3 CCD image files into TIFF format files, a tag-based image file format developed by Aldus Corp and Microsoft Corp. Files can originate from the ST-4X, ST-5, ST-6, ST-7, and ST-8 (and perhaps other models) CCD cameras. COMMAND LINE ------------ TOTIF [-n] input_file_wildcard [output_directory] The "input_file_wildcard" should match the file(s) which are to be converted. The file extension must be specified -- no extension is assumed. A drive and/or directory can also be included. Examples include: *.st6 - all ".st6" files in the current directory c:\ccd\images\sao1*.st6 - all "sao1*.st6" files in the directory "c:\ccd\images" bias???.st6 - all "bias???" (eg. bias001) files in the current directory c:\ccd\data0918\flatr* - all "flatr*" files in directory "c:\ccd\data0918" The optional "-n" parameter causes negative images to be produced. This must be the first parameter. The "output_directory" is optional. If none is specified, the output files are written to the current directory. A drive letter can be included. The trailing '\' is not necessary unless you are specifying the root directory. Examples include: a:\ - root directory on drive a: . - the current directory c:\ccd\data0918 \fitfiles DETAILS ------- Files are converted in a batch mode. The program searches the directory with the "input_file_wildcard" specified to determine the specific files which will be converted. Each file is then read in sequence and written to the "output_directory" specified (the current directory is used, if it is unspecified). The "output_directory" must previously exist. The file name written is the same as the input file except with the extension ".TIF". If two input files have the same file name (first 8 letters) but with different extensions, be aware that the second output file will over-write the first output file. Note that both "compressed" and "uncompressed" Type 3 files are supported. There is extensive error checking which will reject non SBIG Type 3 files without aborting the batch process. To abort the batch, press the key -- the program will exit to DOS after the current file is processed. An example program output is shown below from the command line: C:\ST6>totif c:\ccd\data0817\*. --- program output starts --- ToTIF V1.2 (07MAR/96) An SBIG (Type 3) CCD Image File to TIF File Converter Program Written by: David J. Lane, Astronomy and Physics Saint Mary's University, Halifax, Canada E-mail: dlane@hercules.stmarys.ca STATUS: 22 file(s) to convert. STATUS: Reading "C:\CCD\DATA0817\DARK240" ... Writing ".\DARK240.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\DARK120" ... Writing ".\DARK120.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\DARK30" ... Writing ".\DARK30.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\M51" ... Writing ".\M51.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\M51" ... Writing ".\M51.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6223" ... Writing ".\N6223.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6247" ... Writing ".\N6247.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6306-07" ... Writing ".\N6306-07.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6310" ... Writing ".\N6310.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6340" ... Writing ".\N6340.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6434" ... Writing ".\N6434.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6503" ... Writing ".\N6503.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6508" ... Writing ".\N6508.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6538" ... Writing ".\N6538.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6598" ... Writing ".\N6598.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6622-21" ... Writing ".\N6622-21.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6643" ... Writing ".\N6643.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6654" ... Writing ".\N6654.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\N6690" ... Writing ".\N6690.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\SU6" ... Writing ".\SU6.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\SU7" ... Writing ".\SU7.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\U10736" ... Writing ".\U10736.TIF" ... Done STATUS: Reading "C:\CCD\DATA0817\BIAS" ... Writing ".\BIAS.TIF" ... Done Returning to DOS. --- program output ends --- THE TIFF OUTPUT FILES --------------------- To the best of my knowledge, the output files fully conform to the TIFF V5.0 Standard (August 8, 1988). The data portion of the TIFF files are written as uncompressed 8-bit grayscale image data. Since the SBIG image file allows for 65536 shades of gray, the data is compressed into the maximum 256 shades of gray allowed in a TIFF file. The two parameters, "background" and "range", contained in the SBIG file are used to shift and scale the data. First, the "background" is subtracted from the image, then the image is scaled into the values 0 to 255 using the "range" value. These parameters are set in the "Display -> Image..." function of the CCD-OPS software, either automatically or manually. It is recommended that these values be adjusted as desired before saving the SBIG file. The scale parameters incorporated into the TIFF file are encoded as 108.7 pixels/inch in "X" and 92.6 pixels/inch in "Y", closely matching the pixel aspect ratio of the ST-6 and ST-4X cameras. There will be a slight error for users with the ST-5 camera, which has square pixels. Incorporated into the TIFF file header are several text items. These are: DocumentName -- set to the input SBIG file name Make -- always "SBIG" Model -- set to the camera type Software -- identifies "ToTIF", its version number, and author DateTime -- the date and time of the image TIFF files written by ToTIF have been successfully read into several word processors and image display programs including Paint Shop Pro and Microsoft Word for Windows 6.0. If you would like to suggest changes or additions to this program, please contact the author. I may also release the source code to those interested in creating a custom version (it is written in Borland Pascal). David J. Lane, Author E-mail: dlane@ap.stmarys.ca