Skip to content

Category: IDL hints

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!

IDL Arecibo Phil routine “.h” file directory moved slightly to work on algol

NOTE: SEE BOTTOM OF THIS POST FOR UPDATE:

i moved the h subdirectory below rather than at the same level as the gen directory. now idl on algol finds it and starts up fine with phil’s routines:

Now on algol at:

/data/psrdata/usr4/OH/wapp03/philstuff/gen/h

rather than at

as on arcturus at

/data/psrdata/usr4/OH/wapp03/philstuff/h

——————————-
but note that in late May 2006 JMW realized it is more subtle than this:

in /data/psrdata/usr4/OH/wapp03/philstuff/gen/

in aodefdir.pro, i had to define the path to

/data/psrdata/usr4/OH/wapp03/philstuff/

at which point all path difficulties cleared up. so the above “fix” is obsolete (if it ever worked!) In future installations, it should not be necessary to move the h directory.

IDL Goddard Library updated 2018

Updated 2018 June: for  idl 6.3 on canopus and deneb , goddard libe is now at

/usr/local/exelis/idl83/lib/goddard/pro

It was never installed on mirzam idl 8.6 but when it is (soon) it will be in a similar place except replace “excelis” with “harris”.  –jmw

 

Drew and Joel brought in the IDL NASA GSFC Library, as the Heiles tutorial uses a routine from it to enable reading columns from a table. There are many other excellent IDL astro routines in it.

We gunzipped and untarred the download into

algols /usr/local/rsi/idl_6.3/lib/goddard as of May 2006,

(((((((on original post said we put it into:/space/share/astro/idl/idl_6.2/lib/goddard))))))
and after adding Sirius and Mirzam licenses we had to go to algols /usr/local/rsi/idl_6.3/lib/ as root and

scp -r goddard root@mirzam:/usr/local/rsi/idl_6.3/lib/

and

scp -r goddard root@sirius:/usr/local/rsi/idl_6.3/lib/

Note that inside ~.idlstartup, one has
!path = expand_path(‘+/gig1/usr4/OH/wapp03/philstuff/gen’)+’:’+ !path

which (because of the “+”) takes all subdirectories containing files ending in .pro or .sav from the above directories. I believe that the above is operating also on the unix path as well, though the parenthesis would suggest no. Maybe !path is an already expand_path-ed version of unix path.

anyway this works. we can access the Goddard library from inside IDL. But also note that its location suggests we may need/want to move it once we upgrade to next version of IDL.

NOTE ADDED JUNE 2008: DONT CONFUSE GODDARD LIBS WITH GBTIDL!

AS FAR AS I KNOW, WE USE STD GODDARD LIBS WITHOUT MODS.

(We DID have to mod GBTIDL – see above posts.)