idl-programming-language

Interactive Data Language, IDL: Does anybody care?

Anyone use a language called Interactive Data Language, IDL? It is popular with scientists. I think it is a poor language because it is proprietary (every terminal running it has to have an expensive license purchased) and it has minimal support (try searching for IDL, the language, right now on stack) . I am trying to convince my col...

How to declare variables in for loop? (IDL)

For example, My files are naming after 00.dat, 01.dat, 02.dat..., each file contains multiple columns and I use READCOL to read them into variables. for i = 0, n-1 do begin readcol, string(i, F='(I02)')+'.dat', F='D,D', a0, b0 readcol, string(i, F='(I02)')+'.dat', F='D,D', a1, b1 . . c1 = a1 / a0 c2 = a2 / a0 ...

Python equivalent of IDL's stop and .reset

Hi there, I'm relatively new to python but have a bit of experience using IDL. I was wondering if anyone knows if there are equivalent commands in python for IDL's stop and .reset commands. If I'm running some IDL script I wrote that I put a stop command in, essentially what it does is stop the script there and give me access to the com...

IDL: Accessing struct fields using field names stored in variables?

If I have a struct with a fieldname 'fieldname', is it possible to access the data in that field using only the variable? ie. x = 'fieldname' is it possible to do data = struct.(x) in some way? I want to use the string in x as the field name. ...

IDL: Can IDL add a colorbar/other legend info below a contour plot, so that it doesn't overlap anything?

I am using a map_set call to draw a map, and then using contour to plot some data on top of it. I want to add a legend to this plot to make it useful, but it would have to be below the entire plot, and everything I've tried creates an overlapping legend over top of my image. ...

IDL: Can I get the coordinates of a point on my plot's cartesian plane?

I have a plot like this: http://i.imgur.com/i9xp5.png I need the data coordinates of points in order to plot wind barbs. Now, if I wanted a wind barb to be drawn at x=100, y=20, is there a way I can obtain the data coordinates of that ( or other ) points of my plot? ...

IDL - define array name within a loop

I may be going about this the wrong way, but I'm trying define and fill arrays within a loop. for i = 0,39 do begin xx = long(findgen(n+1l)*sx + line1x[i]) sz = size(xx) arrayname = 'line' + strtrim(i,2) arrayname = findgen(3,sz[1]) arrayname[0,*] = xx arrayname[1,*] = yy arrayname[2,*] = vertline endfor This obviously won't work, ...

Why is IDL adding it's own tick marks to my custom plot tick marks?

I'm trying to specify custom Y axis tick marks, but IDL is not cooperating. http://i.imgur.com/BFqMO.png In the top left, 1.0000 should be the max value, but IDL puts a 57 there. 57 is the max array dimension of my data. I have an array of eta levels(strings) corresponding 1:1 with the array indices, and I want to use them as tick m...