Page 1 of 1

smoothDist6(s)

Posted: 19 Jul 2010, 13:55
by tennant
Hi,

Not sure if this is a bug or not. The SDDS documentation says that the command is "smoothDist6s" but when you click on it for more details, it says it is "smoothDist6". Typing "smoothDist6" gives me an "command does not exist" error, while typing "smoothDist6s" gives me the attached message/error(?). When I try using the command on a file, I also get an error message about "unknown token: c_mks" (see attached). Is the problem on my end?

Thanks,
chris

Re: smoothDist6(s)

Posted: 19 Jul 2010, 14:11
by soliday
It looks like your RPN_DEFNS environment variable is not set correctly. If you type:
echo $RPN_DEFNS
do you get:
C:\WINDOWS\defns.rpn or something similar and does this file exist? It should be installed by the Elegant installation.

Also to test it try running:
$ rpn
Welcome to rpn version 6, by Michael Borland and Robert Soliday (June 1999).
rpn> pi
3.141592653589793

If this is the problem you can download the defns.rpn file from:
http://www.aps.anl.gov/asd/oag/downloads/defns.rpn

Re: smoothDist6(s)

Posted: 19 Jul 2010, 14:25
by tennant
Everything tests out okay:

"echo $RPN_DEFNS" gives C:\WINDOWS\defns.rpn
"$ rpn" gives Welcome to rpn version 6, by Michael Borland and Robert Soliday (June 1999).
"rpn> pi" gives 3.141592653589793

Re: smoothDist6(s)

Posted: 19 Jul 2010, 14:42
by michael_borland
Chris,

This is definitely an rpn definitions problem. I suspect it has to do with the environment that gets inherited by the smoothDist6s script. I'm never quite sure how this works (or if it works) on Windows machines.

--Michael

Re: smoothDist6(s)

Posted: 19 Jul 2010, 14:45
by soliday
One more thing before I dive into this further. The script is a Tcl script, are you using the tclsh from cygwin or from ActiveTcl? The cygwin version will not pass the RPN_DEFNS variable correctly and you will need the ActiveTcl version installed and the cygwin version uninstalled.

Refer to RPN error if this is the case.

Re: smoothDist6(s)

Posted: 19 Jul 2010, 17:01
by tennant
Yes, I am using cygwin. I will follow the steps from you previous post that addressed this problem. Thanks.

Re: smoothDist6(s)

Posted: 28 Jul 2010, 09:05
by tennant
I followed the directions from the previous post you recommended (uninstalled tcltk from cygwin, installed ActiveTcl, etc...) and when I type "smoothDist6s" I get the following error: "couldn't read file "/cygdrive/c/Program Files/APS/Elegant/smoothDist6s": no such file or directory". This seems like a worse error message than the original one I was getting. Any suggestions?

Re: smoothDist6(s)

Posted: 28 Jul 2010, 11:03
by soliday
I forgot about this. If you are using a full path name and not a relative path name then you will run into this problem. ActiveTcl does not understand the POSIX directory names from cygwin. What you can do is run cygpath with the -m option to convert the pathname to a version that will work with cygwin and ActiveTcl.

$ cygpath -m /cygdrive/c/Program\ Files/APS/Elegant/smoothDist6s
C:/Program Files/APS/Elegant/smoothDist6s

So to run the program you can type:
C:/Program\ Files/APS/Elegant/smoothDist6s on the cygwin terminal.

Re: smoothDist6(s)

Posted: 28 Jul 2010, 11:52
by tennant
Thanks, it seems to be working now!

Re: smoothDist6(s)

Posted: 30 Aug 2010, 12:34
by tennant
Okay, so I thought it was working... when I type in the command on cygwin I get the attached message. I also tried passing an input file and setting ripple and amplitude and I get almost the same message. Help please! Thanks.