Open astrofrog opened 7 years ago
I know this is an old open issue, but I'd like to add my quick +1. Mapping a Chandra event list to an image really requires proper 2D histogram functionality. See below, for example, for a great use case, in which I map structures in Chandra/HRC three-tap amplitude space to what I'd like to be a real sky image. Without 2D histogram functionality, this is more difficult.
@granttremblay - just to check, in your case, would the histogram be made by adding the amplitudes of all the photons? Or does each photon count equally?
Just for info, the latest developer version of glue includes a way to make density maps and adjust the DPI to effectively make 2D histograms. If you have a third quantity, you can color-code by the average value in each bin (but not yet the sum)
@astrofrog To make an Chandra "image" from an event list, it's simply the number of events per pixel, so a pure 2D histogram made of sums.
For example, if data
is a table read from a Chandra events list, one would make an "image" from that events list with:
nbins = (300,300)
plt.hist2d(data['x'], data['y'], nbins)
Also, thanks for the info re: the developer version. If you could simply color code by sum of values in each bin, that would indeed be exactly what's needed.
@granttremblay - you can try the latest dev version with conda if you like:
conda install -c glueviz -c glueviz/label/dev glueviz
Currently you can color code by the counts in each bin, but not weighted counts. Give it a try!
We should implement a 2D histogram viewer