spec_analysis.app

The app module defines the objects and logic that drive the graphical interface. It includes dedicated classes for each application window, and a run function for launching the GUI application. For usage examples, see the GettingStarted_ guide.

API Documentation

spec_analysis.app.run(spectra_iter, out_path, config)[source]

Run the graphical interface

Parameters:
  • spectra_iter (SpectraIterator) – Iterator over the data to measure
  • out_path (str) – Name of CSV file where results are saved
  • config (dict) – Application config settings

GUI Classes

class spec_analysis.app.MainWindow(spectra_iter, out_path, config)[source]

The run_sako18spec window for visualizing and measuring spectra

__init__(spectra_iter, out_path, config)[source]

Visualization tool for measuring spectroscopic features

Parameters:
  • spectra_iter (SpectraIterator) – Iterator over the data to measure
  • out_path (str) – Name of CSV file where results are saved
  • config (dict) – Application config settings
calculate()[source]

Logic for the calculate button

Measure the current spectral feature and store to the feature_measurements attribute.

clear_feature_fits()[source]

Clear any plotted feature fits from the plot

clear_plotted_pew(clear_single=False)[source]

Clear any plotted feature boundaries from the plot

Parameters:clear_single (bool) – Clear only the current feature (False)
current_feat_def

The definition of the current feature as a dict

current_feat_name

The name of the current feature

finished()[source]

Logic for the finished button

Skip inspection for all features in the current spectrum

last_feat()[source]

Logic for the last feature button

Skip inspection for the current feature

next_feat()[source]

Logic for the next feature button

Skip inspection for the current feature

plot_saved_feature()[source]

Clear any plotted feature boundaries from the plot

reset_plot()[source]

Reset the plot to display the current spectrum with default settings

Auto zooms the plot and repositions plot widgets to their default locations.

save()[source]

Logic for the save button

Save current feature measurements to internal DataFrame.