Page 1 of 2

processHistograms

Posted: 12 Jun 2018, 03:26
by Aamna_Khan
Hi,

I am using the processHistogram script from froum by M.Borland. For usage there is a proper name format for histogram file, I did the same still there is an error ....

working on linac-1MP-10um-2p2A-1024B-0F-1LSC.hf
invalid command name "os"
while executing
"os editstring 2Z-S/um/100d $file"
("foreach" body line 22)
invoked from within
"foreach file [glob $filter] {
# We expect the rootname to have the experimental parameters encoded in it:
# linac-<n>MP-<m>um-<x>p<y>A-<b>B-<f..."
(file "/home/aamna/bin/processHistograms" line 26)

am I missing something here? I have attached the files. I would really appreciate any help.

Thank you.
Aamna

Re: processHistograms

Posted: 12 Jun 2018, 08:18
by michael_borland
Aamna,

It appears to be an installation problem. Unfortunately, the expert is a way for a few days, but will respond later this week.

--Michael

Re: processHistograms

Posted: 13 Jun 2018, 03:17
by Aamna_Khan
Thank you.

Aamna

Re: processHistograms

Posted: 13 Jun 2018, 12:29
by soliday
What operating system are you running on?
Install the OAG Tcl/Tk interpreter if you haven't already.
https://www.aps.anl.gov/Accelerator-Ope ... ,%20Tcl/Tk
You can test if the os extension is available in oagtclsh by running:

oagtclsh
package require os

If you setup a symbolic link on Linux so that oagtclsh points to /usr/bin/tclsh then you will have to remove that.

Re: processHistograms

Posted: 14 Jun 2018, 04:25
by Aamna_Khan
I'm using Ubuntu 16.04.3. Oagtclsh is already there but when I typed oagtclsh
oagtclsh: command not found
Sorry, but I didn't get your symbolic link point.

Aamna

Re: processHistograms

Posted: 15 Jun 2018, 13:09
by soliday
I found an issue with the last release of the OAGTclTk RPM for Linux. I have posted new versions today that fix the problem.

So for Ubuntu 16.04.3 you will need to download https://ops.aps.anl.gov/downloads/OAGTc ... x86_64.rpm
You then install it with the command:
sudo alien -i OAGTclTk-1.25-2.ubuntu.16.04.x86_64.rpm

You can verify that it installed correctly by running:
oagtclsh
package require os

Re: processHistograms

Posted: 18 Jun 2018, 04:23
by Aamna_Khan
Hi,

Sorry for late reply. I installed the latest version of oagtclsh provided by you in the link. After typing oagtclsh still it shows me oagtclsh is not found.

It was working fine before that....I have worked with another scripts using oagtclsh and may be I messed up something and not able to figure out.

tclsh and oagtclsh are there in /usr/bin.

Aamna

Re: processHistograms

Posted: 18 Jun 2018, 09:27
by soliday
tclsh has to be installed before you install OAGTclTk. Since you now have tclsh installed, try reinstalling OAGTclTk. You may have to manually delete /usr/bin/oagtclsh and /usr/bin/oagwish first.

Re: processHistograms

Posted: 18 Jun 2018, 09:27
by soliday
You also need the tk package installed first.

Re: processHistograms

Posted: 18 Jun 2018, 10:41
by Aamna_Khan
I delteted everything and re-installed. Still same thing.

Problem is tclsh is there but still it shows:
The program 'tclsh' is currently not installed. You can install it by typing:
sudo apt install tcl

maybe something wrong with tcl installation...