strsplit function in 0.9rc4_1?
Status: Beta
Brought to you by:
m_schellens
I was trying out GDL (the Macports install, version 0.9rc4_1) using a program la_cosmic.pro (linked from http://www.astro.yale.edu/dokkum/lacosmic/download.html\)
It has two problems in GDL. The first is the function filefind. This is easily replaced with the flle_search function. The second is the function strsplit. It is called in the line:
troot = strsplit(imlist[i],".fits",/extract,/regex)
where imlist[i] is a list of file names.
but GDL fails with the message:
Function not found: STRSPLIT
Is this a bug in GDL or should I file it as a feature request?
(GDL seems to have come quite a long way in the past 6 months)
DN
Hello David,
STRSPLIT and FINDFILE are both implemented.
The needed files (strsplit.pro and findfile.pro) are both installed by default in
${prefix}/share/gnudatalanguage/lib (also by Macports).
GDL searches these paths by default unless any of the GDL_PATH or IDL_PATH env. vars are set.
Please check if your GDL_PATH env. var does not point to some other directory?
Hope that helps,
Sylwester
I notice that strsplit.pro is present in the (Macports) folder:
/opt/local/var/macports/software/gnudatalanguage/0.9rc4_1/opt/local/share/gnudatalanguage/lib/
and also in
/opt/local/share/gnudatalanguage/lib/
and in the Macport build folders.
so it appears GDL is not finding it. A Macports bug perhaps? Or a PATH problem?
OK, thanks Sylwester. The problem was indeed the GDL_PATH. Now it works perfectly!
DN