Thursday, July 31, 2014

vGate 3.0 ROOT issues

First there were some issues with not being to type quotes inside vGate. Fixed that by going to Ubuntu's System Settings -- Keyboard -- Layout Settings, adding English US there and removing the English US extended international layout.

But ROOT on vGate 3.0 seems to be broken. Screenshot below. libjpeg.so.62 is not found in this case. Trying TBrowser b; also causes "segmentation violation" with some xpm files not found and so on.


Wednesday, July 30, 2014

ROOT font issue

On a fresh install of ROOT with Ubuntu Software Center on Ubuntu 14.04, this error on starting root

Couldn't find font "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1",
trying "fixed". Please fix your system so helvetica can be found,
this font typically is in the rpm (or pkg equivalent) package
XFree86-[75,100]dpi-fonts or fonts-xorg-[75,100]dpi.


ROOT continues to run without problems. This issue is mentioned in this discussion, but xfs is not an available package for Ubuntu 14.04. Ignoring for now.

root -l doesn't bring up this error, nor the splash screen. Perhaps this font is used in the splash screen.

rough draft of output with Octave

Imported the ascii file output by the modified GEANT4 example I'm working with into a google spreadsheet. Manually sorted it by PMTNumber, manually added 0 photon counts for the missing PMTNumbers, exported the resulting photon counts into Octave as:

data = load ("Run-PMTHitOrder-PhotonCount-PMTNumber.csv")
for i = 1:8
  for j = 1:8
  matrixed_data(i,j)=data((i-1)*8+j,3);
  endfor

endfor
  my_bar3(matrixed_data)


plotted it using this octave version of bar3:


Tuesday, July 29, 2014

G4BestUnit

In order to check if the GetPMTPos() is working in the modified GEANT4 example I'm working with but returning 0,0,0 due to some units problem, tried to include G4BestUnit in the cout. As an example, LXeSteppingVerbose.cc has
std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")

For this to work, the include file needed is
#include "G4UnitsTable.hh"

But even with this, GetPMTPos() returns zeros - units set to femto-metres! So, we have to work with GetPMTNumber() instead, since that is working fine. 

Sunday, July 27, 2014

using vGATE 3.0 - a virtual machine with GATE, GEANT4, ROOT

vGATE is a virtualbox virtual machine image of Ubuntu 64 bit running GATE and associated tools. Tried it out. Running it on an Ubuntu 13.10 host, would not boot with the default virtualbox settings. On Windows XP, virtualbox was very flakey. The virtualbox control panel would come up only right after an install if "Run virtualbox" was ticked in the last step of the Install wizard. At other times, it would silently fail to start - the process would be seen in task manager for a few seconds before it vanished. Running the virtualbox image directly after a first run, by double-clicking (on Windows XP)

C:\Documents and Settings\Username\VirtualBox VMs\VGATE3VM\VGATE3VM.vbox

would work sometimes, and not work sometimes. Flakey. Also to be noted, the various issues of running Ubuntu with a non-3D-accelerated VM display - becomes very slow.

So I converted the virtualbox image to a VMWare image using the tool supplied with virtualbox,
C:\Full-path-to\VBoxManage clonehd --format VMDK vGATE_v3.0.vdi vGATE_v3.0.vmdk
The process took around half an hour for the 7 GB file on an external USB hard disk.

Running on VMWare Player was much more stable - at least for me on a WinXP host. Enabled 3D acceleration before starting the VM, of course.

Speeds - using a VM with 1.2 G ram, 1 processor,

SPECT benchmark - each acquisition of 37.5 sec was taking around 2 minutes to run.

Running the LXe example of GEANT4, from command-line the virtual machine was not too much slower than the bare-metal Ubuntu install. But with graphical display, was 3x slower.

VM - ./LXe LXe.in

Run Summary
  Number of events processed : 3
  User=0.92s Real=1.17s Sys=0.09s

Ubuntu 13.10 bare metal - ./LXe LXe.in

Run Summary
  Number of events processed : 3
  User=1.05s Real=1.06s Sys=0s

Using GUI, running .LXe and then running the macro with /control/execute LXe.in inside the LXe application, 
VM on VMWarePlayer, WinXP Host - 

Run Summary
Number of events processed : 3
User=1s Real=6.7s Sys=1.57s

Ubuntu 13.10 bare metal - 

Run Summary
Number of events processed : 3
User=1.44s Real=2.11s Sys=0.07s


Some notes on the modified version of Geant4 LXe example

Some graduate students have worked on modifying the LXe example supplied with the geant4 package, here are my notes on understanding and troubleshooting the modifications.


  • cout needs << endl ; at the end, for flushing the buffer, especially when called inside a loop
  • "Find in Files" from commandline -
      grep "string to search for" /path/to/directory -R -n
  • the G4cout statements in the LXe example have an if statement before them, so the macro statement /LXe/eventVerbose 1 should be called if those are to be executed. 
  • the supplied macros in LXe example also have errors -
    COMMAND NOT FOUND
-  this is due to the modification noted in the Changes file, in 2013, November 22, 2013 P. Gumplinger (LXe-V09-06-12) - replace Update method and commands with ReinitializeGeometry. So we should just comment out the update lines in the macros. Four cc files have been modified in src - LXeMainVolume.cc, LXeDetectorConstruction.cc,  LXeEventAction.cc and LXePrimaryGeneratorAction.cc.

  • LXePrimaryGeneratorAction.cc sets the gamma energy to be 140 keV.
  • pmt positioning is done originally in LXeMainVolume.cc inside G4PVPlacement function -

    There, the PlacePMTs function calls have been commented out except in the xy plane.
  • G4double lxe_Energy[lxenum]    = { 3.001*eV , 3.000*eV, 2.999*eV, 2.998*eV };
  • is defined in LXeDetectorConstruction.cc - also

    fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",63000./MeV);

    G4double vacuum_RIND[lxenum]={1.,1.,1.,1.};
    (changed from 3 values in orig to 4 values here. seems to be a mistake. - refractive index should be a 3D vector, not 4D.

    In SetDefaults, sizes and numbers defined as

    fScint_x = 5.2*cm;
    fScint_y = 5.2*cm;
    fScint_z = 1*cm;
    fNx = 8;
    fNy = 8;
    fNz = 0;
  • LXeEventAction.cc has the added opfile <<  statements.
    Most of the G4couts in the original are after an if(fVerbose>0)
    that is, LXe/eventVerbose 1 must be set while running LXe for them to execute.
  • vis.mac the default visualization macro has
    /run/verbose 2
    /control/verbose 2

    setting these to 0 reduces some clutter.
  • Somewhere the process verbose is being set to 1, can't seem to override. So all hadron processes etc are listed.
  • 140 keV being deposited in modified version as against 511 in orig.
  • Energy weighted position of hits in LXe is being shown as non-zero in new and old, but in both cases, reconstructed position is 0,0,0

Thursday, July 24, 2014

some Ubuntu tweaks for general working

To add Open in Terminal to the right-click context menu for folders displayed in Ubuntu, followed this page
http://askubuntu.com/questions/207442/how-to-add-open-terminal-here-to-nautilus-context-menu
and installed with
sudo apt-get install nautilus-open-terminal

To install Adoble Flash Plugin, Software Center had Adobe Flash Plugin installer. But even after that, radiosai streams did not work - apparently that was due to absence of mp3 codec. Installing GStreamer plugins for mp3 and so on from Software Center solved that issue.

To avoid having to adjust the brightness every time on reboot, followed this workaround.
cat /sys/class/backlight/acpi_video0/max_brightness
to get the value for max brightness, and then put that or a corresponding value - I used 8 - at the end of /etc/rc.local as
echo 8 > /sys/class/backlight/acpi_video0/brightness

Apparently the correct solution is to fix it in grub, as given here

working with Geant4 on Ubuntu 13.10

Started some preliminary work with the Geant4 C++ toolkit for Monte Carlo simulations. The name comes from GEANT-3, GEometry ANd Tracking.

Also looking at GATE - Geant4 Application for Tomographic Emission as mentioned in this pdf.

Installing Geant4 ran into QT related errors. The solution was here, editing
/usr/include/qt4/QtOpenGL/qgl.h

to have at the end of the if defined includes

#if defined(Q_WS_MAC)
# include
#else
# ifndef QT_LINUXBASE
#   include
# endif
#endif

It turned out that installing in a user directory was more convenient, as that was the method in the install guide. Installed versions 9.6 and 10.0, since the GATE was supposed to work with 9.6. My make string was
cmake -DCMAKE_INSTALL_PREFIX=~/geant4 ../geant4_9_6_p03 -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_QT=ON -DGEANT4_INSTALL_EXAMPLES=ON 

make -j2 (using two cores for building) ran for 50 minutes to build geant4 v9.6.
make by itself (only one core) took 80 minutes for 10.0.

With this installation, the make string for applications using Geant4 was
cmake -DGeant4_DIR=/home/hari/geant4/lib/Geant4-9.6.3 ../LXe
and so on.

The LXe example needed the path to low energy data to be defined as an environment variable, like
export G4LEDATA=/home/hari/geant4_10/share/Geant4-10.0.2/data/G4EMLOW6.35

In Ubuntu, one method to set environment variables without reboot seems to be to edit /etc/environment to add at the bottom
G4LEDATA=/home/hari/geant4_10/share/Geant4-10.0.2/data/G4EMLOW6.35
Geant4_DIR=/home/hari/geant4_10/lib/Geant4-10.0.2
and then call
source /etc/environment
at the bottom of .bashrc - but that did not seem to work - have to put export statements in .profile, as mentioned in the ubuntu help file. And that will work only after logging in again.

Once these environment variables are set, then the make string does not need the path to Geant4 and so on.




Thursday, July 17, 2014

call forwarding from BSNL landline

According to this BSNL page,
http://www.bsnl.co.in/opencms/bsnl/BSNL/services/landline/plus.html
we can activate call forwarding using the code 114 followed by number to which call is to be forwarded. Did not work in my case. The CLI announcement service at 164 also did not work, so perhaps all these services are not available at our location. 

Wednesday, July 16, 2014

Sunday, July 06, 2014

Avidemux issue

Found that my installation of Avidemux, version 2.6 32 bit, doesn't load files when the VGA cable for 2nd monitor is connected and monitor 2 is enabled with "Extend my Windows desktop onto this monitor". With single display, loads fine. 

Friday, June 20, 2014

mysql database table crash and recovery

There was a power outage yesterday at the studio, and the UPS also tripped. PB reports:
The phplist mailist list server gave the error message

> Message:
> Database error 144 while doing query Table './path/to/tablename' is marked as crashed and last (automatic?) repair failed
>
>
> Currently running the repair on the table tablename​ as suggested here:
>
http://stackoverflow.com/questions/8843776/mysql-table-is-marked-as-crashed-and-last-automatic-repair-failed
>
> cd /var/lib/mysql/path/to/relevant/db
> myisamchk -r tablename.MYI
>
> ​looks like its going to take a long time.....​


and later,

Recovery successful.

​This was done by stopping mysql database:


service mysql stop
myisamchk -r tablename.MYI

- recovering (with sort) MyISAM-table 'tablename.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
Data records: 119477877


service mysql start


testing schedule page and audio search page accessibility with screen reader software

We got a report that the audio search results were not accessible with JAWS 14.137 screen reader software. The google chrome accessibility page lists JAWS and NVDA. Downloaded and tested both. Found JAWS 14.0 working perfectly fine with our audio search page, with Firefox and Chrome. Also with IE8 (on my machine which has Win XP, highest version of Internet Explorer is IE8). Also fine on NVDA, which is free, as against JAWS which is $1000. Probably reasons, some of which I also faced:

1. Opening the page in a new tab instead of a new window causes problems. Open all pages in new windows instead.
2. Using old version of browser may cause issues on radiosai.org - upgrade to latest version of browser.
 

Tuesday, June 17, 2014

Google Apps Education edition

I had a query asked of me, whether the Google apps for a domain was the "Free edition" or the "Education Edition". Also about the number of users allowed for Edu edition. Here was my reply.

Google apps Education edition allows unlimited users for educational institutions, and 3000 users for other non-profit institutions.
https://productforums.google.com/forum/#!topic/apps/fptTBRXfGPM

You can check which edition you have - Education edition or not - by seeing how much space each user gets. According to this page,
https://support.google.com/a/answer/175121?hl=en
Education edition users get 30 GB, Free edition users get 15 GB.

This is seen at the bottom of your inbox, "Using 4.13 GB of your 15 GB" or "Using 4.13 GB of your 30 GB" or something like that.

Friday, June 13, 2014

source timeout on icecast

On May 21, we had changed the source timeout property on icecast from 10 to 40 seconds hoping to reduce the number of times the server dropped connection. This strategy suggested by PB seems to have worked, since then the connection has not dropped even once when I was operating the live broadcast. Edited  icecast_all.xml  and  icecast_tel_live.xml  and made the source timeout 40 sec. The original suggestion was as below.







changing default browser font for other languages

Using this post as a guide, changed the default font for Malayalam on Firefox to Rachana, which is more readable.

Tools -> Options -> Content tab -> Advanced button in default fonts -> Fonts for: chose Malayalam in the drop-down list, and changed the options other than Proportional to Rachana.


Thursday, June 12, 2014

recordings with M-Audio MobilePre

As noted in an earlier post, the M-Audio MobilePre is an el-cheapo USB preamp interface. But I had to rely on that for some trial recordings.

Using a Maxim mic, laptop sound card noise floor is around -50 dB

M-Audio MobilePre with Maxim mic noise floor is around -60 dB

Using dynamic mic - Ahuja ASM-780XLR - results were similar.

Nose floor rises to -40 dB when capture slider increased to 80%.

The XLR input on the MobilePre seems to be defective - S/N almost unity! -18 dB of noise

Monday, June 09, 2014

"NEW" label on schedule page

As requested, PB has added the "NEW" label on our schedule page for "Concert" category also. He had to modify the csv generation local code as well as the schedule page code for this.

Wednesday, June 04, 2014

brief outage

There was a brief outage of radiosai services. The issue was with Cloudflare dns returning SERVFAIL for our domains. Conversation with Cloudflare:


Thursday, May 29, 2014

avfs - Avisynth filesystem

The simpleslug pages mentioned AVFS. Tried it out. A 10 minute 2K planetarium show - Solar Quest - is seen as a 250 GB file after mounting. After Effects 4.1 complains error retrieving frame - not enough storage is available. But GL_warp2Avi works, even though it has the 2 GB file size limit for actual files, it seems to handle larger virtual avi files. Tested with 18 GB credits virtual avi file.