slicops package¶
slicops package
- copyright:
Copyright (c) 2024 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
Subpackages¶
- slicops.device package
- slicops.pkcli package
- slicops.sliclet package
Baseinstance()names()- Submodules
- slicops.sliclet.fractals module
- slicops.sliclet.hello module
- slicops.sliclet.screen module
CLASSScreenScreen.handle_destroy()Screen.handle_init()Screen.handle_start()Screen.on_change_beam_path()Screen.on_change_camera()Screen.on_change_curve_fit_method()Screen.on_change_images_to_average()Screen.on_click_save_to_file()Screen.on_click_single_button()Screen.on_click_start_button()Screen.on_click_stop_button()Screen.on_click_target_in_button()Screen.on_click_target_out_button()
- slicops.sliclet.yaml_db module
Submodules¶
slicops.config module¶
Common configuration
- copyright:
Copyright (c) 2024 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
slicops.const module¶
Constants
- copyright:
Copyright (c) 2025 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
slicops.ctx module¶
Holds fields and ui_layout
- copyright:
Copyright (c) 2025 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
slicops.device_db module¶
Accessing meta data about devices
- copyright:
Copyright (c) 2024 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
- class slicops.device_db.DeviceMeta[source]¶
Bases:
PKDictInformation about a device
- accessor¶
name to PKDict(name, csi_name, writable, py_type, …)
- Type:
PKDict
- slicops.device_db.beam_paths()[source]¶
Get all beam path names
- Returns:
sorted beams path names
- Return type:
- slicops.device_db.device_names(device_type, beam_path)[source]¶
Query devices for device_type and beam_path
slicops.device_sql_db module¶
SQL db of lcls_tools.common.devices.yaml.
Use slicops.device_db for a stable interface.
- copyright:
Copyright (c) 2025 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
slicops.field module¶
Ctx Value
- copyright:
Copyright (c) 2025 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
slicops.mock_epics module¶
slicops.plot module¶
Plot functions
- copyright:
Copyright (c) 2025 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
- class slicops.plot.ImageSet(meta)[source]¶
Bases:
objectFits images, possibly averaging.
Can take arbitrary meta data, e.g. pv and it will be written by save_file.
- Parameters:
meta (PKDict) – images_to_average, camera, curve_fit_method, pv
- add_frame(frame, timestamp)[source]¶
Add and update fit
- Parameters:
frame (ndarray) – new image
timestamp (datetime) – time of frame
- Returns:
frame and fit or None if not enough frames
- Return type:
PKDict
- save_file(dir_path)[source]¶
- Creates a hdf5 file with the structure::
- /image Group
/frames Dataset {images_to_average, ysize, xsize} /mean Dataset {ysize, xsize} /timestamps Dataset {images_to_average} /x Group
/fit Dataset {xsize} /profile Dataset {xsize}
- /y Group
/fit Dataset {ysize} /profile Dataset {ysize}
/meta Group (camera, curve_fit_method, images_to_average, etc.)
- Parameters:
dir_path (py.path) – directory
- slicops.plot.fit_image(image, method)[source]¶
Attemp an analytical fit for the sum along the x and y dimensions
Uses scipy.optimize.curve_fit
- Parameters:
image (ndarray) – 2-d matrix
method (str) – Either gaussian or super_gaussian
- Returns:
raw_pixels, x & y={lineout: sum, fit: {fit_line, results: {sig, amp, mean, offset}}
- Return type:
PKDict
slicops.quest module¶
Context for a web or command line operation (think: request object)
A quest is an instance of API and contains several attributes (Attr):
- copyright:
Copyright (c) 2024 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
- slicops.quest.attr_classes()[source]¶
Classes instantiated automatically on every start
- Returns:
class objects
- Return type:
- slicops.quest.import_and_start()[source]¶
Import slicops.modules, initialize them, and call start
- Returns:
instantiated coroutine
- Return type:
asyncio.task
slicops.slicops_console module¶
Front-end command line for slicops.
See pykern.pkcli for how this module is used.
- copyright:
Copyright (c) 2024 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
slicops.ui_api module¶
UI APIs
- copyright:
Copyright (c) 2024 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
slicops.ui_layout module¶
Display layout
- copyright:
Copyright (c) 2025 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license:
slicops.unit_util module¶
Support for unit tests
- copyright:
Copyright (c) 2024 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All Rights Reserved.
- license: