unidec.modules.gui_elements package

Submodules

unidec.modules.gui_elements.CDMenu module

class unidec.modules.gui_elements.CDMenu.CDMenu(parent, config, pres, tabbed, htmode=False)

Bases: Menu

add_to_recent(file_path)
load_example_data(pos)
menu_501_503(event)

Menu function to adjust the intensity scale. :param event: wx Event :return: None

menu_601_602(event)

Menu function to adjust the intensity scale. :param event: wx Event :return: None

on_custom_defaults(e)
on_defaults(e)

Resets the configuration to a default predefined in the unidecstructure file. :param e: Menu event :return: None

on_example_data(e)
update_recent()

unidec.modules.gui_elements.CDWindow module

class unidec.modules.gui_elements.CDWindow.CDMainwindow(parent, title, config, iconfile=None, tabbed=None, htmode=False)

Bases: MainwindowBase

Main UniDec GUI Window.

setup_main_panel()

Lays Out Main Panel. Binds some functions to presenter. :return: None

class unidec.modules.gui_elements.CDWindow.MyFileDropTarget(window)

Bases: FileDropTarget

OnDropFiles(x, y, filenames)

When files are dropped, either open a single file or run in batch.

unidec.modules.gui_elements.CD_controls module

class unidec.modules.gui_elements.CD_controls.main_controls(parent, config, pres, panel, iconfile, htmode=False)

Bases: Panel

bind_changes(e=None)
export_gui_to_config(e=None)

Exports parameters from the GUI to the config object. :return: None

import_config_to_gui()

Imports parameters from the config object to the GUI. :return: None

on_b_select(e)
on_check_smash(e)

Checks the configuration to see if values for noise smashing are set. If they are not, it opens the window to set the smash assignments. :param e: Dummy wx event passed on. :return: None

on_collapse_all(e=None)
on_expand_all(e=None)
on_expand_blue(e=None)
on_expand_main(e=None)
on_expand_red(e=None)
on_expand_yellow(e=None)
on_m_smooth(e)
on_mousewheel(e)
on_p_select(e)
on_z_smooth(e)
setup_tool_tips()

Sets Tool Tips for items on the Main Panel :return: None

update_demultiplex_mode(e=None)
update_quick_controls(e=None)

unidec.modules.gui_elements.ChromWindow module

class unidec.modules.gui_elements.ChromWindow.ChromDropTarget(window)

Bases: FileDropTarget

OnDropFiles(x, y, filenames)

When files are dropped, either open a single file or run in batch.

class unidec.modules.gui_elements.ChromWindow.ChromWindow(parent, title, config=None, iconfile=None, *args, **kwargs)

Bases: MainwindowBase

clear_plots(e=None)
export_gui_to_config()
on_motion(xpos, ypos)

Triggered by pubsub from plot windows. Reports text in Status Bar. :param xpos: x position fed from event :param ypos: y position fed from event :return: None

unidec.modules.gui_elements.HTCD_ListCtrls module

class unidec.modules.gui_elements.HTCD_ListCtrls.ListCtrlPanel(parent, pres, size=(200, 400))

Bases: Panel

get_selected()
on_popup_eleven(event)
on_popup_five(event)
on_popup_four(event)
on_popup_one(event)
on_popup_seven(event=None)

Spawns a dialog for the first selected item to select the color. Redraws the list control with the new colors and then triggers an EVT_DELETE_SELECTION_2. :param event: Unused Event :return: None

on_popup_six(event=None)
on_popup_ten(event=None)
on_right_click(event)
class unidec.modules.gui_elements.HTCD_ListCtrls.YValueListCtrl(parent, id_value, config=None, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=0)

Bases: ListCtrl, ListCtrlAutoWidthMixin, TextEditMixin

clear_list()
get_data()
populate(cc)
repopulate(reset=True)
translate_selection(sindex)

unidec.modules.gui_elements.mainwindow_base module

class unidec.modules.gui_elements.mainwindow_base.MainwindowBase(parent, title, config, iconfile=None, tabbed=None)

Bases: Frame

Main UniDec GUI Window.

bind_peakpanel(meta=False)

Bind peakpanel events to presenter functions. :return:

clear_all_plots(flag=0)

Clear All Plots :return: None

clear_plots(flag=0)
export_gui_to_config()
import_config_to_gui()
launch()
onFocus(event)
onIdle(event)

On Idle, check if a resize has occured

onResize(event)

On resize, replot the data

on_about(e)

Displays message about program :param e: :return:

on_defaults(e)
on_exit(e=None)

Exit the Program :param e: Dummy wx event :return: None

on_motion(xpos, ypos)

Triggered by pubsub from plot windows. Reports text in Status Bar. :param xpos: x position fed from event :param ypos: y position fed from event :return: None

on_open_dir(e)
on_save_figure_dialog(e)

Open dialog box to set the parameters for figure type, size, and path to save. :param e: Dummy wx event :return: None

on_save_figure_eps(e)

Save all figures as EPS :param e: Dummy wx event :return: None

on_save_figure_pdf(e)

Saves all figures as PDF :param e: Dummy wx event :return: None

on_save_figure_png(e, **kwargs)

Save all figures as PNG :param e: Dummy wx event :param kwargs: keywards to pass to matplotlib savefig :return: None

on_save_figure_small(e)

Preset to shrink figures to 4.5 in by 3 in and save as PDF. :param e: Dummy wx event :return: None

reset_zoom(e=None)

Reset zoom on all plots. :param e: wx Event :return: None

resize()
save_all_figures(extension, extension2='', e=0, header=None, **kwargs)

Save All of the Figures. Will name as header+extension2+_FigureX.+exetension :param extension: Figure type (pdf, eps, png). Anything accepted by matplotlib :param extension2: Additional text to include in the figure header. :param e: Dummy wx Event :param header: Option to add different header. Default of none yields self.outfname as the path header :param kwargs: Any keywards to pass to the matplotlib savefig command such as Transparent or DPI :return: figureflags, files (the figures that were successfully saved and the files that they were saved to)

setup_shortcuts(keys)

Setup shortcuts in GUI. Binds key combinations to functions in presenter (self.pres) :return: None

shrink_all_figures(figsize=None, rect=None)

Shrinks all figures to the size specified in self.figsize :return: A list of plot objects that we shrunk

shrink_figure(plot, figsize=None, rect=None)

Automatically shrinks the plot to a figure size in inches set in self.figsize. :param plot: Plot object to shrink :return: None

unidec.modules.gui_elements.peaklistsort module

class unidec.modules.gui_elements.peaklistsort.PeakListCtrlPanel(parent, meta=False, size=(300, 1100))

Bases: Panel, ColumnSorterMixin

Creates a list control panel for displaying and interacting with Peaks object

GetListCtrl()
add_data(pks, show='area', collab1='Mass (Da)')

Add data from a Peaks object to the list_ctrl :param pks: Peaks object :param show: Keyword describing what to show in column 1

area = p.area integral = p.integral diff = p.diff

Parameters:

collab1 – Column 1 label

Returns:

None

clear_list()

Remove all elements from list_ctrl :return: None

fix_text_color()
on_column_click(event)
on_popup_color_peaks(event=None)

Gets the selected items and adds it self.selection2. Triggers EVT_COLOR_PEAKS. :param event: :return:

on_popup_color_peaks_all(event=None)

Gets the selected items and adds it self.selection2. Triggers EVT_COLOR_PEAKS. :param event: :return:

on_popup_consec_diff(e=None)
on_popup_eight(event=None)

Hides the error stuff brought up by on_popup_seven :param event: :return:

on_popup_eleven(event=None)

Gets the selected items and adds it self.selection2. Triggers EVT_MASSES. :param event: :return:

on_popup_five(event=None)

Spawns a dialog for the first selected item to select the color. Redraws the list control with the new colors and then triggers an EVT_DELETE_SELECTION_2. :param event: Unused Event :return: None

on_popup_four(event=None)

Gets the selected items and adds it self.selection2. Triggers EVT_CHARGE_STATE. :param event: :return:

on_popup_image(e=None)
on_popup_label_areas_all(event=None)

Gets the selected items and adds it self.selection2. Triggers EVT_AREAS. :param event: :return:

on_popup_label_areas_select(event=None)

Gets the selected items and adds it self.selection2. Triggers EVT_AREAS. :param event: :return:

on_popup_label_names_all(event=None)

Gets the selected items and adds it self.selection2. Triggers EVT_NAMES. :param event: :return:

on_popup_label_names_select(event=None)

Gets the selected items and adds it self.selection2. Triggers EVT_NAMES. :param event: :return:

on_popup_nine(e=None)

Changes the marker

on_popup_one(event=None)

The selected peaks are added to self.selection and deleted. For each delete peak, p.ignore is set to 1. Triggers EVT_DELETE_SELECTION_2. :param event: Unused Event :return: None

on_popup_rename(e=None)
on_popup_scorecolor(e=None)
on_popup_seven(event=None)

Replaces the third and fourth columns with the FWHM and mean errors. :param event: :return:

on_popup_six(event=None)

Triggers EVT_DIFFERENCES. The first selected item becomes the reference mass. The difference between all masses and the reference mass is calculated and displayed in column 3. :param event: Unused Event :return: None

on_popup_ten(event=None)

Gets the selected items and adds it self.selection2. Triggers EVT_MASSES. :param event: :return:

on_popup_three(event=None)

Repopulates the list control with all elements in self.pks.peaks. :param event: Unused event :return: None

on_popup_twelve(e=None, type='Basic')
on_popup_twelve_full(e=None)
on_popup_two(event=None)

The selected peaks are added to self.selection. All other peaks are deleted form list ctrl and p.ignore for each is set to 1. Triggers EVT_DELETE_SELECTION_2. :param event: Unused Event :return: None

on_right_click(event=None)

Spawn right click menu :param event: Unused Event :return: None

class unidec.modules.gui_elements.peaklistsort.SelectMarker(*args, **kwargs)

Bases: Dialog

initialize_interface(pks, index)
Returns:

None

on_close(e)

Close the window. :param e: Event :return: None

unidec.modules.gui_elements.peaklistsort.tofloat(string)

unidec.modules.gui_elements.ud_controls module

class unidec.modules.gui_elements.ud_controls.main_controls(parent, config, pres, panel, iconfile)

Bases: Panel

bind_changes(e=None)
export_gui_to_config(e=None)

Exports parameters from the GUI to the config object. :return: None

import_config_to_gui()

Imports parameters from the config object to the GUI. :return: None

on_b_select(e)
on_backcheck(e)
on_check_manual(e)

Checks the configuration to see if values for manual mode are set. If they are not, it opens the window to set the manual assignments. :param e: Dummy wx event passed on. :return: None

on_check_smash(e)

Checks the configuration to see if values for noise smashing are set. If they are not, it opens the window to set the smash assignments. :param e: Dummy wx event passed on. :return: None

on_collapse_all(e=None)
on_double_dec(e)

Sets the DoubleDec flag in the config to the appropriate value :param e: Dummy wx event. Unused. :return: None

on_expand_all(e=None)
on_expand_blue(e=None)
on_expand_main(e=None)
on_expand_red(e=None)
on_expand_yellow(e=None)
on_m_smooth(e)
on_mass_list(e)

Checks the configuration to see if values for the mass list are set. If they are not, it opens the window to set the mass list. :param e: Dummy wx event passed on. :return: None

on_mousewheel(e)
on_open_kernel(e)

Opens a kernel file and saves the path in the config. The button text is also updated to match. Note that the user is supposed to select the raw m/z file–the corresponding mass file will be found if it exists. This way, possible file naming issues are avoided. :param e: Triggering event. Unused. :return: None

on_p_select(e)
on_pw_check(e)
on_z_smooth(e)
setup_tool_tips()

Sets Tool Tips for items on the Main Panel :return: None

update_quick_controls(e=None)

unidec.modules.gui_elements.ud_menu module

class unidec.modules.gui_elements.ud_menu.main_menu(parent, config, pres, tabbed)

Bases: Menu

add_to_recent(file_path)
load_example_data(pos)
menu_4001(event)
menu_401_403(event)

Menu function to adjust the UniDec core function (agreesiveflag). :param event: wx Event :return: None

menu_501_503(event)

Menu function to adjust the intensity scale. :param event: wx Event :return: None

on_custom_defaults(e)
on_defaults(e)

Resets the configuration to a default predefined in the unidecstructure file. :param e: Menu event :return: None

on_example_data(e)
update_recent()

Module contents