Questions tagged [idl-programming-language]

Interactive Data Language, a dynamically typed programming language used primarily for image analysis and data visualization. IDL is maintained and licensed by Harris Geospatial Solutions.

IDL (Interactive Data Language) is a dynamically typed programming language intended for processing and visualization of numerical data. IDL is currently maintained and licensed by Harris Geospatial Solutions. It is popular in particular areas of science such as earth science, astronomy, and medical imaging.

Additional information is available on Wikipedia.

Tagging recommendation:

Use the idl-programming-language tag for all IDL related questions. Do not use the idl tag; that is for Interface Description Language.

326 questions
1
vote
2 answers

Comparing numerical results between mathematical operations performed with two different languages

I'm currently trying to port an algorithm from IDL to Python 3 and while comparing results I came across the following questioning: How do I look at the numbers and determine if I'm effectively reproducing the results? Assuming that different…
1
vote
3 answers

multiline for loop in IDL

I am trying to do a multiline for loop in IDL but its not working, here is my first program: for n=0,5 do begin print, n which gives this output: 6 and this is my second program: for n=0,5 do begin print, n endfor which gives the following…
Mathew
  • 1,116
  • 5
  • 27
  • 59
1
vote
2 answers

Line plot with color gradient

Is there a way to create a plot in IDL with a color gradient to it? What I'm looking for is similar to this Matlab question. The best I know how to do is to plot each segment of the line in a for loop, but this seems rather cumbersome: x =…
DavidH
  • 415
  • 4
  • 21
1
vote
2 answers

SYSTIME causes IDL program error

I have been assigned an IDL coding assignment for a class. This language is new to me but I have been programming awhile so this error perplexes me. I cannot use the systime() function to add the date and time to an outputted filename. Not shown in…
Zach
  • 113
  • 1
  • 9
1
vote
1 answer

Is there a way to save and quickly reopen surface plots in IDL (Interactive Data Language)?

I was wondering if there is a way to save surface plots in IDL in a way that is convenient to reopen them. As far as I am aware there are only two ways of doing this: The first way is to save your surface plot as an image e.g. png. The trouble with…
Peanutlex
  • 169
  • 5
1
vote
1 answer

Procedures and functions not found while executing GDL commands

I've installed GDL recently, since I don't have a license for IDL. I was trying to run and IDL (.pro) script for simulate exoplanetary transit (with exomoon) and I got some issues: GDL> .reset_session …
1
vote
1 answer

How to access Python standard stream in IDL Spawn command?

I have a python program like this: raw_data = sys.stdin.buffer.read(nbytes) # Read from standard input stream # Do something with raw_data to get output_data HERE... output_mask = output_data.tostring() # Convert to…
louna
  • 35
  • 5
1
vote
1 answer

IDL getting file size

I'm currently using IDL (Interactive Data Language) and I'm looking for a way to get the size of a file. Does anyone knows a solution? To be more specific: I've got an array of Strings containing filenames and a function iterates through those…
sequoia
  • 480
  • 2
  • 13
1
vote
1 answer

Calling an GDL script in Python

I'm an astronomer and just recived a lot, a LOT, of code writed on IDL, I use GDL to run it and works just fine (mostly), but I'm mainly a Ptyhon (2.7) user so would be nice to find a way to be able to call the IDL rutines from my Python…
Emberck
  • 55
  • 8
1
vote
2 answers

How can I save float arrays in a multiple dimension array in IDL?

I am trying to save many float arrays in a multiple dimsensional array. Each float array belongs to a specific index in the dimensional array. The array size of the float arrays are [128, 128]. What did I try? (I made it simple, right now I am not…
TheHeroOfTime
  • 751
  • 4
  • 9
  • 23
1
vote
2 answers

How can I use scope_varname in IDL with a string construct representing the variable name?

I have an IDL function that takes in up to 4 data variables: data1, data2, data3 and data4. I want to be able to access the level=-1 scope of these variables in a loop using a string construct for the data variable name, so I can document the name…
1
vote
2 answers

Is IDL able to add / subtract from date?

As you can see the question above, I was wondering if IDL is able to add or subtract days / months / years to a given date. For example: given_date = anytim('01-jan-2000') print, given_date 1-Jan-2000 00:00:00.000 When I would add 2 weeks to the…
TheHeroOfTime
  • 751
  • 4
  • 9
  • 23
1
vote
1 answer

How to save the results of loops-IDL

Change=[[N_elements(Change92_2001)],N_elements(Change92_2006),N_elements(Change92_2010)] T=3 FOR i=0,T-1 DO BEGIN area=Change[i]*900 print,area help,area ENDFOR I am trying to write a basic loop that will look at the number of pixels…
1
vote
2 answers

idl making big numbers = 0.0

I'm trying to the the mass of the black hole at the center of this galaxy, I have the mass in solar masses, but need it in kg. However when I try to convert (1Msolar = 1.989*10^30kg) idl just gives me 0.0000. I have no idea what I'm doing wrong and…
LexieStark
  • 11
  • 3
1
vote
2 answers

Passing parameters to shell script from IDL script

I'm trying to write IDL script called, for example, a.pro. In the end of this script I want to execute shell script b. I'm trying to do it using spawn command. But I also need to pass some parameters (variables values) to this shell script from IDL…