Skip to content

Category: IDL hints

idl70 and goddard library upgrade

I basically followed the idl64 install instructions already posted in this blog.

Joel had received the idl70 update email from itt, and that contains the instructions on where to download the license file and the tar.gz file containing the install image.

[bduffy 2009-02-04: I’ve put a copy of the relevant license.dat and tar.gz files into /etc/secret/exchange/idl70/]

As root:

cd /usr/local

Because /usr/local/itt already existed and contained idl64, I moved the original /usr/local/itt to itt64 to move it out of the way. I will delete it later after I’m comfortable that the install went smoothly.

mv ./itt ./itt64
mkdir itt
cd itt
mv /root/idl70linux.x86.tar.gz
tar -xvzf idl70linux.x86.tar.gz
cd ./license
cp /etc/secret/idl7-license.txt ./license.dat

I then edited /usr/local/itt/license/license.dat to contain only the license entry for this box.

chmod 644 ./license.dat

cd /usr/local/itt

Then ran the ‘install’ script:

./install

Said ‘y’ to all prompts

Chose option 1) for creating symbolic links and defining the IDL environment. It created several symbolic links.

Finally the install script asked if we wanted to start “DICOM Network Services at boot time”. I answered ‘n’.

Restarted the license mgr by issuing these commands:

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

NOTE: On Mirzam (but not Sirius) I ran into trouble issuing the lmdown command. Turns out the problem was that the ‘IDL_DIR’ env var was set in root’s .tcshrc file and that changed the scripts behaviour. I removed the setting of the ‘IDL_DIR’ from root’s .tcshrc file and that fixed the problem.

I also removed all the old idl6.3 related /etc/*/*_idl_* files on both Mirzam and Sirius.

Tested that idl70 was installed by issuing the ‘idl’ command at the command prompt. Seemed to work.

To get the idl lm to start at boot time, I edited /etc/rc.d/rc.local and removed this line:

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

… and added this line:

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

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

Then installed the goddard lib:

mkdir /usr/local/itt/idl70/lib/goddard

Downloaded http://idlastro.gsfc.nasa.gov/ftp/astron.tar.gz
to /usr/local/itt/idl70/lib/goddard

cd /usr/local/itt/idl70/lib/goddard
tar -xvzf ./astron.tar.gz

how to run idl procedures (.pro) from val

to compile procedures:
.run filename.pro
for ex, to compile the average.pro procedure i say:

.run average

to execute a given procedure, for example to execute average after compiling the average procedure, i simply type:

average

(See next idlhints post for info on how to run a .batch file)

idl documentation and help commands from drew

Drew Brisbin gently and helpfully reminded me (Joel) of these three helpful ways of getting online documentation help.

It is useful to remember these three commands to help you find your way in IDL:

1. help, VARIABLE
this will tell you stuff about the variable (is it a string? float? double? is it an array? how big is it?)
So when you did “help, point_lun ” it was trying to find a variable named point_lun. When it didn’t find one, it told you it was undefined.

2. ? IDLCOMMAND
When you hit ? [return] it opens up the IDL help browser. If you stick an IDL command you’re curious about after the ?-mark, it searches for that in the help browser. Very useful for figuring out how to use commands.

3. doc_library, ‘USERCOMMAND’
(remember to use single quotes around USERCOMMAND)
if you’re using a user-defined command (such as readcol, for instance), there wont be any help info in the built in help browser. So instead of using the ?-mark, you have to use doc_library. If the author of the command was courteous enough to include help-like information, it will be displayed when you type this.

Also see Sep 15 post below entitled: IDL path; IDL help; unix inside IDL

IDL 6.4 upgrade

This is an entry to explain how IDL 6.4 was installed.

First we received an email telling us to upgrade our licensing to IDL 6.4. We followed the website instructions to upgrade our 3 licenses from 6.3 to 6.4. The newly upgraded license files were then emailed to Joel who forwarded them onto me(Josh).

I downloaded the tar file from the ITT website through Joel’s login.

I then went to /usr/local and created a directory called itt. I unpacked the 6.4 software in this directory using the command: tar -xvzf idl_linux.x86.tar.gz

Next, run the install binary by typing ./install if you are in the ITT directory or /usr/local/itt/install if you need the absolute path. You will be prompted a few times, just hit yes to install the software and yes to create the symbolic links. Ignore the web server questions just by hitting enter. IDL 6.4 is now installed.

However, in order to use the software, you must now do the licensing correctly.

I placed a copy of all 3 licenses in one flat file in /etc/secret/license.txt.

Copy license.txt and edit it so that the license for the machine you are installing to is the only entry in the file. Then rename the file license.dat.

Move this file to /usr/local/itt/license/

Then restart the license manager on the machine by typing:

/usr/local/itt/idl64/bin/lmdown

followed by:

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

This will then restart the license manager with the new license for IDL 6.4

Now, make sure the license manager is starting at boot time. To do this, simply look in /etc/rc.d/rc.local.

If this command is not there, add it to the end of the rc.local script: /usr/local/itt/idl64/bin/lmgrd -c /usr/local/itt/license/license.dat

Added by JMW 07/2007: Note that idl without the goddard routines is like a fish without a bicycle.  As of July 2007, they must be manually copied on all three computers from the old idl’s lib directory to the new idls lib directory.  crude!  (See goddard libe entry below for more details, but basically root has to do a cp -r.)

Finally test and finish.

———————————————————————————————–

The final step is to make sure you have overwritten any environment variables you have set up in your .tcshrc or .cshrc.

To do this, look in your .cshrc and if you have the line:

source /usr/local/rsi/idl_6.3/bin/idl_setup

Make sure you change it to:

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

(Joel supplied the above July 29, 2007. note that rsi->itt and idl_6.3->idl (assuming idl dir is linked to idl64 and future ones) )
———————————————————————————————

IDL path; IDL help; unix inside IDL

the following are examples of useful commands inside idl:

print, !path will print out the value of the idl path variable

? will start up help browser

?size goes to help browser to find fnc size (it’ll search for closest name to that)

help, /source brings up compiled procedures, compiled functions

help, pola tells you a lot about the variable pola

help, hdr,/st ditto on structure called hdr

print, size(pola) gives a buncha numbers which can be used by idl or deciphered by ?size
doc_library, ‘readcol’ gives documentation of nonnative fncs, like unix man

$ls executes unix ls command

Also see post entitled idl documentation and help commands from drew

IDL customization for Arecibo and GBT: juldaytoLMST.pro

we found that there were two incompatible versions of juldatetoLMST.pro

one is Phil’s arecibo routine, which defaults to arecibo

one is a GBTidl modification to it that defaults to GBT and that has an optional extra parameter.

in order to avoid future confusion, we renamed each routine so that the right version must
explicitly be called:

juldaytoLMSTarecibo.pro

juldaytoLMSTgbt.pro (in /usr/share/astro/gbtidl/pro/toolbox)

NOTE ADDED JUNE 2008:  NOTE THIS IS A GBTIDL INCOMPATIBILITY,

NOT A GODDARD LIBE INCOMPAT!