Skip to content

Category: Installed software

Make Evince Display IDL PS Filename on Banner: JUST USE EVINCE!

AS OF 2020 Sep (and I believe much earlier), using the graphics displayer EVINCE automatically puts filename on banner, and furthermore the following did not work with other viewers. Therefore consider the following to be “deprecated” (withdrawn) –jmw

To  actually use evince from the command line, type evince <filename> &

To actually use evince in a nautilus file manager, select (click on) the desired file, and go to
file>>open with>>evince

Commonly when one prints plots to a postscript from IDL and open it with evince(as we always do), the banner of the evince window perennially shows “Graphics Produced By IDL”, which is not helpful at all especially when you’re plotting a thousand plots and trying to compare them.

Hence a pair of IDL routines (OPENPS and CLOSEPS )can be called now to make the output PS file display the file name at the banner and to make the plotting to file process slightly less complicated. The way to call them is as follows:

OPENPS, blablabla.ps      //Before you plot anything. This will set the output device to blablabla.ps and by default color plot

[ DEVICE, FONT_SIZE=9]  //This is the optional part if you want anything about the graph beyond color, see IDL documentation on DEVICE for more

//information. Note that you may overwrite the color attribute here by saying DEVICE,/COLOR=PS

plot,bla

overplot.bla //Plot and add labels and do whatever as you like

CLOSEPS //When you’re done with one graph, simply call CLOSEPS, it will save the file for you and set the plotting device back to xwindows

WARNING: DO CLOSEPS BEFORE YOU OPENPS A NEW FILE. IN OTHER WORDS, EACH PLOT FILE MUST BE ENCLOSED BY A PAIR OF

OPENPS-CLOSEPS statement.

For more information, the code locates at /usr/share/astro/idlshare/locallib, or email huangy@carleton.edu.

 

-yuping

tempo2,fftw3 and cfitsio setup

TEMPO 2 is the newer pulsar timing package. FFTW3 is a fast fourier transformation library. CFITSIO is the NASA library for reading FITS format images. All of them are installed under $PSRHOME.  there’s another installation documenting file 00READMECarleton under that folder. FFTW3 and cfitsio are the dependencies for some of the tempo2 plugins and psrchive.

1. FFTW 3.3.4 is obtained from http://www.fftw.org/download.html,  unzip the tar file then

./configure –prefix=$PSRHOME/FFTW3/
sudo make
sudo make check
sudo make install

This will install the double precision FFTW3 library for TEMPO 2. However, the single-precision fftw
library that psrchive might require is not installed yet.

2.CFITSIO 3.370 is obtained from http://heasarc.gsfc.nasa.gov/fitsio/, unzip, cd, then

./configure –prefix=$SOFTWARE_DIR
sudo make shared
sudo make install

3. TEMPO2 is obtained by CVS anonymous checkout
cvs -z3 -d:pserver:anonymous@tempo2.cvs.sourceforge.net:/cvsroot/tempo2 co tempo2

The installation requires an amount of modification of config files (pgplot compilation flag, fixing bugs).
See 00REAMECarleton for details. But basically you do

./bootstrap
 setenv TEMPO2 $PSRHOME/tempo2/
 ./configure --prefix=$PSRHOME/tempo2/ --with-cfitsio-dir=$PSRHOME/cfitsio/ --with-fftw3-dir=$PSRHOME/FFTW3/ F77=f77
 sudo make && sudo make install
 sudo make plugins && sudo make plugins-install

-Yuping

aastex setup (latex) and emulateapj

1. download aastex.cls  and emulateapj.cls from the web and place  in /usr/share/texmf/tex/latex/misc/

(you will probably need superuser privileges to do this [or sudo]).

2. type texconfig rehash.  This updates the paths where tex looks for files; eg the above.

3. that should be it! I got aastex to run on mirzam.

4. Note that /usr/share is NOT SHARED ACROSS OUR COMPUTERS, so the above needs to be done on any computer on which one wishes to use aastex. (A simpler workaround is to just put aastex.cls and emulateapj.cls in whatever directory the user has the .tex source file.)

(there are a variety of tools to find the latex default paths, etc. See the web, as I already forgot the many I had to use to figure out the above.)

(note that tex and latex files tend to be in (NONSHARED) /usr/share/texmf/.)

At the top of the .tex file, place one of the  commands:

\documentclass[12pt,preprint]{aastex} or
\documentclass[manuscript]{aastex}

which use the asatex.cls file to generate typewriter-like preprint or manuscript files; or 

\documentclass{emulateapj}

[This emulates apj format: see http://hea-www.harvard.edu/~alexey/emulateapj/ ]
In either case, a useful command to put a comment on leading page is:

\slugcomment{Draft 2011 Aug 21 skeleton from Joel and  Andrew}

which is placed after abstract and keywords.
–Joel

 

idl interactive gaussian fitting widget

Tom Callister downloaded an IDL routine from NASA FUSE spacecraft idl site called xgaussfit.pro that does interactive

Gaussian fits via widget.  He got it running here after some effort and it is at /usr/share/astro/idlshare/locallib/pulsegaussfit.pro

Install Mathematica 7

Put in Mathematica 7 CD, ensuring that it appeared on the desktop.
Open a terminal window and cd to /media/Mathematica/Unix/Installer
Run ./MathInstaller.
(For some reason the Mathematica Installer won’t open unless you run it from the terminal)
Note, if it throws an error that says “/bin/sh: bad interpreter” point the shell directly at MathInstaller by typing:
/bin/bash ./MathInstaller

Choose default install directory:

/usr/local/Wolfram/Mathematica/7.0/

Allow selinux modification

Choose default script directory:

/usr/local/bin

For password configuration choose option (1):

(1) Single machine
Install a password specific to this machine. Mathematica will launch,
and you can enter your password.

This is what the Installer does upon selection of option (1).

xxxxxxxxxxxxxxxx
Configuring Single-Machine password…

Mathematica 7.0 for Linux x86 (32-bit)
Copyright 1988-2009 Wolfram Research, Inc.

You will need to get a password from your
license certificate or from Wolfram Research
(http://register.wolfram.com).
Machine name:   antigone.Physics.Carleton.edu
MathID: 7108-71426-20286

You will need a valid license ID and password in order
to proceed. Go to http://register.wolfram.com or
consult your Getting Started documentation.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Then, go to (http://register.wolfram.com) and type in the information the Installer gave you; Machine Name, MathID, and Carleton’s License (L3125-8812). The registration web page will ask for the name of the person registering, supply either Joel Weisberg or Nelson Christensen, but give Bruce’s email address (or your own email, just forward the forthcoming email to Bruce).
So it will look like:

Name: Joel Weisberg
Organization: Carleton College
Department: Physics and Astronomy
Email address: bduffy@carleton.edu

This will cause an email to be sent the email address you entered with the password needed to finish the installation.

Here are the contents of the email I received:

xxxxxxxxxxxxxxxxxxxxxx
Version 7.0 password(s) were generated for license: L3125-8812

Here is the content for your mathpass file:

antigone.Physics.Carleton.edu
7108-71426-20286
L3125-8812
5157-617-135:2:8:20080701

Requestor information:

Name: Joel Weisberg
Organization: Carleton College
Department: Physics and Astronomy
Email address: bduffy@carleton.edu

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The install script then asked for:

Carleton’s License (L3125-8812)
The Requestor (Nelson Christensen/Joel Weisberg)
The organization (Carleton College)

Then the Installer asked for the password (the one from the email I received was 5157-617-135:2:8:20080701).

The password will be the last string of digits given in the email. (And the only string you didn’t have before the email)

idl71 install notes

==========================================================
IDL71 Install instructions
==========================================================

NOTE: These files are stashed in /etc/secret/idl71:

idl71-install-notes.txt
idl71-license.dat
astron.tar.gz


# cd /usr/local
# mv itt itt70
# mkdir itt
# cd itt

As the installation booklet suggested might happen, my attempt to run the install script failed with:


[root@algol itt]# /media/IDL71/install_unix.sh
bash: /media/IDL71/install_unix.sh: /bin/sh: bad interpreter: Permission denied

I applied the remedy they suggested:

[root@algol itt]# umount /dev/hdb
[root@algol itt]# mount -o ro -t udf /dev/hdb /media

NOTE: For algol, the device was ‘/dev/hdb’, but for sirius the device was ‘/dev/scd0’:

[root@Sirius itt]# umount /dev/scd0
[root@Sirius itt]# mount -o ro -t udf /dev/scd0 /media

… and then ran the installer again:

[root@algol itt]# /media/install_unix.sh

The installer launched and asked me what I wanted to install. I chose only IDL program files and skipped the “CIA High Res Maps” and “Dicom Network Services” options.

After install, a ‘Product Environment’ window pops up. I chose the ‘Create Links’ option.

The “Licensing/Registration Program” window pops up. I chose to run the license wizard, but it seems as if SELinux kept it from popping up. Instead, the installer finished by giving me the full path the the license wizard so that I could run it later:

/usr/local/itt/idl71/bin/ittlicense

When I launched the license wizard by hand I got SELinux warnings:

[root@algol itt]# /usr/local/itt/idl71/bin/ittlicense
/usr/local/itt/idl71/bin/bin.linux.x86/idl: error while loading shared libraries: /usr/local/itt/idl71/bin/bin.linux.x86/libidl.so.7.1: cannot restore segment prot after reloc: Permission denied
rm: cannot remove `/root/.ittlicense_tmp': No such file or directory
[root@algol itt]#

The SELinux troubleshoot browser posted an alert, and specified the commnands necessary to make SELinux shut up. I issued those commands, but the wizard posted a window complaining about another SElinux denial… At this point I changed the systems SELinux state from ‘Enforcing” to “Permissive”…

I pasted the license.dat info into the text typin and clicked through all the options (install license mgr, launch license mgr) and then select Exit.

NOTE: the idl71 license wizard makes it’s own provisions for starting the license manager at boot time. So I removed the old idl70 specific license manager launching command from /etc/rc.d/rc.local:

/usr/local/itt/idl70/bin/lmgrd -c /usr/local/itt/license/license.dat

NOTE: Must also kill the running lmgrd process for the previous version.

Made sure all current users ~/.cshrc file contained the correct idl_setup call. They did. Here’s the proper command:

source /usr/local/itt/idl/bin/idl_setup

Installed the goddard lib:


mkdir /usr/local/itt/idl70/lib/goddard
cd /usr/local/itt/idl70/lib/goddard
wget http://idlastro.gsfc.nasa.gov/ftp/astron.tar.gz
tar -xvzf ./astron.tar.gz
chown root:users -R .

I then rebooted, logged in as bduffy, ran a csh shell and issued the idlde command. Seemed to work….

============================================================
Install issues on Sirius and Mirzam
============================================================

On Sirius (and Mirzam) the installation experience was different. After setting SELinux to Permissive mode, I launched the license wizard and it it segfaulted.


[root@Sirius itt]# /usr/local/itt/idl71/bin/ittlicense
IDL Version 7.1 (linux x86 m32). (c) 2009, ITT Visual Information Solutions

% Embedded IDL: ITT Visual Information Solutions, License Wizard.
% Embedded IDL: ITT Visual Information Solutions, License Wizard.
% Loaded DLM: XML.
/usr/local/itt/idl71/bin/ittlicense: line 36: 27919 Segmentation fault $IDL_DIR/bin/idl $* -em=$IDL_DIR/lib/hook/ittlicense.sav
[root@Sirius itt]#

NOTE: I could launch idlde, but it complained about the missing license manager…

SOLUTION:

I could see on algol how the license manager was launched. There’s a file in /etc/init.d/sys5_idl_lmgrd and symlinks to it in /etc/rc.d/rc*.d. So:

From algol:

rsync -av /etc/init.d/sys5_idl_lmgrd root@sirius:/etc/init.d/

From Sirius:


ln -s /etc/init.d/sys5_idl_lmgrd /etc/rc.d/rc0.d/K01sys5_idl_lmgrd
ln -s /etc/init.d/sys5_idl_lmgrd /etc/rc.d/rc2.d/S99sys5_idl_lmgrd
ln -s /etc/init.d/sys5_idl_lmgrd /etc/rc.d/rc3.d/S99sys5_idl_lmgrd
ln -s /etc/init.d/sys5_idl_lmgrd /etc/rc.d/rc4.d/S99sys5_idl_lmgrd
ln -s /etc/init.d/sys5_idl_lmgrd /etc/rc.d/rc5.d/S99sys5_idl_lmgrd

I then rebooted, saw lmgrd start properly at boot, and after logging in as bduffy was able to launch idlde w/o any license warnings.

============================================================
idlde libGL error on Sirius and Mirzam
============================================================

When I tested idlde by logging in as bduffy and launching idlde from Mirzam, idlde posted this warning message to it’s text window:


IDL Version 7.1 (linux x86 m32). (c) 2009, ITT Visual Information Solutions
Installation number: 217420.
Licensed for use by: Carleton College

G’day!
% Compiled module: ADDPATH.
% Compiled module: AODEFDIR.
% Compiled module: P8.
% Compiled module: LDCOLPH.
libGL error: open DRM failed (Operation not permitted)
libGL error: reverting to (slow) indirect rendering
% Unsupported X Windows visual (class: PseudoColor, depth: 8).
Substituting default (class: TrueColor, Depth: 24).

NOTE: On algol, I get this message instead. It’s notable that the license wizard didn’t fail on algol…


IDL Version 7.1 (linux x86 m32). (c) 2009, ITT Visual Information Solutions
Installation number: 210557.
Licensed for use by: Carleton College

G’day!
% Compiled module: ADDPATH.
% Compiled module: AODEFDIR.
% Compiled module: P8.
% Compiled module: LDCOLPH.
libGL warning: 3D driver claims to not support visual 0x4b
% Unsupported X Windows visual (class: PseudoColor, depth: 8).
Substituting default (class: TrueColor, Depth: 24).
% Compiled module: DOPHSBALL.

SOLUTION:

On mirzam I noticed that we didn’t see these errors running as root, and so Matt and I looked at /dev/dri/* and /dev/dri/card0 had perms of 600. When we chmod’d them to 666, idlde didn’t post the errors. So then the challenge was to find the right file that would change these perms at the right time. At first I thought that modding the line at the bottom of /etc/security/console.perms.d/50-default.perms would do it, but it didn’t work. We think it’s because the dri devices don’t exist at the time this file is applied at boot, but only after X is launched. The proper place/way to set the perms it to append these lines to /etc/X11/xorg.conf:


Section "DRI"
Mode 0666
EndSection

Oddly, although applying this fix to Sirius seemed to work, there is no /dev/dri on Sirius, and running fglrxinfo segv’s, so something isn’t quite right…

How fix “Firefox already in use” problem

Our shared home directories sometimes confuse Firefox, causing it to fail to launch while posting a dialog window saying that “Firefox is already in use”.

The only solution I’ve found that really works is somewhat drastic. It requires you to delete your ~/.mozilla/firefox directory, which has the effect of deleting your bookmarks.

To preserve your bookmarks, we must first export them to a temporary location, exit Firefox, delete your ~/.mozilla/firefox directory, relaunch Firefox, and then import your bookmarks from the temporary location.

Here’s the step by step solution:

1. To get Firefox to launch (in a somewhat hosed state) so that you can save your bookmarks, open a terminal window and issue these commands:

rm -f ~/.mozilla/firefox/*.default/lock
rm -f ~/.mozilla/firefox/*.default/.parentlock

2. Launch Firefox. It will be somewhat hosed, but you should be able to export your bookmarks by opening the Bookmarks window by selecting “Bookmarks->Organize Bookmarks” from the Browsers menu. Once the Bookmarks window appears, click on the “Import and Backup” menu and select “Backup”. A “Bookmarks backup” window will pop up prompting you for a location to save your bookmarks to. Just go with the default values, which should save a “Bookmarks <date>.json” file to your Desktop.

3. Exit Firefox

4. From a terminal window, issue this command:

rm -f ~/.mozilla/firefox/

5. Launch Firefox. At this point Firefox should behave normally and you can restore your bookmarks by opening the Bookmarks window and selecting “Bookmarks->Organize Bookmarks” from the Browsers menu. Once the Bookmarks window appears launched, click on the “Import and Backup” menu and select “Restore”. A dropdown list of of bookmark backup files should pop up, and you can select the most recent one to restore your bookmarks.

Cyclic Dependency in Java SDK Packages (RHEL 5.3 only)

As of Feb 2009, the RHEL5.3 yum repository has a cyclic dependency in some java packages that may be installed as dependencies by some openoffice.org packages. This will cause yum to be unable to update.

openoffice.org applications are java-based, and some of them require a java-SDK in addition to the normal java system. RHEL 5 provides a bunch of different java packages from many sources (Sun, IBM, BEA, etc….). If you don’t have an SDK installed when installing some openofice.org packages, yum will select one for you in order to fulfill dependencies. Beginning in RHEL 5.3, yum defaults to choosing the java sdk package from BEA if not instructed otherwise.

The java-1.x.x-bea packages, unfortunately, currently are involved in a cyclic dependency – which makes yum very unhappy when told to update.

To avoid this, install the Sun SDK package ahead of time:
#> yum install java-1.6.0-sun-devel
…after this, install whatever openoffice package you need!

Our automatic package setup script (which installs the packages and apps used on all default astronet machines) at /etc/secret/clientconfig/install-programs/install_packages.sh has been updated to reflect this problem by specifying the sun package explicitly. Only machines where packages are being installed by hand should need to worry about this.

–James

IDL help browser bug fix

Joel installed a bug fix for the help browser on redhat 5 machines. (new sirius, new mirzam). As of 13 Feb 2009, it is installed on all three licensees (incl algol).

If you use idlde, it is transparent.

If you use command line idl, you have to type idlhelp before typing idl

Joel had to contact idl support to find out about it.  For ref,  XULRunner patch for IDL 7.0,http://www.ittvis.com/services/techtip.asp?ttid=4395

PALFA pulsar candidate viewer software install on rigel

PALFA viewer is in /data/psrdata/PALFA/viewers

as is our config file PALFA_config.py (subdir common_DB)

i installed several needed software pieces into /usr/share/astro and elsewhere

i installed freetds from /usr/share/astro

i downloaded to Desktop and installed tcl8.4.19 tcl8.5.3 according to its unix README

i downloaded to Desktop and installed tk8.5.3 a month later. is it incompat with above tcl? yes its readme says it is so I went back and installed new tcl8.5.3 as shown above.

i installed python 2.5.2 from desktop dnld, following directions. first i had to setenv LD_RUN_PATH /usr/local/lib in order that it could find _tkinter. the executable was placed into /usr/local/bin, whereas older ones are in /usr/bin. then i linked it to /usr/bin/python

i installed pymssql from /usr/share/astro to /usr/local/lib/python2.5/site-packages/

i installed pmw from /usr/share/astro onto rigels /usr/lib/python2.5/site-packages (see documentation via firefox at file:///usr/share/astro/Pmw.1.3.2/src/Pmw/Pmw_1_3/doc/starting.html )

i installed numpy-1.1.0 from desktop dnld.

i installed matplotlib-0.98.1 from desktop dnld. (directions are in file called “install” in distribution.) A routine’s name had been changed (I found this out in the file API_CHANGES in the distribution:

blend_xy_sep_transform(xtrans, ytrans)

was renamed

blended_transform_factory(xtrans, ytrans)

so I had to go to mywidgets.py in PALFA/viewers/common_DB/ and make this change.

I installed PIL (python imaging library) 1.1.6 from desktop dnld, creating Imaging-1.1.6

————————————————————

so note it is not accessible from other hosts but this is the only one we can access cornell database from anyway.

Joel