Create scope like program -- CLI version

Issue #10 new
Arun Persaud created an issue

Create a command line program (using import cmd) where one can set:

  • module
  • channel (perhaps the channel command should take 2 argument, <channel number> and <name>, so that the <name> can be used when we save data)
  • Fast filter: L, G, threshold
  • Energy filter: L, G, tau, peaksample
  • CFD: w, L, G, D, CFD_treshold
  • CFD on/off
  • Coincidence on/off

The program should also have an option to

  • load a setting file
  • list all above settings for this channel
  • start an MCA run (N seconds)
  • take list mode data (N seconds)
  • Or perhaps always do both or perhaps do list mode only once and skip it when doing repeat measurements.
  • option to save data and plots (plots should be annotated with metadata from above + date+ git version, etc.), plots should perhaps be separate windows (or a plt.subpots(2,1)) for MCA and listmode.
  • clear plots
  • remember plots and plot in gray for easy comparison (e.g. whenever we save data, we should also copy the data into a data structure, say old_data = […]), so that we then can do issue commands like “plot add 3” or “plot remove 3”, where 3 would be the 3rd saved datafile of this run

Behavior:

  • The program then takes either MCA data and displays it in matplotlib window. taking more data should always add it to the spectra.
  • Taking list mode data should take data for 5s, select several traces by amplitudes, so that we get a good distribution, e.g. 2% of max, 10% of max, 20% of max, etc. The traces should be plotted. Taking more data doesn’t really make sense, unless there are not enough traces to get a good sample.
  • Changing any setting should directly call the pixie16 settings structure and clear the plots

Implementation:

  • should re-use code from binary browser (functions to create plots)
  • Perhaps just start with energy option first.

Comments (0)

  1. Log in to comment