nomad_camels.frontpanels package

Subpackages

Submodules

nomad_camels.frontpanels.instrument_config module

class nomad_camels.frontpanels.instrument_config.Instrument_Config(active_instruments=None, parent=None)

Bases: Ui_Form, QWidget

add_instance()
build_table()
get_all_names()
get_config()
get_current_config()
name_config_changed(new_name)
Parameters:

new_name

remove_instance()
show_hide_info()
staticMetaObject = PySide6.QtCore.QMetaObject("Instrument_Config" inherits "QWidget": )
table_click()
toggle_info_hidden()
update_channels()

Called when the active devices change. The channels in variables_handling are updated with the ones provided by the active devices.

nomad_camels.frontpanels.instrument_installer module

class nomad_camels.frontpanels.instrument_installer.CustomTextEdit_new_painter

Bases: QTextEdit

Custom QTextEdit that paints custom text when the text is empty.

paintEvent(self, e: PySide6.QtGui.QPaintEvent) None
staticMetaObject = PySide6.QtCore.QMetaObject("CustomTextEdit_new_painter" inherits "QTextEdit": )
class nomad_camels.frontpanels.instrument_installer.Info_Widget(parent=None)

Bases: QSplitter

staticMetaObject = PySide6.QtCore.QMetaObject("Info_Widget" inherits "QSplitter": )
update_texts(instr)
class nomad_camels.frontpanels.instrument_installer.Install_Thread(devs, uninstall=False, parent=None)

Bases: QThread

info_step
run()
staticMetaObject = PySide6.QtCore.QMetaObject("Install_Thread" inherits "QThread": Methods:   #12 type=Signal, signature=info_step(QString), parameters=QString   #13 type=Signal, signature=val_step(int), parameters=int )
val_step
class nomad_camels.frontpanels.instrument_installer.Instrument_Installer(active_instruments=None, parent=None)

Bases: Ui_Form, QWidget

build_table()
checkBox_change(row)
Parameters:

row

get_checked_devs(ignore_version=False)
Parameters:

ignore_version – (Default value = False)

install_selected(uninstall=False)
Parameters:

uninstall – (Default value = False)

instruments_updated

param parent: handed over to QWidget. :type parent: QWidget

select_all()
select_none()
show_hide_info()
staticMetaObject = PySide6.QtCore.QMetaObject("Instrument_Installer" inherits "QWidget": Methods:   #33 type=Signal, signature=instruments_updated() )
table_click()
thread_done()
uninstall_selected()
update_installed()
nomad_camels.frontpanels.instrument_installer.getAllDevices()

So far only returns the installed devices, should in future work with the online repository of drivers.

nomad_camels.frontpanels.instrument_installer.getInstalledDevices(force=False, return_packages=False)

Goes through the given device_driver_path and returns a list of the available devices.

Parameters:
  • force – (Default value = False)

  • return_packages – (Default value = False)

nomad_camels.frontpanels.instrument_installer.get_instr_license_text(instr_name)
nomad_camels.frontpanels.instrument_installer.get_instr_readme_text(instr_name)
nomad_camels.frontpanels.instrument_installer.install_instrument(device_name)
Parameters:

device_name

nomad_camels.frontpanels.manage_instruments module

class nomad_camels.frontpanels.manage_instruments.ManageInstruments(active_instruments=None, parent=None)

Bases: QDialog

accept() None
closeEvent(a0: QCloseEvent) None
Parameters:

a0 (QCloseEvent :)

keyPressEvent(a0: QKeyEvent) None

Overwrites the keyPressEvent of the QDialog so that it does not close when pressing Enter/Return.

Parameters:

a0 (QKeyEvent :)

staticMetaObject = PySide6.QtCore.QMetaObject("ManageInstruments" inherits "QDialog": )

nomad_camels.frontpanels.plot_definer module

class nomad_camels.frontpanels.plot_definer.Fit_Definer(fit_info: Fit_Info, parent=None, fit_to='')

Bases: Ui_Fit_Definer, QWidget

change_func()
get_data()
load_data()
staticMetaObject = PySide6.QtCore.QMetaObject("Fit_Definer" inherits "QWidget": )
class nomad_camels.frontpanels.plot_definer.Fit_Info(do_fit=False, predef_func='', custom_func='', use_custom_func=False, guess_params=True, initial_params=None, y='', x='', additional_data=None, display_values=False)

Bases: object

get_name(stream='')
Parameters:

stream – (Default value = ‘’)

get_variables(stream='')
Parameters:

stream – (Default value = ‘’)

class nomad_camels.frontpanels.plot_definer.Plot_Button_Overview(parent, plot_data=None)

Bases: QWidget

define_plots()
keyPressEvent(a0: QKeyEvent) None

Overwrites the keyPressEvent of the QDialog so that it does not close when pressing Enter/Return.

Parameters:

a0 (QKeyEvent :)

staticMetaObject = PySide6.QtCore.QMetaObject("Plot_Button_Overview" inherits "QWidget": )
class nomad_camels.frontpanels.plot_definer.Plot_Definer(parent=None, plot_data=None)

Bases: QDialog

accept() None
change_plot_def(a0)
Parameters:

a0

plot_added(n)
Parameters:

n

plot_removed(n)
Parameters:

n

reject()
staticMetaObject = PySide6.QtCore.QMetaObject("Plot_Definer" inherits "QDialog": )
class nomad_camels.frontpanels.plot_definer.Plot_Info(plt_type='X-Y plot', x_axis='', y_axes=None, title='', xlabel='', ylabel='', ylabel2='', do_plot=True, zlabel='', same_fit=False, fits=None, all_fit=None, z_axis='', logX=False, logY=False, logY2=False)

Bases: object

get_fit_vars(stream='')
Parameters:

stream – (Default value = ‘’)

update_name()
class nomad_camels.frontpanels.plot_definer.Single_Plot_Definer(plot_data: Plot_Info, parent=None)

Bases: QWidget

add_y(n)
Parameters:

n

get_data()
remove_y(n)
Parameters:

n

staticMetaObject = PySide6.QtCore.QMetaObject("Single_Plot_Definer" inherits "QWidget": )
class nomad_camels.frontpanels.plot_definer.Single_Plot_Definer_2D(plot_data: Plot_Info, parent=None)

Bases: Ui_Plot_Definer_2D, Single_Plot_Definer

get_data()
staticMetaObject = PySide6.QtCore.QMetaObject("Single_Plot_Definer_2D" inherits "Single_Plot_Definer": )
class nomad_camels.frontpanels.plot_definer.Single_Plot_Definer_List(plot_data: Plot_Info, parent=None)

Bases: Single_Plot_Definer

get_data()
staticMetaObject = PySide6.QtCore.QMetaObject("Single_Plot_Definer_List" inherits "Single_Plot_Definer": )
class nomad_camels.frontpanels.plot_definer.Single_Plot_Definer_XY(plot_data: Plot_Info, parent=None)

Bases: Ui_Plot_Definer, Single_Plot_Definer

fit_change()
get_data()
load_data()
staticMetaObject = PySide6.QtCore.QMetaObject("Single_Plot_Definer_XY" inherits "Single_Plot_Definer": )
nomad_camels.frontpanels.plot_definer.add_fit(tableData, fit)
Parameters:
  • tableData

  • fit

nomad_camels.frontpanels.plot_definer.make_table_data(plot_data)
Parameters:

plot_data

nomad_camels.frontpanels.protocol_config module

class nomad_camels.frontpanels.protocol_config.Protocol_Config(protocol=None, parent=None)

Bases: Ui_Protocol_View, QWidget

accept() None
accepted
add_loop_step(step_type='', position=-1, parent=None, copied_step=False)

Add a loop_step of given step_type. Updates the current sequence into the protocol, then initializes the new step.

Parameters:
  • step_type – (Default value = ‘’)

  • position – (Default value = -1)

  • parent – (Default value = None)

  • copied_step – (Default value = False)

Returns:

step – the newly added loop_step

Return type:

Loop_Step

build_protocol_sequence()

Shows / builds the protocol sequence in the treeView dependent on the loop_steps in the current_protocol.

change_name()
change_step_name()

Called when a loop_step changes its name, then updates the shown sequence, and also the protocol-data.

check_file_name()

check if the filename contains any characters that might cause problems

check_movability()
check_protocol_name()
closeEvent(a0: QCloseEvent) None
Parameters:

a0 (QCloseEvent :)

closing
comment_loop_step(step_name)
comment_shortcut()
copy_loop_step(step_name)

Makes a deepcopy of the given step and stores it in copied_loop_step.

Parameters:

step_name

copy_shortcut()
cut_loop_step(step_name)

Copies the given step, then removes it.

Parameters:

step_name

cut_shortcut()
enable_step_move(enable)
Parameters:

enable

get_step_config()

Updates the data in the currently-to-configure loop_step.

keyPressEvent(a0: QKeyEvent) None

Overwrites the keyPressEvent of the QDialog so that it does not close when pressing Enter/Return.

Parameters:

a0 (QKeyEvent :)

move_loop_step(up_down=0, in_out=0)

Moves a loop_step up or down in the sequence. It can also be moved in or out (into the loop_step above, it if accepts children).

Parameters:
  • up_down – (Default value = 0)

  • in_out – (Default value = 0)

paste_shortcut()
remove_loop_step(ask=True)

After updating the loop_step order in the protocol, the selected loop step is deleted (if the messagebox is accepted).

Parameters:

ask – (Default value = True)

replace_loop_step(step_type='', position=-1, parent=None)
sequence_right_click(pos)

Opens a specific Menu on right click in the protocol-sequence. If selection is not on a loop_step, it consists only of Add Step, otherwise it consists of Delete Step.

Parameters:

pos

staticMetaObject = PySide6.QtCore.QMetaObject("Protocol_Config" inherits "QWidget": Methods:   #33 type=Signal, signature=accepted(PyObject), parameters=PyObject   #34 type=Signal, signature=closing() )
tree_click_sequence()

Called when clicking the treeView_protocol_sequence.

update_add_step_actions()

Called when the devices change, updating the possible loopsteps to include new device steps.

update_loop_step_order()

Goes through all the loop_steps in the sequence, then rearranges them in the protocol.

nomad_camels.frontpanels.settings_window module

class nomad_camels.frontpanels.settings_window.Settings_Window(parent=None, settings=None)

Bases: Ui_settings_window, QDialog

Dialog to change the settings used in CAMELS.

accept(self) None
autosave_run_change()
change_enable_API()
change_theme()
confirm_delete_api_keys()
copy_to_clipboard()
generate_api_key()
get_settings()

Reading all the UI-elements to get the selected settings, then returning those as a dictionary.

keyPressEvent(a0: QKeyEvent) None

Overwrites the keyPressEvent of the QDialog so that it does not close when pressing Enter/Return.

Parameters:

a0 (QKeyEvent :)

number_change()
open_api_docu()
staticMetaObject = PySide6.QtCore.QMetaObject("Settings_Window" inherits "QDialog": )
nomad_camels.frontpanels.settings_window.hash_api_key(api_key)
nomad_camels.frontpanels.settings_window.store_api_key(api_key, conn)

Module contents