photons.plugins.spatial_scan module

Perform a 3D spatial scan of a photodetector.

class photons.plugins.spatial_scan.SpatialScan(parent, **kwargs)[source]

Bases: BasePlugin

Perform a 3D spatial scan of a photodetector.

Parameters:
  • parent (MainWindow) – The main window.

  • **kwargs – All keyword arguments are passed to super().

closeEvent(event)[source]

Overrides QtWidgets.QWidget.closeEvent().

Return type:

None

keyReleaseEvent(event)[source]

Overrides QtWidgets.QWidget.keyReleaseEvent().

Return type:

None

on_worker_abort()[source]

Abort the worker thread.

Return type:

None

on_worker_finished()[source]

Called when the worker thread finishes.

Return type:

None

on_worker_start()[source]

Start acquiring data in the worker thread.

Return type:

None

stop_monitor_and_detector_timer_and_thread()[source]

Stop the timers/threads for the monitor/detector connection.

Return type:

None

class photons.plugins.spatial_scan.SpatialScanWorker(parent)[source]

Bases: Worker

Process an expensive or blocking operation in a thread that is separate from the main thread.

You can access to the attributes of the Worker as though they are attributes of the Thread.

The *args and **kwargs parameters are passed to the constructor of the Worker when the start() method is called.

Example

See SleepWorker for an example of a Worker.

acquire()[source]

Acquire the monitor and detector samples.

Return type:

tuple[Samples, Samples]

Returns:

(monitor samples, detector samples)

acquire_dark()[source]

Take a dark measurement.

Return type:

dict[str, float]

process()[source]

Run the spatial scan.

Return type:

None

read_dut()[source]

Read the samples for the device-under-test.

Return type:

Samples