camelot-project / frontend

The frontend: The web-facing server software for CAMELOT
BSD 3-Clause "New" or "Revised" License
2 stars 14 forks source link

Plotting tracks in parameter space for simulations. #87

Open jimdale opened 9 years ago

jimdale commented 9 years ago

I've been experimenting with how show tracks of simulations in param space - I attach a plot with four alternatives. Top left panel is just doing what we are doing already, except I have two versions of the same simulation - no feedback in blue, feedback in red - at about 12 different timesteps, observed from 24 different angles. Choosing one angle and plotting all 12 timesteps seen from that angle defines a single track. The problem is, even if everyone agrees to always use the same time interval between dumps, the plot is misleading. To be useful, it needs to give an idea of how likely any timestep seen from any angle is to fall at a given location in param space, so the plot needs to be weighted by how many tracks pass through a given point and how long they spend there. All three other plots do this. By breaking each track into segments and knowing the timestamps at the start and end of each segment, one can weight the segment by how long the simulation spends on it - darker areas now mean more tracks spend more time at that location. Top right shows a pixelated image, bottom left shows a rendered contour image, bottom right shows a lined contour image. I'm inclined to prefer the bottom left. However, there is still no indication of in which direction simulations move in time. Comments welcome....

simulation_tracks

keflavich commented 9 years ago

I think mpld3 supports contours but nothing else, so that should be one motivation to go with contours.

In order to display any of this usefully, I think we'll need some major enhancements to the plotter.

One in particular that would be useful: if we could get the d3 plot to use the data that is in the table shown on the same page. That would save a factor of 2 in data size and would also enable searching to produce differences in the plot.

jimdale commented 9 years ago

Good - the contours look better anyway, as long as they can be shown as patches and not just lines - I'll have to see if mpld3 can do that, unless anyone knows off the top of their head?

snlongmore commented 9 years ago

Hi Jim,

Nice! I also like the bottom left one best. As you say, the top left panel is very misleading.

Sorry, no idea if mpld3 can do that.

Steve

e-koch commented 9 years ago

Nice! I like the bottom left as well.

I went through the basic mpld3 test with contours. It's maybe a bit primitive wrt to say the scatter plots, but it will certainly work.

I think this will require a close to full rewrite of how the plotting is done, but I don't think it will be too awful. Some rethinking of how we represent one simulation track with the hover tool is needed. I think overlap becomes a real issue here and I'm unsure of how we can distinguish the tracks such that the hover tool even makes sense.

Another thought, could tracks be represented via a line? The 'density' could be represented by doing a rough binning in the plane and representing it by the width of the line. Direction could be represented by using 2 scatter points of different styles to represent the beginning and end of the lines. The hover points would then be attached to those points and would represent the info for the entire track. This may not look very good... also I'm not sure how informative it would be if the track doesn't have at least a portion which follows a clear path in the plane.