Markwardt IDL Page

What's New

Programs
   Curve Fitting
   Fitting Tutorial
   Introspection
   Save Files
   Array/Set
   Printing
   Graphics
   Mathematics
   Ephemeris/Timing
   Input/Output
   Miscellaneous
   Full Listing
   Documentation

Google

Markwardt IDL Pages
Entire Web

Craig's techie blog.

Home Page of Craig Markwardt



 


IDL Input / Output





PRINTLOG - Captures a transcript of console output

PRINTLOG captures and archives a copy of any output sent to the console. PRINTLOG is used exactly like PRINT and sends its output to the screen as expected. However, it additionally saves a verbatim copy of the output. This can be especially useful if an independent session log is needed (like JOURNAL), or if a strict transaction history is required. In order to use this procedure, you must change your code to use PRINTLOG instead of PRINT, and maintain a string variable which holds the log.

Nov 23 20036 kb printlog.pro  

TRANSREAD - Read ASCII tables quickly and with ease

TRANSREAD parses an ASCII table into IDL variables, one variable for each column in the table. The tabular data is not limited to numerical values, and can be processed with an IDL FORMAT expression.

TRANSREAD behaves similarly to READF/READS in that it transfers ASCII input data into IDL variables. The difference is that TRANSREAD reads more than one row in one pass, and returns data by column. In a sense, it forms the transpose of the typical output from READF or READS (which returns data by row), hence the name TRANSREAD.

Feature highlights include:

  • FORMAT expression is optionally accepted.
  • Comment lines can optionally be recognized and ignored.
  • Standalone operation. No other IDL procedures are needed.
  • Input is either a file unit or a string array.
  • Start and Stop "Cue" Phrases can be used to begin and end the parsing operation.
  • Extensive documentation is included in the header of TRANSREAD.PRO itself.
Mar 25 200117 kb transread.pro  

PATHUTILS - Form relative and normalized file path names

The routines RELPATH and NORMPATH are used to construct relative and normalized file system path names. RELPATH constructs a relative path between two files or directories. For example, the relative path from /path/to/directory/one to /path/to/file/two is ../../file/two.

NORMPATH normalizes a path so that the shortest possible path is returned, and relative path components are removed if possible. For example, the path /path/to/directory/one/../file/two can be normalized to /path/to/file/two. If an absolute path is not possible, then the shortest relative path is returned.

Both routines should be system independent, but have been tested on Unix.

Mar 29 20083 kb normpath.pro  
Mar 29 20085 kb relpath.pro  

FXGPKG - Read and seek on pipes like normal files (Unix)

This is an embryonic library of routines which will read, write, and seek on arbitrary Unix streams such as pipes and URLs. The most important thing is the seek capability, which allows you to address any point in the stream with random access rather than sequential access.

At present, only Unix pipes are accessible. Eventually it is desired to be able to read from generic URLs and shared memory using third party such as CURL. The current implementation is to store the contents of the Unix pipe in a temporary cache file. Unfortunately, the input/output is limited to unformatted binary content.

All of the routines are required, and you may wish to download the entire archive in one file as either a gzip'ed tar file or zip file.

The routines are internally documented, but you should probably start with FXGOPEN.PRO.

Sep 06 200714 kb fxgpkg.tar.gzTar Archive  
Sep 06 200725 kb fxgpkg.zipZip Archive  
Sep 06 200712 kb fxgopen.pro  
Sep 06 20072 kb fxgclose.pro  
Sep 06 20073 kb fxgread.pro  
Sep 06 20073 kb fxgseek.pro  
Sep 06 20072 kb fxgwrite.pro  
Sep 06 20072 kb fxgfiltered.pro  
Sep 06 20073 kb fxfilter.pro  
Sep 06 20075 kb fxmakemap.pro  
Sep 06 20074 kb fxpbuffr.pro  
Sep 06 20071 kb fxpclose.pro  
Sep 06 20071 kb fxpcommn.pro  
Sep 06 20077 kb fxpopenr.pro  
Mar 25 20012 kb fxpread.pro  
Mar 25 20011 kb fxpseek.pro  


Copyright © 1997-2004 Craig B. Markwardt
Last Modified on 2008-03-29 14:20:16 by Craig Markwardt