Programming Algorithm Tips
Writing Code
- Where can I find good examples of IDL programs?
- What is the proper way to name files in IDL?
- Can I write a recursive function in IDL?
- Can you show me how to write a recursive function to return all the directories rooted at a target directory?
- Can you show me how to write a recursive function to return all the tags of a structure?
- How can I obtain a random permutation of an index array?
- I would like to know which number in an vector is closest to a specific value. Can IDL do this?
- How can I resample my array 3.75 degree lat/lon grid to 2.5 or 5.0 degrees?
- What is the fastest way to find the number of points in a sphere?
- How do I calculate the MODE of an array in IDL?
- What is the best way to obtain random index numbers?
- Can you show me a fast way to smooth the spectral bands of a hyperspectral dataset?
- What is a fast way to match two lists with respect to a given parameter?
- Can you help me grid irregularly spaced data in IDL?
- My office mate's programs never have to be compiled and mine do. What does he know that I don't?
- How can I keep my IDL code backward compatible and still use new features?
- Is there a limit to the number of parameters I can define for a program?
- The random numbers I generate in IDL are not very random. What's going on?
- Can you show me how to create a unique file name in IDL?
- Help me solve my GridData conumdrum.
- How does one get a graphics window sized “just right” in IDL?
- How can I write machine or version specific code in IDL?
- How can I automatically choose a threshold to separate a bimodal pixel population?
- Can you show me how to grid points onto the surface of a sphere?
- How can I calculate data percentiles in IDL?
- Is there a way to speed up File_Search on Windows network shares?
- I've heard it is possible to increase the speed of Krig2D by an order of magnitude. Is this true?
- How can I calculate a confidence level for the correlation coefficient?
Useful Tricks
- How do I delete or undefine a variable?
- Can you show me a simple way to reverse the order of the even rows in a 2D array?
- Is there a way to discover programatically what module I'm in and where that module is located?
- How can I determine if IDL is running on an 8-bit or 24-bit display?
- Is it possible to find the maximum in each row of a 2-D array without using a FOR loop?
- How do I dynamically delete an element from an array?
- How can I locate a file in a different directory structure from my own?
- How can I delete all my IDL session variables?
- Is it possible to delete all my compiled procedures and functions?
- How do I get rid of floating point underflow error messages?
- How do I create sequentially numbered file names?
- PV-WAVE had a nifty HAK (Hit Any Key to Continue) program. Does such a thing exist in IDL?
- What is an efficient way to perform string substitutions in IDL?
- How do I find the value of a particular bit in a number?
- How can I convert a day-of-year number to a month and day number?
- How can I create a blank string of a particular length?
- How can I convert date strings to Julian numbers in IDL?
- How can I convert a 24-bit number to three 8-bit numbers?
- How can I prevent dividing by zero in my IDL code?
- How can I partition array values into colors for display?
- How can I convert WHERE output to image subscripts?
- Avoiding asterisks in array expressions is how much faster in IDL?
- Whoa! Does is take, like, a ton of memory to subscript arrays in IDL?
- When does it make sense to use the Temporary function?
- How can I store a value in a structure when I have a pointer to an array of structures?
- Is it kosher to use thin plate splines to correct data?
- How can I determine if the machine IDL is running on has a display?
- How can I add a new field to an array of structures in IDL?
- How can I replicate a pointer field in an array of structures so that the pointers don't all point to the same thing?
- Can you show me how to sort sequentually numbered files in IDL?
- How can I create an evenly spaced vector in log space?
- Is there a way to tell if IDL is running from the Workbench instead of a terminal?
- How can I add Poisson noise to an image in IDL?
- How can I extract a circular region from an image?
- What is the best way to create multiple plots in IDL?
- What is the fastest way to do distance calculations in IDL?
- How can I make the maximum and minimum operators work nicely with NaNs?
- How can I rebin an array containing missing data?
- How can I determine the tag names and types of internal objects like the IDLitComponent object?
General Programming Tips
- I'm having trouble concatenating structures into an array. Can you help?
- Is there a general way extract a field from a structure when the field name is a variable?
- I'm having trouble sorting my data set. Can you help?
- Does the Sort command sort correctly?
- How can I find the size of a structure in bytes?
- How can I make my computer beep progammatically?
- How can I tell if a keyword was used in my program?
- How can I access or set IDL main-level variables from within a procedure or function?
- How do I get the screen size of a remote display?
- How can I find the perimeter or convex hull around a set of points?
- How can I make multiple line dialog messages?
- How can I create an angstrom symbol(Å) in IDL?
- How can I repair the damage to my graphics window in IDL?
- Can I get HELP on just the variables, without all that other nonsense?
- Is there such a thing as a null array in IDL?
- How do I handle data that is given in units of "hours since 0001-01-01"?
- Can I use shared memory with the IDL_IDLBridge?
- How can I make a scalar value of a particular data type at run-time?
- How can I determine if two floating-point arrays are equal?
- How can I make a checkerboard image in IDL?
- How do I create an array to arrays with variable numbers of elements?
- Dealing with array subscripting particularities.
- How can I add a new field to an anonymous structure array in IDL?
- How can I scale image data for display so that zero is in the middle of the data range?
- How can I create a float from two integers, using the second integer as the decimal part of the first?
- Can you show me how to display a function of two variables as an image?
- Can you show me how to interpolate flux to a regular wavelength?
- Can you show me how to pack floating point numbers into a byte array and read them back out again?
- What do you know about the discrete cosine transform (DCT)?
Copyright ©
1996–2018 Fanning Software Consulting, Inc.
Last Updated: 15 December 2012