Skip to content

README

The purpose of the GUI is to aid in the visualization and characterization of field emission from linac cavities. This collection of scripts is to generate the appropriate data files, update, and run the field emission GUI.

Radiation data is collected by one of two decarads with 10 channels each and is recorded in the archiver. The display works to end dependency on slow archiver retrieval as well as consolidating data to one base.

The collection consists of:

GUI Suite

  • field_emission_data.hdf5: storage file for all cryomodule amplitude and radiation data where the first column of each dataset is cavity amplitude and remaining columns are measurements for radiation channels 1-10. Columns are numerical and match the decarad channel.

NOTE: HDF5 file lives in the package directory (_DATA_DIR). This works because scripts are run from shared repo, not a pip-installed wheel. If the install model ever changes, review constants.CSV_OUTPUT_DIR and constants.H5_PATH to use a writable, per-user location (utils/platform_paths).

  • field_emission_gui.py: read-only version of the display, intended for public use. No direct access to core .h5 file. This version makes no use of additional scripts.

  • field_emission_gui_update.py: display with addition of "Add New Data" button. Included to ease process of updating core .h5 file with the availability of new field emission data.

  • measurements.py: called by field_emission_gui.py for data matching with .hdf5 file.

  • plot_me.py: called by field_emission_gui.py for plotting. Contains the fit_equation method, to be further adjusted for improved fit line.

Additional Scripts

  • amp_vs_radiation_from_csv.py: takes start and end time data to find radiation during active cavity session. Necessary for gui_updater use. Contains the align_pvs_to_common_time method, used to give common timebase between process variables which may have inconsistencies in time data.

  • gui_updater.py: worker to update gui. Validator for single entry data and csv reader for multiple data entry.

  • update_h5py.py: converts CSV files with amplitude vs radiation data (generated by amp_vs_radiation.py) to hdf5 additions in the main field_emission_data.hdf5 file.

To Add Data

Currently, addition of cryomodule data can be achieved with the "Add New Data" button at the top right of the field_emission_gui_update.py display. Data can be added individually, by cryomodule, or by CSV for multiple entries. If using CSV, though actual header names can be anything, columns should be written in the following order:

"Cryomodule, Start Date, Start Time, End Date, End Time, Decarad #, Link to Measurement, Notes, Recharacterization, Multipacting, Commissioning"

After successful update, select any other cryomodule in the display. Click back to the cryomodule of interest and the new data should be reflected in the GUI.

NOTE: CSV reader is written with the expectation of a header row in multi-entry CSV.

NOTE: Including "#" in the first column of a row will exclude it from h5 conversion.

NOTE: A column should be included for end date in the case of overnight operation where the start date and end date will not be the same (albeit only one day apart), regardless of if that column has data.

Possible Additional Work to Be Done

  • Extra filter for measurement characteristics: columns have been included in csv reader and gui handler for additional filtering of cryomodule data (recharacterization/multipacting/commissioning). They are also included as dataset attributes in the .h5 file. Reflection in display (possibly) necessary.

  • Overlapping Plots: due to time constraints, the ability to overlap data for further comparison has been excluded. If added, this ability can become a radio button setting in addition to the Amplitude vs Radiation and Fit Line toggles above the Plot button.

Entry point

sc-field-emission # included in launchers.py but not initiated yet