;+ ; Specify a directory from which data will be read. Compare to ; filein, which identifies a single file as the input source. ; ;
When dirin is used, data can be retrieved from any of the ; SDFITS files in that dir without the need to issue a new filein command. ; ; @param file_name {in}{optional}{type=string} The directory name to ; use. If omitted, a file selector GUI will appear and you can select ; the directory to use. You must select a directory in that case. If ; the file_name isn't a directory, the underlying code will recognize ; that and it will be as if you had used ; filein instead. ; ; @uses sdfitsin ; ; @version $Id: dirin.pro,v 1.7 2005/05/25 13:05:52 jbraatz Exp $ ;- pro dirin, file_name, _EXTRA=ex if (!g.line) then begin new_io = sdfitsin(file_name,/directory,_EXTRA=ex) if (obj_valid(new_io)) then begin if (obj_valid(!g.lineio)) then obj_destroy, !g.lineio !g.lineio = new_io !g.line_filein_name = file_name endif endif else begin new_io = sdfitsin(file_name,/directory,/continuum,_EXTRA=ex) if (obj_valid(new_io)) then begin if (obj_valid(!g.contio)) then obj_destroy, !g.contio !g.contio = new_io !g.cont_filein_name = file_name endif endelse end