NSLS-II-PDF / profile_collection

Collection profile
0 stars 4 forks source link

Add a simple plot_image() function #1

Open mrakitin opened 6 years ago

mrakitin commented 6 years ago

Here is a simple plotting function for visualizing the images. Usage:

plot_image('/SHARE/user_data/2018-1/302316/bgsub/Ni_Standard_PDF_DataSet_1_0.1653_83_21.15925_bgsub.tiff', clim=(0, 100))

Attn @jrmlhermitte @milinda2014

jrmlhermitte commented 6 years ago

this looks good! Do we still need this with the image plotter? If we use it, I might suggest using a tool to choose min max according to a histogram. I usually use something like this here. I think in general it would be nice to have a histogram widget that plots a histogram of an image that would allow a user to select limits themselves, like pyqtgraph. I wonder if it's worth adding in matplotlib, or do some searching

mrakitin commented 6 years ago

I think my implementation is too simple 😃. We may need to use the CrossSection class from xray-vision, which would add a color bar, and cross-hair with corresponding interactive plots. vmin/vmax can be supplied either via the kwargs, or via a menu in the MPL window. Your option may be a useful addition! But it's probably worth to add it to xray-vision rather than to this beamline-specific profile.