| Re: Ascii-import [message #32032 is a reply to message #32031] |
Tue, 10 September 2002 04:34   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Thomas Jordi wrote:
> it may sound dumb but i have problems importing ascii.
> The file I want to import looks like this
>
> /path/filename.file
> /path/filename.file
> ...
>
> when using the toolbar button, I get the desired input, a struct
> containg a field with as much strings as lines in the file.
> But i like to use the ascii_read function, and this just doesnt work.
> Well, it does work with a template, but then again I'm using this
> graphical interface which I dont want to use.
>
> There isn't a keyword in the read_ascii function, to say only on record
> per row, each row is a recrod, at least I dont find it. Perhaps it has
> something to do with the fact, that I want to import strings and not
> integers.
>
> any help would be appreciated
>
> tschordi
Dear Thomas,
you can try my read_data_file function.
This function determines itselfs data files.
In this version it's able to read all tabulars where data columns are
numbers. If you have strings in your columns I can sent the new version
to you. It separates itselfs header comments before the tabular and past
the tabular. The type is set to double by default. If you like to have
float you can use the /floyt keyword. If you like to see an assistant
program you can use /assist. More is described in the routine.
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/read_data_file.tar.gz
or as IDL 5.5 binary
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/read_data_file.sav
x=read_data_file('/path/filename.file')
The result is a structure
help,x,/str
For further routines and licensing please have a look at
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
regards
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
|
|
|
|