Update txsgui Diff Plot
This Merge Request builds on (and includes) MR !12 (merged) and adds a plot widget to display the diffs that supports updates and user interaction.
It also makes some changes to txsgui.py/.ui
to make it work with current txs
version.
Some screeshots:
The parameters I used with ./txs/tests/sample_data/bliss/dye1/dye1_0002/scan0012
data for testing it:
txsgui_pars.ini
And the patch for mocking a "live" update of the data:
+++ b/txs/live.py
@@ -41,7 +41,7 @@ def ana(folder, ref_delay, ai=None, extension='h5', qnorm=None, qlim_azav=None,
norm=None, qlim_datared=None, shots=None, use_ratio=False,
red_chi2_max=None, pts_perc_max=None, log='id09', do_azav=True,
do_datared=True, sleep_azav=0.5, sleep_datared=0.1, sleep_save=1,
- sleep_loop=10, plot=False, track_abs=False, track_diff=False,
+ sleep_loop=1, plot=False, track_abs=False, track_diff=False,
track_diff_t='last', qmon=None, result_callback=None,
track_abs_qmon=None, track_diff_qmon=None,
progress_callback=None, debug=False, verbose=True):
@@ -223,6 +223,13 @@ def ana(folder, ref_delay, ai=None, extension='h5', qnorm=None, qlim_azav=None,
return_fnames=True,
verbose=True)
+ # patch to load file one by one:
+ if len(fnames) > 1:
+ imgs, fnames = load_images(folder, extension=extension,
+ exclude=([] if exclude is None else list(exclude)) + list(fnames[1:]),
+ return_fnames=True,
+ verbose=True)
+
if len(imgs) == 0:
if first_attempt: