This allows IDL to have access to a decent colorbar and a set of good qualitative colors simultaneously, which is surprisingly difficult in vanilla IDL. These colors are taken from a colorbrewer qualitative scheme ( ), supplemented with some unsaturated grays. #IDL REBIN SERIES#By contrast, the new colorbars are perceptually uniform, colorblind friendly, and print correctly in black and white.Īlso included is a series of routines to read in RGB colorbars from CSV files and load them into the current colortable, along with a series of qualitative colors. Aside from the monochromatic and colorbrewer color bars, almost all IDL colorbars suffer from extreme deficiencies in perceptual uniformity and colorblind friendliness. png files located in the IDL_py_png directory, which apply the python-based sequential colormap analysis tools to the IDL builtin maps. These colorbars are better than most of the builtin IDL default colorbars. Included is a new IDL colortable file with the new Matplotlib perceptual colorbars, as designed by Stéfan van der Walt and Nathaniel Smith ( ). #IDL REBIN PDF#These slides are also included as a PDF file in this repository. To learn more about why to use perceptually uniform color maps, as opposed to the more typical rainbow color map ubiquitous in science, look at these slides I made, as well as the embedded references. Here, the sampling ratio is ( n - 1)/( m - 1).This repository is designed to get decent colormaps into IDL. For example, to produce 12 equally spaced interpolates from the interval 0 to 30: B = INTERPOLATE(A, 3./ 11. If this effect is undesirable, use the INTERPOLATE function. Note that the last element is repeated three times. The last m/n points of the result are obtained by duplicating element n-1 of the input array because their interpolates would lie outside the input array. Each of the n-1 intervals in the n-element input array produces m/n interpolates in the m-element output array. When expanding an array, REBIN interpolates, it never extrapolates. The various resizing options can be described as: Let f = n/m, the ratio of the size of the original vector, X to the size of the result. Rules Used by REBINĪssume the original vector X has n elements and the result is to have m elements. Bilinear interpolation gives higher quality results but requires more time. Set the SAMPLE keyword to use nearest neighbor sampling for both magnification and minification. Normally, REBIN uses bilinear interpolation when magnifying and neighborhood averaging when minifying. Note: The dimensions of the resulting resampled array must be integer multiples or factors of the corresponding original dimensions. If multiple arguments are specified, they must all be scalar expressions. If a single argument is specified, it can be either a scalar expression or an array of up to eight elements. D iĮither an array or a series of scalar expressions specifying the dimensions of the result. Array can be of any basic type except complex or string. Returns the resized array or vector of the specified dimensions. Result = REBIN( Array, D 1 ) Return Value im2 = IMAGE(rebinIm, RGB_TABLE= 28) Syntax im = IMAGE(convec_image, RGB_TABLE= 28) Use the REBIN function to increase the image array size to three times the original size rebinIm = REBIN(convec_image, 744, 744) Display the resized image in a new window with a color table. convec_image = READ_BINARY(file, DATA_DIMS = ) Use the IMAGE function to display the original image with a color table. file = FILEPATH( 'convec.dat', SUBDIRECTORY = ) Use READ_BINARY to read in the data, specifying known data dimensions. Resize the image to be 5 times its original size and display the result by entering: D = REBIN(D, 250, 250) im = IMAGE(D)ĭisplay an image array in the original size, then use REBIN to enlarge it: Select the file. ExamplesĬreate and display a simple image by entering: D = SIN( DIST( 50)/ 4) im = IMAGE(D) If the dimensions of the desired result are not integer multiples of the original dimensions, use the CONGRID function. The expansion or compression of each dimension is independent of the others, so that each dimension can be expanded or compressed by a different value. The supplied dimensions must be integral multiples or factors of the original dimension. The REBIN function resizes a vector or array to dimensions given by the parameters D i.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |