; helper procedures pro show_window, image, TARGET_DIMS=target_dims ; get dims dims = size(image,/dimensions) if not keyword_set(target_dims) then target_dims = dims ; rebin image_rescaled = congrid(image, target_dims[0], target_dims[1]) ; print information about rebinned image help, image_rescaled ; load colour table loadct, 5 ; make a new window window, /free, xs=target_dims[0], ys=target_dims[1] ; plot map tv, image_rescaled end ; ============ ; main pro ; ============ pro plot_image, FILENAME=filename, DATSETNAME=datasetname ; handle keywords if not keyword_set(filename) then filename = 'EXTREME_proj_xy_000100' if not keyword_set(datasetname) then datasetname = 'dens_proj_xy' ; read HDF5 data readhdf5data, filename, datasetname, data ; reform array to make it 2D data = reform(alog10(data)) ; get the dimensions of the data dims = size(data,/dimensions) ; byte scale data from min to max image = bytscl(data, min=min(data), max=max(data)) ; show full resolution image show_window, image ; show half resolution image show_window, image, target_dims=dims/2 ; show image scaled to arbitrary resolution show_window, image, target_dims=[1024,1024] ; show image scaled to arbitrary resolution show_window, image, target_dims=[1024,768] stop return end