0
votes

I have a dataset of 2D greyscale images (50 x 50 pixels) taken over a time period. As a means of analysing these images I want to take a slice - the central column of pixels from each image - and 'plot' these as a time series. So that I end up with time on the x-axis, and the column of pixels corresponding to that time vertically above it. (I appreciate this might not be entirely clear, so please let me know if anything needs clarifying).

I'm not sure how this can be achieved in IDL. I can easily pick out the central slice from each image and combine them into a new array, which I then display with TVSCL. This is the sort of thing I'm after, but since the data is not taken at regular time intervals, just bunching it all up into one new image doesn't represent the data properly. I really need a way of displaying the data as a scaled time series.

Can anyone suggest a way of doing this in IDL? If you need any more details please just let me know.

Thanks

2

2 Answers

1
votes

I think you're looking for something similar to a Hovmoller diagram (http://en.wikipedia.org/wiki/Hovm%C3%B6ller_diagram).

Your best bet is probably to use a contour plot, where you can specify the X and Y locations. Something like:

c = CONTOUR(data, time, ylocation)

where data is your 2D array of slices, time is a vector with the time values (which can be irregularly spaced), and ylocation is another vector with the y locations. There are a lot of properties on CONTOUR to control fill/not filled, contour levels, labels, etc.

Hope this helps! -Chris

0
votes

It's hard to write without knowing how your data is stored, but let's say you have your images in something like:

images = fltarr(xsize, ysize, ntimes)
times = fltarr(ntimes)

Then you could plot a time series of the values at any pixel x, y with:

plot, times, images[x, y, *]