Archive for November, 2014

Tuesday, November 25th, 2014

IDL 8.4: Variable attributes and static methods

The biggest change introduced by IDL 8.4 is the treatment of all variables as objects. Every variable now has attributes that you would normally get returned from the SIZE function: length, ndim, dim, tname, typecode, and typename. For example: IDL> a = bindgen(2, 3) IDL> print, a.length 6 IDL> print, a.ndim 2 IDL> print, a.dim […]

2 Comments » - Posted in IDL,Objects by

Tuesday, November 18th, 2014

IDL 8.4: FolderWatch

IDL 8.4 adds a new class FolderWatch to watch a directory for changes to its files: IDL> fw = folderwatch(‘.’, lambdap(fw, info: print, info.file), /added) Then if you drop a file into the current directory, for example test.txt, you should see: IDL> test.txt The callback procedure, which I passed a lambda procedure1 to in my […]

No Comments » - Posted in IDL by

Thursday, November 13th, 2014

Is N_ELEMENTS really 0?

The accepted test for determining if the user passed in a value for an argument, say arg1, has been: if (n_elements(arg1) eq 0) then … But this can be thwarted since IDL 8.0, which introduced operating overloading, by an object that overloads ::_overloadSize and returns 0. Brian Griglak in the current IDL Data Point article […]

No Comments » - Posted in IDL by

Tuesday, November 11th, 2014

IDL 8.4: BigInteger

IDL 8.4 introduces arbitrarily large integers with the BigInteger class: IDL> n = BigInteger(2)^400 IDL> help, n N BIGINTEGER <ID=3 LENGTH=401 bits> = 2.582249878086…x10^120 IDL> print, n 2582249878086908589655919172003011874329705792829223512830659356540647622016 841194629645353280137831435903171972747493376 Standard arithmetic with operators such as +, *, etc. works fine and there are a few methods to perform some other common operations: IDL> print, n->nextPrime() […]

No Comments » - Posted in IDL by

Sunday, November 9th, 2014

Modern IDL 1.4 for IDL 8.4

Wow, I wish I had decided to stop giving free updates before IDL 8.4 instead of before IDL 9.0 — there is a lot of new material in Modern IDL 1.4! There are new sections about treating all IDL variables as objects and functional programming, as well as the many minor updates of new routines. […]

No Comments » - Posted in IDL by

Thursday, November 6th, 2014

mglib 1.1.1 released

mglib 1.1.1, my library of IDL routines, was released last month. There are binary packages for OS X and 64-bit Linux on the download page. My library contains routines in the following areas: visualizations file formats (netCDF, HDF 4 and 5, GRIB, save files, XML) collections (list, hash, etc. classes) routines for distributing IDL applications […]

1 Comment » - Posted in IDL by

Tuesday, November 4th, 2014

IDL 8.4: Boolean variables

IDL 8.4 also introduces a new boolean “type”, which is actually not a real type, but just a metadata flag on byte variables1. This boolean flag allows for better understanding of the purpose of the variable. For example, JSON_SERIALIZE can convert boolean IDL variables to boolean JSON declarations. Create boolean variables by converting existing variables […]

No Comments » - Posted in IDL by