330 questions
1
vote
2
answers
329
views
IDL error 'End of file encountered before end of program'
I am using IDL workspace but unable to get started because I get the error below. Note that I can work in the console without any error.
I am new to IDL and I would appreciate if anyone can help me ...
0
votes
1
answer
49
views
In the IDL program, with> and gt, respectively, the running results are different,why?
In the penultimate eighth line of the following procedure:
FUNCTION plant_growth, n_months, initial_plants, pick_strategy
N = LONARR(n_months + 1)
M = LONARR(n_months + 1)
N[0] = ...
0
votes
1
answer
85
views
How to create pseudo-color figures with IDL Graphics
I want to plot a 2-D matrix as a pseudo-color figure in IDL, just like the function pcolor in matlab. I know the function image can do that, but I hope it can generate IDL Graphics like the plot, ...
0
votes
1
answer
182
views
Can we run IDL(Interactive Data Language) in Databricks Notebook (python code)
I am working on a project where we use Azure stack for data engineering and analysis.
The main component for computation is Azure Databricks in which most of the code is written in python code.
...
0
votes
1
answer
87
views
Long start time for idl
IDL (v8.6) takes a long time to start (minutes) even for plain start (idl -IDL_STARTUP ""). It quickly prints
IDL 8.6.1 (linux x86_64 m64).
(c) 2017, Exelis Visual Information Solutions, Inc....
0
votes
1
answer
708
views
How to run .pro file in exelis IDL
I'm trying to run a .pro file on IDL, I opened the file in IDL, but I cannot input anything at the consoleenter image description here
I'm using IDL on ubuntu.
Is it because the environment isn't set ...
0
votes
1
answer
100
views
If condition is met, variable needs to be within a specific range
I am brand new to IDL, and find that the documentation online is lacking in comparison to other languages. This is also my very first post on stackoverflow, so I will do my best to include the proper ...
0
votes
0
answers
42
views
Is there an equivalent of the IDL dist() function in Python? [duplicate]
dist(n) generates a (n x n) matrix of elements. Each element is the straight-line
"distance" from either element [0, 0] or the element just beyond another corner, whichever is closest.
I'm ...
-1
votes
1
answer
112
views
Decode IASI Satellite Spectrum - convert IDL to python
Since I have no experience in IDL coding, I need help converting the piece of code below to python.
The following parameters are known and are 1D arrays oder scalars.
IDefScaleSondNbScale, ...
0
votes
1
answer
149
views
Convert datetime and timedelta from Python to IDL
Please does anyone know how to convert the following python script to IDL,
hours = list(Timed)
start_date = datetime(year=1800, month=1, day=1, hour=0, minute=0, second=0)
days =[]
Months =[]
Years =[...
0
votes
1
answer
230
views
Automatically Read Array Size into IDL
I am trying to automate a code in IDL that takes a few .dat files created and reads them into an array. Each of these files has 4 columns but a different number of rows, and I am not sure how to set ...
0
votes
1
answer
2k
views
Is there a way to run IDL code without paying for license?
I have to convert some code from IDL to Python as a part of a project. The problem is that to convert it I need to learn IDL first and I can't seem to find a compiler for it nor can I find any ...
1
vote
1
answer
261
views
Add variable to structure tag in IDL
I was wondering if someone knew how to add more values to a structure variable in IDL?
For example, if we have the structure 'struct'
struct = {structname, x:[1,2,3], y:[10,11,12]}
And I specifically ...
0
votes
1
answer
251
views
Plot a fieldline onto 2D magnetic field components in IDL
I would like to overplot a single fieldline at some radius or starting point, onto a contour of a magnetic field model without using the streamline function.
For example, here are the cartesian ...
-1
votes
2
answers
294
views
Dividing arrays in IDL and sum over array elements
I was wondering how to divide two arrays
a = [1,2,3,4,5]
b = [2,4,6,8,15]
to get
a/b = [0.5,0.5,0.5,0.5,0.3]
Thanks in advance for the help.
0
votes
1
answer
47
views
IDL - saving loop data
I am trying to calculate correlations for chosen intervals and then save the calculated correlations into an array to save them. But I was not succesful to safe the results after every iterration.
My ...
0
votes
1
answer
414
views
Creating a 2D array in IDL starting from an equation
I'm trying to make a contour plot in IDL of quantity described by and equation, which here I'll take to be x^2 + y.
In order to do that, I first need to create a 2D array ("pxx").
Being a ...
0
votes
1
answer
2k
views
"Gtk WARNING: gtk_disable_setlocale() must be called before gtk_init()" on calling plot in gdl (gnu data language)
I installed GDL, the IDL alternative, to run some IDL code for my project. But when I try to call plot function in GDL it gives the following error and exits:
*(gdl:1003695): Gtk-WARNING *: 22:57:44....
1
vote
1
answer
286
views
IDL - how to write text partially in italics?
How to write text in graphs partially in italics, please? For instance, here:
x = 0.01*(FINDGEN(201))
p1 = PLOT(x, EXPINT(1, x), '2', YRANGE=[0,2])
p2 = PLOT(x, EXPINT(2, x), 'r2', /OVERPLOT)
p3 = ...
0
votes
1
answer
228
views
Im having running IDL code in Python, or just running the code
I am trying to run IDL I will attach it bellow code in python, I have tried idlmagic but nothing seems to work, is there maybe a different environment I should use?
import idlpy
wdir5='/C:/Users/...
0
votes
1
answer
137
views
How can I calculate square root of a matrix using IDL?
I am trying to calculate square root of a large dimension matrix using IDL but failed. Any solution or tips would be highly appreciated.
0
votes
0
answers
278
views
Run IDL .pro from python Popen?
Using a shell the following command works:
idl -e 'eventtester, "TEST123", config_file="path/to/configuration.ini"'
But when it is run from python through
pipes = subprocess.Popen('...
0
votes
1
answer
1k
views
IDL lambda: Attempt to subscript is out of range
idl 8.4 introduced the lambda function. I have IDL 8.6.1 and the lambda function does not fully work as documented:
IDL> f = lambda(x : x * x)
IDL> print, call_function(f, findgen(10))
0....
1
vote
0
answers
321
views
Get Xrange of current graphics object in IDL
How do I get the X-range of the "current" graphics object? For example lets assume I create a single plot window:
p = plot(/test, xrange=[10,35])
Now, without using the reference to p how ...
2
votes
1
answer
201
views
Symbols not displaying correctly when saved to postscript
I am having difficulties getting text to display correctly from an IDL plot once I save to postscript. Code is something like,
p1=plot([0,1],[4,5],thick=2,line=0)
p1.xtitle='Time'
p1.font_name='Times'
...
0
votes
1
answer
243
views
How to translate IDL's SPLINE function to Python [particularly for the case we have 3 data points]
The SPLINE function in IDL allows for cubic interpolation on data (with at at least 3 data points). While the Scipy library in Python can perfomr similar computations with the UnivariateSpline and the ...
0
votes
1
answer
157
views
Plotting in degrees instead of radians
I have plotted a graph that contains a trig function. Instead of having the x-axis be in radians, I would like it to be in degrees. It's a simple task of multiplying the displayed x-axis values by 180/...
1
vote
2
answers
478
views
(Over)plotting points on a line plot
I am trying to plot individual data points on a line plot I already made as follows:
p=plot('3.29*exp(-17.4*(x^2))-0.908',xrange=[0.,1.],yrange=[-1.,1.5])
I first tried overplotting a point like this ...
0
votes
1
answer
570
views
Convert hex string to float
I am trying to read from a file a bunch of hex numbers.
lines ='...
0
votes
1
answer
152
views
how to assign multiple titles on a number of plots in IDL programming language
I have to assign 24 titles on 24 graphs with different values and values has a specific interval, how can I create these titles while creating multiple graphs with multiple-valued titles and how to ...
0
votes
1
answer
2k
views
How to add a vertical line to a line plot in IDL?
I have a plot that I have created as such using a vector c
hist_c=histogram(c,binsize=0.002,locations=locs_c,min=0.000,max=1.000)
pdf_c=float(hist_c)/n_elements(c)
ppdf_c=plot(locs_c,pdf_c,xtitle='c',...
0
votes
1
answer
201
views
how to convert multidimensional array to string in idl
I have an array of floats or doubles lets call it foo. When I do
size(foo)
I get these 5 dimensions
2 67 52100 4 3498338
I would like to convert it to a string like
...
0
votes
1
answer
462
views
How to draw Probability Density Function using line plots in IDL?
I have a vector containing values and I would like to draw a probability density function (PDF) graph for the values contained. Let's say I have a vector given by b=[1,1,3,4,5,2,3,5,1,4,2,4,1,1,4,2,3,...
0
votes
1
answer
392
views
Basic data types not recognized in IDL v.8.7.2
My IDL installation (currently v.8.7.2, but the same problem occurred in v.8.5) does not recognize hash, list, dictionary and orderedhash. For example, typing
h = HASH('Id', 1234)
results in the ...
1
vote
1
answer
1k
views
How do I check the version of IDL I am using?
Background
According to L3Harris, to check the version of IDL you are using, you have to check the /usr/local/ directory as follows:
Linux, Solaris, Mac OS X
On Linux, Solaris and Mac, you can ...
0
votes
0
answers
50
views
How to define a subarray efficiently?
I am getting the error
Unable to allocate memory: to make array
when I try the following:
; A is an array
ind = WHERE(A GE 1)
A = A[ind]
Was wondering what I can do to free up memory?
I tried
A = ...
0
votes
1
answer
82
views
IDL two step graph
I'm struggling with setting a y(x) condition that varies with x range. As an example below, the code wants to plot y=x between x=0 and x=5.1; otherwise y=2x.
Upon compilation, the code spits out the ...
0
votes
0
answers
338
views
Is there a Python alternative to IDL's array_indices() function?
I am working on a port of some IDL code to Python (3.7). I have a translation working which uses whatever direct Python alternatives are available, and supplementing what I can with idlwrap. In an ...
0
votes
2
answers
203
views
find in range of a IDL array?
I am trying to find all indices in an array A, where the value larger than time0 and less than time1. In matlab I can do:
[M,F] = mode( A((A>=time0) & (A<=time1)) ) %//only interested in ...
0
votes
1
answer
91
views
How do I delete an image from an image sequence in the IDL?
I have an image array with dimensions [491,710,710]. For example. I want to delete the 25th and 30th images from this image. How can I do that ?
restore, 'C:\Users\User1\Desktop\TEZ\SUNSPOT_3_Crop\...
3
votes
2
answers
2k
views
How to generate the lineared color plot (cplot) with z values in colorbar
In MATLAB™ one can use cplot.m which can generate colored plot basically looks like 2d plot with 3rd axis (z-axis) value as colorbar. Is there any tool/plotting technique I can use to generate a ...
0
votes
2
answers
2k
views
How to write more than 7 columns into a csv file by IDL?
I have been tried to write 8 columns in a CSV file by using IDL, but seems the maximum columns that I can wrote is 7?
IDL> write_csv,ffout,date_time,tmin_tmax,precp,wind,rh,sun_hrs,glb_rad,net_rad
...
-1
votes
1
answer
235
views
Mask/CLIP Raster images with different resolution in IDL
I want to clip/mask raster image (500meters resolution) by another raster images (10 km resolution) using IDL Programming after the clip/mask process image should be in 500 meters resolution. I have ...
0
votes
1
answer
92
views
Axis scaling is overridden in IDL
The scaling for axes X,Y and Z that I specify in the procedure scale3 is overridden. I don't understand why? Could someone point out what is wrong with my code?
The width of a box is n1/2-1(~128 ...
0
votes
2
answers
338
views
My IDL loop only saves the last iteration - how can I fix it?
I am trying to write a loop to process daily data for a whole month. My code works when manually doing 1 day at a time, but something about my loop is failing when i try to loop through every day of ...
0
votes
1
answer
370
views
Looping through files in an array and executing a command in IDL
I have an array with several files in it. And i want to loop through these files. For each file i want to run a command.
result = [rtlvis_20190518_13.35.48_00001.bin, rtlvis_20190518_13.35.48_00002....
0
votes
0
answers
140
views
How do i pass a variable from python to IDL using pidly
I am using pidly, and i would like to transfer a variable from python into IDL
import pidly
traj = 'test.traj'
idl = pidly.IDL()
idl('trajfile = "{0}".format(traj)')
I just want to be able to use the ...
1
vote
1
answer
1k
views
reading and writing multiple data files in idl
I'm new to IDL and trying to read multiple binary data files from a certain folder and write them in a text format to a certain folder all at once. I currently have a code that reads and writes only ...
1
vote
1
answer
2k
views
How to save Python dataset (previously exported from IDL) back to IDL format
I have a file in IDL, I import it to Python using readsav from scipy, I change a parameter in the file and I want to export / save it back to the original format, IDL readable.
This is how I import ...
0
votes
1
answer
2k
views
How to add elements to an array in IDL that I can use to plot?
I am writing this in IDL.
I want to pass a list of numbers in array x that goes through function y, where then all y values go into an array z, that will be plotted x vs. z.
I have tried to solve ...