IDL 8.9 released
posted Tue 26 Sep 2023 by Michael Galloy under IDLIDL 8.9 was released several months ago, but I didn’t write about it at the time. Here are the release notes and there is a nice overview on YouTube as well. Here are my impressions on what I am personally excited to use.
New features
New licensing mechanism
Hopefully better than the last licensing scheme.
Advanced Scientific Data Format (ASDF) support
This could be useful for me. DKIST is using ASDF to provide a hierarchical listing of all the files in a dataset:
The ASDF file is provided alongside the Dataset to facilitate inspection and analysis of the metadata of a Dataset, without having to transfer all the data. This, in concert with the preview movie, is designed to help make decisions on if a given Dataset is of interest, or what parts of it are, without needing to transfer it.
See ADSF on GitHub.
Use i
and j
to create complex valued constants
Like:
IDL> help, 1 + 2i
<Expression> COMPLEX = ( 1.00000, 2.00000)
I don’t need this, but it seems like a handy notation. I wonder how many odd bugs will be created with trying to increment a counter i
and accidentally creating a complex variable?
Binary, octal, and hexadecimal constants
Creating binary, octal, and hexadecimal constants with 0b
, 0o
, and 0x
prefixes, i.e., color = 0xff0000
also seems handy. I have a use for the binary constants with creating bitmasks. I create hex constants regularly, so maybe I will use that notation now.
Gabor transform filter
This looks interesting, but I don’t have definite plans for it now.
Template literal strings
I am probably most excited about template literal strings, string like Python f-strings that insert the values of variables into themselves. I tend to do things like the following a lot:
filename = string(date, wave_region, format='%s.ucomp.%s.intensity.mp4')
Now I can do it like this:
filename = `${date}.ucomp.${wave_region}.intensity.mp4`
I find this much easier to read and less error-prone. You can also embed C or Fortran-style format codes as well. Very nice!
New compile_opt
options
There are new compile_opt
options: float64
makes doubles the default floating point value, and idl3
which is shorthand for defint32
, float64
, logical_predicate
, and strictarr
. I tend to use just strictarr
.
YAML Ain’t Markup Language (YAML) support
Here’s another one that I think I might end up using a lot. I don’t have a specific need for it right now, but it is another option now for configuration file data.
Updates
JSON_SERIALIZE
PRETTY
keyword — I have to serialize JSON output quite a bit and a better printed output would be very useful. It can be difficult to look at strings like:
IDL> print, json
{"sep_forecast_submission":{"model":{"short_name":"MLSO K-Cor","spase_id":"spas
e://NSF/Catalog/MLSO/K-Cor/AutomatedEventList"},"issue_time":"2021-06-28T13:47:
00Z","mode":"realtime","triggers":[{"cme":{"start_time":"2021-06-28T19:28:12Z",
"pa":315,"speed":320.23999,"time_at_height":{"height":1.26,"time":"2021-06-28T1
9:28:12Z"},"catalog":"MLSO_KCOR"}}],"inputs":[{"coronagraph":{"observatory":"ML
SO","instrument":"K-Cor","products":[{"product":"White Light","last_data_time":
"2021-06-28T13:46Z"}]}}],"observations":[{"all_clear":{"all_clear_boolean":fals
e,"all_clear_type":"cme"},"alert":{"alert_type":"ALERT","start_time":"2021-06-2
8T13:47:00Z"}}]}}
This is much easier to read:
IDL> print, json_serialize(json_parse(json), /pretty)
{
"sep_forecast_submission": {
"model": {
"short_name": "MLSO K-Cor",
"spase_id": "spase://NSF/Catalog/MLSO/K-Cor/AutomatedEventList"
},
"issue_time": "2021-06-28T13:47:00Z",
"mode": "realtime",
...
Libraries
- Keeping up with library updates is a good sign.
- Dropped support for 32-bit and Python Bridge support for Python 3.7. I don’t have old systems that need these, so I am fine with them leaving. You have to cut off old stuff eventually, otherwise new work becomes too difficult.