comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Help from UNIX IDL 7.1 Users
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Help from UNIX IDL 7.1 Users [message #67630] Thu, 20 August 2009 10:12
Bruce Bowler is currently offline  Bruce Bowler
Messages: 128
Registered: September 1998
Senior Member
On Wed, 19 Aug 2009 11:25:22 -0600, David Fanning wrote:

> P.S. Can you check the test case above in IDL 7.1 and let me know what
> you see? It will probably help with my report to ITTVIS. You will
> probably have to substitute your own directories for mine.

I'm sure coyote noticed this, but file_search has an option to
/expand_tilde.

Perhaps that could be used in some manor or fashion to solve the problem
"graciously" (like beating ITTVIS over the head :-)

Bruce
Re: Help from UNIX IDL 7.1 Users [message #67639 is a reply to message #67630] Thu, 20 August 2009 08:35 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mike writes:

> Maybe - plus I'm used to oddities in the unix/linux and unused to the
> idea that a software company might actually act on bug reports.

Well, given the amount of effort I had to go to
to even convince anyone there might be a *problem*,
let alone a bug, I wouldn't put too much hope in
a rapid solution. (Shouldn't technical support people
be *required* to read the e-mails we send them!)

> Either way, you inspire me to heights of idealism and usefulness in
> the world. :-)

We all need more hope. Lord knows there is a deficiency
in the world!

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Help from UNIX IDL 7.1 Users [message #67641 is a reply to message #67639] Thu, 20 August 2009 07:23 Go to previous message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
On Aug 19, 1:25 pm, David Fanning <n...@dfanning.com> wrote:

> Well, you are probably younger than I am. :-)

Maybe - plus I'm used to oddities in the unix/linux and unused to the
idea that a software company might actually act on bug reports.

Either way, you inspire me to heights of idealism and usefulness in
the world. :-)

> P.S. Can you check the test case above in IDL 7.1 and let me
> know what you see? It will probably help with my report to
> ITTVIS. You will probably have to substitute your own
> directories for mine.


Except for the inexplicable expansion to my username, instead of
yours, I saw the same result:

IDL> dir = '~/IDL/coyote'
IDL> file = 'fsc_surface.pro'
IDL> Print, Dialog_Pickfile(FILE=file, PATH=dir)
/home/mmiller3/IDL/coyote/~/IDL/coyote/fsc_surface.pro


Interesting that we both have ~/IDL/coyote directories ;-)

Mike


IDL> help, !version, /structure
** Structure !VERSION, 8 tags, length=76, data length=76:
ARCH STRING 'x86'
OS STRING 'linux'
OS_FAMILY STRING 'unix'
OS_NAME STRING 'linux'
RELEASE STRING '7.1'
BUILD_DATE STRING 'Apr 21 2009'
MEMORY_BITS INT 32
FILE_OFFSET_BITS
INT 64
Re: Help from UNIX IDL 7.1 Users [message #67648 is a reply to message #67641] Wed, 19 August 2009 12:35 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 19, 2:25 pm, David Fanning <n...@dfanning.com> wrote:
> Well, that is interesting. My test case was actually different from
> the case I wrote in the article. My test case was this:
>
>    IDL> dir = '~/IDL/coyote'
>    IDL> file = 'fsc_surface.pro'
>    IDL> Print, Dialog_Pickfile(FILE=file, PATH=dir)
>         /home/fanning/IDL/coyote/~/IDL/coyote/fsc_suface.pro
>
> Which is obviously wrong. So maybe it is just a bug in
> how wildcards are handled. Anyway, it sure looks and feels
> like a bug to me. :-)
>
> Cheers,
>
> David
>
> P.S. Can you check the test case above in IDL 7.1 and let me
> know what you see? It will probably help with my report to
> ITTVIS. You will probably have to substitute your own
> directories for mine.
>

Indeed, it messes up the result when there is a wildcard in the path:

IDL> dir='~/idl'
IDL> file='readcube.pro'
IDL> print,dialog_pickfile(file=file,path=dir)
/home/penteado/idl/~/idl/readcube.pro

When I tested it before I had used an absolute path, and that was
returned correctly:

IDL> dir='/home/penteado/idl'
IDL> print,dialog_pickfile(file=file,path=dir)
/home/penteado/idl/readcube.pro

But it also messes it up with a relative path:

IDL> cd,'/home/penteado'
IDL> dir='idl'
IDL> print,dialog_pickfile(file=file,path=dir)
/home/penteado/idl/idl/readcube.pro

Though with other flavours of relative paths the results are ugly-
looking but valid:

IDL> dir='./idl'
IDL> print,dialog_pickfile(file=file,path=dir)
/home/penteado/./idl/readcube.pro

IDL> dir='../penteado/idl'
IDL> print,dialog_pickfile(file=file,path=dir)
/home/penteado/../penteado/idl/readcube.pro
Re: Help from UNIX IDL 7.1 Users [message #67651 is a reply to message #67648] Wed, 19 August 2009 10:25 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mike writes:

> I think that the include-the-path-in-the-Selection-box behavior has
> been there for a long time - at least since 5.4. I've always treated
> it as an annoying platform-dependence rather than a bug.

Well, you are probably younger than I am. :-)

> I tried your example on 5.4, 6.3, 7.0 and 7.1
>
> theDirectory = '/disks/arctic6_raid/fanning/june_2007_162/mod09/'
> theFile = 'channel_4_mosaic.png'
> selectedFile = Dialog_Pickfile(FILE=theFile, PATH=theDirectory)
>
>
> The dialogs look like this:
>
> http://mypage.iu.edu/~mmiller3/IDL/dialog_pickfile-5.4.png
>
> http://mypage.iu.edu/~mmiller3/IDL/dialog_pickfile-6.3.png
>
> http://mypage.iu.edu/~mmiller3/IDL/dialog_pickfile-7.0.png
>
> http://mypage.iu.edu/~mmiller3/IDL/dialog_pickfile-7.1.png
>
>
> and the return value for your example is '/disks/arctic6_raid/fanning/
> june_2007_162/mod09/channel_4_mosaic.png' with IDL 5.4, 6.3, 7.0, 7.1:

Well, that is interesting. My test case was actually different from
the case I wrote in the article. My test case was this:

IDL> dir = '~/IDL/coyote'
IDL> file = 'fsc_surface.pro'
IDL> Print, Dialog_Pickfile(FILE=file, PATH=dir)
/home/fanning/IDL/coyote/~/IDL/coyote/fsc_suface.pro

Which is obviously wrong. So maybe it is just a bug in
how wildcards are handled. Anyway, it sure looks and feels
like a bug to me. :-)

Cheers,

David

P.S. Can you check the test case above in IDL 7.1 and let me
know what you see? It will probably help with my report to
ITTVIS. You will probably have to substitute your own
directories for mine.



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Help from UNIX IDL 7.1 Users [message #67652 is a reply to message #67651] Wed, 19 August 2009 09:56 Go to previous message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
On Aug 18, 7:17 pm, David Fanning <n...@dfanning.com> wrote:

> I am interested in what is in the Selection box,
> and what is returned.

Hi David,

I think that the include-the-path-in-the-Selection-box behavior has
been there for a long time - at least since 5.4. I've always treated
it as an annoying platform-dependence rather than a bug.

I tried your example on 5.4, 6.3, 7.0 and 7.1

theDirectory = '/disks/arctic6_raid/fanning/june_2007_162/mod09/'
theFile = 'channel_4_mosaic.png'
selectedFile = Dialog_Pickfile(FILE=theFile, PATH=theDirectory)


The dialogs look like this:

http://mypage.iu.edu/~mmiller3/IDL/dialog_pickfile-5.4.png

http://mypage.iu.edu/~mmiller3/IDL/dialog_pickfile-6.3.png

http://mypage.iu.edu/~mmiller3/IDL/dialog_pickfile-7.0.png

http://mypage.iu.edu/~mmiller3/IDL/dialog_pickfile-7.1.png


and the return value for your example is '/disks/arctic6_raid/fanning/
june_2007_162/mod09/channel_4_mosaic.png' with IDL 5.4, 6.3, 7.0, 7.1:


IDL> help, !version, /structure
** Structure !VERSION, 7 tags, length=44:
ARCH STRING 'x86'
OS STRING 'linux'
OS_FAMILY STRING 'unix'
RELEASE STRING '5.4'
BUILD_DATE STRING 'Sep 25 2000'
MEMORY_BITS INT 32
FILE_OFFSET_BITS


IDL> help, !version, /structure
** Structure !VERSION, 8 tags, length=104, data length=100:
ARCH STRING 'x86_64'
OS STRING 'linux'
OS_FAMILY STRING 'unix'
OS_NAME STRING 'linux'
RELEASE STRING '6.3'
BUILD_DATE STRING 'Mar 23 2006'
MEMORY_BITS INT 64
FILE_OFFSET_BITS
INT 64

IDL> help, !version, /structure
** Structure !VERSION, 8 tags, length=76, data length=76:
ARCH STRING 'x86'
OS STRING 'linux'
OS_FAMILY STRING 'unix'
OS_NAME STRING 'linux'
RELEASE STRING '7.0'
BUILD_DATE STRING 'Oct 25 2007'
MEMORY_BITS INT 32
FILE_OFFSET_BITS
INT 64
IDL> help, !version, /structure
** Structure !VERSION, 8 tags, length=76, data length=76:
ARCH STRING 'x86'
OS STRING 'linux'
OS_FAMILY STRING 'unix'
OS_NAME STRING 'linux'
RELEASE STRING '7.1'
BUILD_DATE STRING 'Apr 21 2009'
MEMORY_BITS INT 32
FILE_OFFSET_BITS
INT 64


Mike
Re: Help from UNIX IDL 7.1 Users [message #67656 is a reply to message #67652] Tue, 18 August 2009 19:26 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 18, 8:17 pm, David Fanning <n...@dfanning.com> wrote:
> Folks,
>
> I am looking for someone running a UNIX version of
> IDL 7.1 to confirm that the problem described in
> this article dealing with Dialog_Pickfile has
> been fixed.
>
>   http://www.dfanning.com/fileio_tips/unixpickfile.html
>
> Specifically, if you specify both a file name and
> a path when you call Dialog_Pickfile, and then do
> nothing else except hit the Accept button, the file name
> that is returned has two paths appended to it and is
> bogus.
>
> I am interested in what is in the Selection box,
> and what is returned.

In IDL 7.1 in Linux, I see the path with the file appended to it in
the selection box, and the return value when I just accept it is
correct.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: [IDL 6.2 with ENVI 4.2] is-it possible to extract multiple profiles on multiple images from shape files
Next Topic: Re: is-it possible to extract multiple profiles on multiple images from shape files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:29:15 PDT 2025

Total time taken to generate the page: 0.01210 seconds