;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Name: ; writedata_.pro ; ; Purpose: ; This programs write a file as unformatted .dat adding a 6 longword header ; containing informations about the data itself. ; ; Author: ; Thomas Boerner ; Calling sequence: ; writedata, data, title = TITLE ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; pro writedata, data, title = TITLE path_open = 'd:\alberga\idl_sar\data\' ; Location of the file to be opened. datainfo = size(data) datainfosize = size(datainfo) datatype = datainfo(datainfo[0] + 1) if datatype eq 0 then begin print, 'Data type undefined ...' return endif file = dialog_pickfile(/write, path = path_open, filter='*.dat', title = TITLE) get_lun, lu openw, lu, file writeu, lu, datainfosize[1] writeu, lu, datainfo writeu, lu, data free_lun, lu return end