ScopeFoundry package

Submodules

ScopeFoundry.base_app module

Created on Jul 23, 2014

Modified by Ed Barnard UI enhancements by Ed Barnard, Alan Buckley

class ScopeFoundry.base_app.BaseApp(argv=[])[source]

Bases: PyQt4.QtCore.QObject

exec_()[source]
settings_load_ini(fname)[source]
settings_load_ini_ask(dir=None)[source]

Opens a Load dialogue asking the user which .ini file to load into our app settings. Loads settings from an .ini file.

settings_save_ini(fname, save_ro=True)[source]
settings_save_ini_ask(dir=None, save_ro=True)[source]

Opens a Save dialogue asking the user to select a save destination and give the save file a filename. Saves settings to an .ini file.

setup()[source]
setup_console_widget(kernel=None)[source]

Create and return console QWidget. If Jupyter / IPython is installed this widget will be a full-featured IPython console. If Jupyter is unavailable it will fallback to a pyqtgraph.console.ConsoleWidget.

If the app is started in an Jupyter notebook, the console will be connected to the notebook’s IPython kernel.

the returned console_widget will also be accessible as self.console_widget

In order to see the console widget, remember to insert it into an existing window or call self.console_widget.show() to create a new window

setup_logging()[source]
class ScopeFoundry.base_app.BaseMicroscopeApp(argv=[])[source]

Bases: ScopeFoundry.base_app.BaseApp

add_figure(name, widget)[source]
add_hardware(hw)[source]

Loads a HardwareComponent object into the app. After calling this, the HW appears in the Hardware tree.

If hw is a class, rather an instance, create an instance and add it to self.hardware

add_hardware_component(hw)[source]
add_mdi_subwin(widget, name)[source]
add_measurement(measure)[source]

Loads a Measurement object into the app. After calling this, the measurement appears in the Measurement tree.

If measure is a class, rather an instance, create an instance and add it to self.measurements

add_measurement_component(measure)[source]
add_pg_graphics_layout(name, widget)[source]
add_quickbar(widget)[source]
bring_mdi_subwin_to_front(subwin)[source]
bring_measure_ui_to_front(measure)[source]
cascade_layout()[source]

Cascades subwindows in user interface. Specifically in the Multi Document Interface.

get_window_positions()[source]
hardware_components
load_window_positions_json(fname)[source]
logged_quantities
lq_path(path)[source]

returns the lq based on path string of the form ‘domain/[component/]setting’ domain = “measurement”, “hardware” or “app”

lq_paths_list()[source]

returns all logged_quantity paths as a list

mdi = True

Multiple Document Interface flag. Tells the app whether to include an MDI widget in the app.

measurement_components
name = 'ScopeFoundry'

The name of the microscope app, default is ScopeFoundry.

on_close()[source]
on_hardware_tree_context_menu(position)[source]
on_measure_tree_context_menu(position)[source]
save_window_positions_json(fname)[source]
set_subwindow_mode()[source]

Switches Multiple Document Interface to Subwindowed viewing mode.

set_tab_mode()[source]

Switches Multiple Document Interface to Tabbed viewing mode.

set_window_positions(positions)[source]
settings_auto_save_ini()[source]

Saves the ini file to the pre-defined directory with a time stamp in the filename.

settings_load_dialog()[source]

Opens a load ini dialogue in the app user interface

settings_load_h5(fname)[source]

Loads h5 settings given a filename.

Arguments: Type: Description:
fname str relative path to the filename of the h5 file.
settings_load_ini(fname)[source]
Arguments: Type: Description:
fname str relative path to the filename of the ini file.
settings_load_last()[source]

Loads last saved ini file.

settings_save_dialog()[source]

Opens a save as ini dialogue in the app user interface.

settings_save_h5(fname)[source]

Saves h5 file to a file.

Arguments: Type: Description:
fname str relative path to the filename of the h5 file.
settings_save_ini(fname, save_ro=True, save_app=True, save_hardware=True, save_measurements=True)[source]
Arguments: Type: Description:
fname str relative path to the filename of the ini file.
setup()[source]

Override to add Hardware and Measurement Components

setup_default_ui()[source]
setup_ui()[source]

Override to set up ui elements after default ui is built

show()[source]

Tells Qt to show the user interface

tile_layout()[source]

Tiles subwindows in user interface. Specifically in the Multi Document Interface.

class ScopeFoundry.base_app.LoggingQTextEditHandler(textEdit, level=0)[source]

Bases: logging.Handler, PyQt4.QtCore.QObject

emit(record)[source]

Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.

format(record)[source]

Format the specified record.

If a formatter is set, use it. Otherwise, use the default formatter for the module.

level_styles = {'CRITICAL': 'color: red;', 'DEBUG': 'color: green;', 'ERROR': 'color: red;', 'INFO': 'color: green;', 'NOTSET': '', 'WARNING': 'color: orange;'}
new_log_signal
on_new_log(log_entry)[source]
ScopeFoundry.base_app.log_unhandled_exception(*exc_info)[source]

ScopeFoundry.data_browser module

class ScopeFoundry.data_browser.DataBrowser(argv)[source]

Bases: ScopeFoundry.base_app.BaseApp

auto_select_view(fname)[source]

return the name of the last supported view for the given fname

load_view(new_view)[source]
name = 'DataBrowser'
on_change_browse_dir()[source]
on_change_data_filename()[source]
on_change_file_filter()[source]
on_change_view_name()[source]
on_treeview_selection_change(sel, desel)[source]
setup()[source]
class ScopeFoundry.data_browser.DataBrowserView(databrowser)[source]

Bases: PyQt4.QtCore.QObject

Abstract class for DataBrowser Views

is_file_supported(fname)[source]
on_change_data_filename(fname=None)[source]
setup()[source]
class ScopeFoundry.data_browser.FileInfoView(databrowser)[source]

Bases: ScopeFoundry.data_browser.DataBrowserView

is_file_supported(fname)[source]
name = 'file_info'
on_change_data_filename(fname=None)[source]
setup()[source]
class ScopeFoundry.data_browser.HyperSpectralBaseView(databrowser)[source]

Bases: ScopeFoundry.data_browser.DataBrowserView

is_file_supported(fname)[source]
load_data(fname)[source]

override to set hyperspectral dataset and the display image need to define:

  • self.hyperspec_data (shape Ny, Nx, Nspec)
  • self.display_image (shape Ny, Nx)
  • self.spec_x_array (shape Nspec)
name = 'HyperSpectralBaseView'
on_change_data_filename(fname)[source]
on_change_rect_roi(roi=None)[source]
on_update_circ_roi(roi=None)[source]
scan_specific_setup()[source]
setup()[source]
update_display()[source]
class ScopeFoundry.data_browser.NPZView(databrowser)[source]

Bases: ScopeFoundry.data_browser.DataBrowserView

is_file_supported(fname)[source]
name = 'npz_view'
on_change_data_filename(fname=None)[source]
setup()[source]

ScopeFoundry.h5_io module

ScopeFoundry.h5_io.h5_base_file(app, fname=None, measurement=None)[source]
ScopeFoundry.h5_io.h5_create_emd_dataset(name, h5parent, shape=None, data=None, maxshape=None, dim_arrays=None, dim_names=None, dim_units=None, **kwargs)[source]

create an EMD dataset v0.2 inside h5parent returns an h5 group emd_grp

to access N-dim dataset: emd_grp[‘data’] to access a specific dimension array: emd_grp[‘dim1’]

  • h5parent
    • name [emd_grp] (<–returned)
      • emd_group_type = 1

      D data [shape = shape] D dim1 [shape = shape[0]]

      • name
      • units

      … D dimN [shape = shape[-1]]

h5parent : parent HDF5 group

shape : Dataset shape of N dimensions. Required if “data” isn’t provided.

data : Provide data to initialize the dataset. If used, you can omit
shape and dtype arguments.

Keyword Args:

dtype : Numpy dtype or string. If omitted, dtype(‘f’) will be used.
Required if “data” isn’t provided; otherwise, overrides data array’s dtype.

dim_arrays : optional, a list of N dimension arrays

dim_names : optional, a list of N strings naming the dataset dimensions

dim_units : optional, a list of N strings specifying units of dataset dimensions

Other keyword arguments follow from h5py.File.create_dataset

emd_grp : h5 group containing dataset and dimension arrays, see hierarchy below

ScopeFoundry.h5_io.h5_create_measurement_group(measurement, h5group, group_name=None)[source]
ScopeFoundry.h5_io.h5_save_app_lq(app, h5group)[source]
ScopeFoundry.h5_io.h5_save_hardware_lq(app, h5group)[source]
ScopeFoundry.h5_io.h5_save_lqcoll_to_attrs(settings, h5group)[source]

take a LQCollection and create attributes inside h5group

Parameters:
  • logged_quantities
  • h5group
Returns:

None

ScopeFoundry.h5_io.h5_save_measurement_settings(measurement, h5_meas_group)[source]

ScopeFoundry.hardware module

class ScopeFoundry.hardware.HardwareComponent(app, debug=False, name=None)[source]

Bases: PyQt4.QtCore.QObject

HardwareComponent

Base class for ScopeFoundry Hardware objects

to subclass, implement setup(), connect() and disconnect()

add_logged_quantity(name, **kwargs)[source]
add_operation(name, op_func)[source]

Create an operation for the HardwareComponent.

op_func is a function that will be called upon operation activation

operations are typically exposed in the default ScopeFoundry gui via a pushButton

add_widgets_to_tree(tree)[source]
connect()[source]

Opens a connection to hardware and connects LoggedQuantity settings to related hardware functions and parameters

connection_failed
connection_succeeded
disconnect()[source]

Disconnects the hardware and severs hardware–LoggedQuantity links

enable_connection(enable=True)[source]
gui
new_control_widgets()[source]
on_connection_failed()[source]
on_connection_succeeded()[source]
read_from_hardware()[source]

Read all settings (LoggedQuantity) connected to hardware states

setup()[source]

Runs during __init__, before the hardware connection is established Should generate desired LoggedQuantities, operations

thread_lock_all_lq()[source]
thread_lock_lq(lq)[source]
web_ui()[source]

ScopeFoundry.helper_funcs module

class ScopeFoundry.helper_funcs.ConfirmCloseEventEater(title='Close ScopeFoundry?', message='Do you wish to shut down ScopeFoundry?', func_on_close=None)[source]

Bases: PyQt4.QtCore.QObject

Tells the Qt to confirm the closing of the app by the user with a pop-up confirmation dialog.

eventFilter(obj, event)[source]

Listens for QtCore.QEvent.Close signal and asks the user whether to close the app in a pop-up dialog.

class ScopeFoundry.helper_funcs.IgnoreCloseEventEater[source]

Bases: PyQt4.QtCore.QObject

This class is utilized to prevent the closing of important subwindows and prevent the deletion of related python objects. Tells the Qt event manager to ignore calls to close the subwindow when user hits [x] on the subwindow.

eventFilter(self, QObject, QEvent) → bool[source]
class ScopeFoundry.helper_funcs.LogLock(name)[source]

Bases: object

acquire(blocking=True)[source]
release()[source]
class ScopeFoundry.helper_funcs.OrderedAttrDict[source]

Bases: object

add(name, obj)[source]
items()[source]
keys()[source]
values()[source]
class ScopeFoundry.helper_funcs.QLock[source]

Bases: PyQt4.QtCore.QMutex

acquire()[source]
release()[source]
ScopeFoundry.helper_funcs.confirm_on_close(widget, title='Close ScopeFoundry?', message='Do you wish to shut down ScopeFoundry?', func_on_close=None)[source]

Calls the ConfirmCloseEventEater class which asks for user confirmation in a pop-up dialog upon closing the ScopeFoundry app.

ScopeFoundry.helper_funcs.get_logger_from_class(obj)[source]

returns a named Logger from the logging package using the full name of the class of the object (obj) as the log name

ScopeFoundry.helper_funcs.ignore_on_close(widget)[source]

Calls the IgnoreCloseEventEater class which intercepts the QtCore.QEvent.Close signal and prevents the deletion of subwindows and their associated objects.

ScopeFoundry.helper_funcs.load_qt_ui_file(ui_filename)[source]

Loads a QT user interface file (files ending in .ui). This function is typically called from Measurement level modules.

ScopeFoundry.helper_funcs.print_all_connected(qobject, signal=None)[source]
ScopeFoundry.helper_funcs.print_signals_and_slots(obj)[source]
ScopeFoundry.helper_funcs.replace_spinbox_in_layout(old_widget, **kwargs)[source]
ScopeFoundry.helper_funcs.replace_widget_in_layout(old_widget, new_widget, retain_font=True, retain_sizePolicy=True, retain_size=True)[source]

Replace a widget with a new widget instance in an existing layout.

returns new_widget

Useful for replacing placeholder widgets created with QtCreator with custom widgets Note: currently works for widgets in QGridLayouts only

inspiration from: – http://stackoverflow.com/questions/4625102/how-to-replace-a-widget-with-another-using-qthttp://stackoverflow.com/questions/24189202/how-to-get-the-row-column-location-of-a-widget-in-a-qgridlayout

ScopeFoundry.helper_funcs.sibling_path(a, b)[source]

Returns the path of a filename b in the same folder as a (i.e. dirname(a)/b )

Arguments:  
a directory name of pathname a
b path suffix
Returns:combined path of above arguments.
ScopeFoundry.helper_funcs.str2bool(v)[source]

ScopeFoundry.logged_quantity module

class ScopeFoundry.logged_quantity.ArrayLQ(name, dtype=<class 'float'>, hardware_read_func=None, hardware_set_func=None, initial=[], fmt='%g', si=True, ro=False, unit=None, vmin=-1000000000000.0, vmax=1000000000000.0, choices=None)[source]

Bases: ScopeFoundry.logged_quantity.LoggedQuantity

array_tableView
change_shape(newshape)[source]
coerce_to_type(x)[source]

Force x to dtype of the LQ

Arguments Description
x value of type str, bool, int, etc.
Returns:Same value, x of the same type as its respective logged

quantity

connect_element_follower_lq(lq, index, bidir=True)[source]

connects an LQ to follow the changes of the array and display a specific element

create_tableView(**kwargs)[source]
ini_string_value()[source]
Returns:A string showing the logged quantity value.
new_default_widget()[source]

returns the approriate QWidget for the datatype of the LQ. automatically connects widget

same_values(v1, v2)[source]

Compares two values of the LQ type, used in update_value

Arguments Description
v1 value 1
v2 value 2
Returns:Boolean value (True or False)
send_display_updates(force=False)[source]

Emit updated_value signals if value has changed.

Arguments Description
force will emit signals regardless of value change.
Returns:None
string_value()[source]
updated_shape
class ScopeFoundry.logged_quantity.DummyLock[source]

Bases: object

acquire()[source]
release()[source]
class ScopeFoundry.logged_quantity.FileLQ(name, default_dir=None, is_dir=False, **kwargs)[source]

Bases: ScopeFoundry.logged_quantity.LoggedQuantity

Specialized str type LoggedQuantity that handles a filename (or directory) and associated file.

connect_to_browse_widgets(lineEdit, pushButton)[source]
file_browser()[source]
new_default_widget()[source]

returns the approriate QWidget for the datatype of the LQ. automatically connects widget

class ScopeFoundry.logged_quantity.LQCircularNetwork(lq_dict)[source]

Bases: PyQt4.QtCore.QObject

LQCircularNetwork is collection of logged quantities Helper class if a network of lqs with circular structures are present Use update_values_synchronously method if the specified lqs should be updated at once. The internal lock-flag prevents infinite loops.

update_values_synchronously(**kwargs)[source]

kwargs is dict containing lq_key and new_vals Note: lq_key is not necessarily the name of the lq but key of lq_dict

as specified at initialization
updated_values
class ScopeFoundry.logged_quantity.LQCollection[source]

Bases: object

LQCollection is a smart dictionary of LoggedQuantity objects.

attribute access such as lqcoll.x1 will return full LoggedQuantity object

dictionary-style access lqcoll[‘x1’] allows direct reading and writing of the LQ’s value, handling the signals automatically

New LQ’s can be created with New()

LQRange objects can be created with New_Range() and will be stored in :attr:ranges

Add(lq)[source]

Add an existing LoggedQuantity to the Collection Examples of usefulness: add hardware lq to measurement settings

New(name, dtype=<class 'float'>, **kwargs)[source]

Create a new LoggedQuantity with name and dtype

New_Range(name, include_center_span=False, **kwargs)[source]
New_UI(include=None, exclude=[])[source]

create a default Qt Widget that contains widgets for all settings in the LQCollection

add_widgets_to_subtree(tree_item)[source]
as_dict()[source]
as_list()[source]
disconnect_all_from_hardware()[source]
get_lq(key)[source]
get_val(key)[source]
keys()[source]
remove(name)[source]
class ScopeFoundry.logged_quantity.LQRange(min_lq, max_lq, step_lq, num_lq, center_lq=None, span_lq=None)[source]

Bases: ScopeFoundry.logged_quantity.LQCircularNetwork

LQRange is a collection of logged quantities that describe a numpy.linspace array inputs. Four (or six) LQ’s are defined, min, max, num, step (center, span) and are connected by signals/slots that keep the quantities in sync. LQRange.array is the linspace array and is kept upto date with changes to the 4 (or 6) LQ’s

array
calc_center(min_, max_)[source]
calc_max(center, span)[source]
calc_min(center, span)[source]
calc_num(min_, max_, step)[source]

enforces num to be a positive integer and adjust step accordingly returns num,step

calc_span(min_, max_)[source]
calc_step(min_, max_, num)[source]

excludes num=1 to prevent division by zero, returns step

on_change_center_span()[source]
on_change_min_max()[source]
on_change_num()[source]
on_change_step()[source]
class ScopeFoundry.logged_quantity.LoggedQuantity(name, dtype=<class 'float'>, hardware_read_func=None, hardware_set_func=None, initial=0, fmt='%g', si=False, ro=False, unit=None, spinbox_decimals=2, spinbox_step=0.1, vmin=-1000000000000.0, vmax=1000000000000.0, choices=None, reread_from_hardware_after_write=False, description=None)[source]

Bases: PyQt4.QtCore.QObject

LoggedQuantity objects are containers that wrap settings. These settings may be a number (integer or float) or a string and occasionally small arrays of them.

These objects emit signals when changed and can be connected bidirectionally to Qt Widgets.

In ScopeFoundry we represent the values in an object called a LoggedQuantity. A LoggedQuantity is a class that contains a value, a bool, float, int, str etc that is part of an application’s state. In the case of microscope and equipment control, these also can represent the state of a piece of hardware. These are very useful objects because the are the central location of the value contained within. All graphical interface views will be guaranteed to be consistent with the LQ state. The data of these quantities will also be saved in datafiles created by ScopeFoundry.

add_listener(func, argtype=(), **kwargs)[source]

Connect ‘func’ as a listener (Qt Slot) for the updated_value signal. By default ‘func’ should take no arguments, but argtype can define the data type that it should accept. but should be limited to those supported by LoggedQuantity (i.e. int, float, str) **kwargs are passed to the connect function appends the ‘func’ to the ‘listeners’ list

change_choice_list(choices)[source]
change_min_max(vmin=-1000000000000.0, vmax=1000000000000.0)[source]
change_readonly(ro=True)[source]
change_unit(unit)[source]
coerce_to_type(x)[source]

Force x to dtype of the LQ

Arguments Description
x value of type str, bool, int, etc.
Returns:Same value, x of the same type as its respective logged

quantity

connect_bidir_to_widget(widget)[source]
connect_lq_math(lqs, func, reverse_func=None)[source]

Links LQ to other LQs using math functions

takes a func that takes a set of logged quantities new_val = f(lq1, lq2, …)

when any of the lqs change, the value of this derived LQ will be updated based on func

reverse_func allows changes to this LQ to update lqs via reverse func

new_lq1_val, new_lq2_val, … = g(new_val, old_lqs_values) or new_lq1_val, new_lq2_val, … = g(new_val)

connect_lq_scale(lq, scale)[source]
connect_to_hardware(read_func=None, write_func=None)[source]
connect_to_lq(lq)[source]
connect_to_widget(widget)[source]

Creates Qt signal-slot connections between LQ and the QtWidget widget

connects updated_value signal to the appropriate slot depending on the type of widget

Makes a bidirectional connection to a QT widget, ie when LQ is updated, widget gets a signal and when widget is updated, the LQ receives a signal and update_value() slot is called.

Handles many types of widgets:
  • QDoubleSpinBox
  • QCheckBox
  • QLineEdit
  • QComboBox
  • pyqtgraph.widgets.SpinBox.SpinBox
Arguments Description
widget The name of the Qt GUI Object, examples of which are listed above. For example, if you have a QDoubleSpinBox in the gui which you renamed int_value_doubleSpinBox in the Qt Designer Object Inspector, use self.ui.int_value_doubleSpinBox
Returns:None
disconnect_from_hardware(dis_read=True, dis_write=True)[source]
has_hardware_read()[source]
has_hardware_write()[source]
ini_string_value()[source]
Returns:A string showing the logged quantity value.
is_connected_to_hardware()[source]
Returns:True if either self.hardware_read_func or

self.hardware_set_func are defined. False if None.

new_default_widget()[source]

returns the approriate QWidget for the datatype of the LQ. automatically connects widget

read_from_hardware(send_signal=True)[source]
read_from_lq_math()[source]
same_values(v1, v2)[source]

Compares two values of the LQ type, used in update_value

Arguments Description
v1 value 1
v2 value 2
Returns:Boolean value (True or False)
send_display_updates(force=False)[source]

Emit updated_value signals if value has changed.

Arguments Description
force will emit signals regardless of value change.
Returns:None
string_value()[source]
update_choice_index_value(new_choice_index, **kwargs)[source]
update_value(new_val=None, update_hardware=True, send_signal=True, reread_hardware=None)[source]

Update stored value with new_val

Change value of LQ and emit signals to inform listeners of change

if update_hardware is true: call connected hardware write function

Arguments: Description:
new_val New value for the LoggedQuantity to store
update_hardware calls hardware_set_func if defined (default True)
send_signal sends out QT signals on upon change (default True)
reread_hardware read from hardware after writing to hardware to ensure change (defaults to self.reread_from_hardware_after_write)
Returns:None
updated_choice_index_value
updated_min_max
updated_readonly
updated_text_value
updated_value
value

return stored value

write_to_hardware(reread_hardware=None)[source]

ScopeFoundry.measurement module

Created on Tue Apr 1 09:25:48 2014 @author: esbarnard

class ScopeFoundry.measurement.Measurement(app, name=None)[source]

Bases: PyQt4.QtCore.QObject

Base class for ScopeFoundry Hardware objects

to subclass, implement setup(), run()

for measurements with graphical interfaces, subclass and additionally implement setup_figure(), update_display()

add_logged_quantity(name, **kwargs)[source]

Create a new LoggedQuantity and adds it to the measurement’s settings (LQCollection)

add_operation(name, op_func)[source]

Used to create a logged quantity connection between a button in the Measurement tree and a function.

type name: type op_func:
str QtCore.Slot
add_widgets_to_tree(tree)[source]

Adds Measurement items and their controls to Measurements tree in the user interface.

gui
interrupt()[source]

Kindly ask the measurement to stop.

This raises the interrupt_measurement_called flag To actually stop, the threaded run() method must check for this flag and exit

is_measuring()[source]

Returns whether the acquisition thread is running

load_ui(ui_fname=None)[source]

Loads and shows user interface.

Arguments:  
ui_fname filename of user interface file (usually made with Qt Designer)
measurement_interrupted

signal sent when measurement is complete due to an interruption

measurement_sucessfully_completed

signal sent when full measurement is complete

new_control_widgets()[source]
post_run()[source]

Override this method to enable main-thread finalization after to measurement thread completes

pre_run()[source]

Override this method to enable main-thread initialization prior to measurement thread start

run()[source]

run method runs in an separate thread and is used for data acquisition

No GUI updates should occur within the run function, any Qt related GUI work should occur in update_display()

set_progress(pct)[source]

This function updates the logged quantity progress which is used for the display of progress bars in the UI.

Arguments:  
pct The percentage of progress given by a measurement module
setup()[source]

Override this to set up logged quantities and gui connections Runs during __init__, before the hardware connection is established Should generate desired LoggedQuantities

setup_figure()[source]

Overide setup_figure to build graphical interfaces. This function is run on ScopeFoundry startup.

show_ui()[source]

Shows the graphical user interface of this measurement. ui

start()[source]

Starts the measurement

calls pre_run creates acquisition thread runs thread

start_nested_measure_and_wait(measure, nested_interrupt=True, polling_func=None, polling_time=0.1)[source]

Start another nested measurement measure and wait until completion.

Optionally it can call a polling function polling_func with no arguments at an interval polling_time in seconds.

if nested_interrupt is True then interrupting the nested measure will also interrupt the outer measurement. nested_interrupt defaults to True

start_stop(start)[source]

Use boolean start to either start (True) or interrupt (False) measurement. Test.

terminate()[source]

Terminate MeasurementQThread.

update_display()[source]

Override this function to provide figure updates when the display timer runs

web_ui()[source]
class ScopeFoundry.measurement.MeasurementQThread(measurement, parent=None)[source]

Bases: PyQt4.QtCore.QThread

run(self)[source]

ScopeFoundry.ndarray_interactive module

class ScopeFoundry.ndarray_interactive.ArrayLQ_QTableModel(lq, col_names=None, row_names=None, parent=None, **kwargs)[source]

Bases: ScopeFoundry.ndarray_interactive.NumpyQTableModel

on_dataChanged(topLeft=None, bottomRight=None)[source]
on_lq_updated_value()[source]
class ScopeFoundry.ndarray_interactive.NumpyQTableModel(narray, col_names=None, row_names=None, fmt='%g', copy=True, transpose=False, parent=None)[source]

Bases: PyQt4.QtCore.QAbstractTableModel

array
columnCount(self, parent: QModelIndex = QModelIndex()) → int[source]
data(self, QModelIndex, role: int = Qt.DisplayRole) → object[source]
flags(self, QModelIndex) → Qt.ItemFlags[source]
headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) → object[source]
rowCount(self, parent: QModelIndex = QModelIndex()) → int[source]
setData(self, QModelIndex, object, role: int = Qt.EditRole) → bool[source]
set_array(narray)[source]

ScopeFoundry.setup module

ScopeFoundry.table_models module

Module contents