MicroscopeControl
Documentation for MicroscopeControl.
MicroscopeControl.MicroscopeControlMicroscopeControl.AbstractInstrumentMicroscopeControl.AbstractSystemMicroscopeControl.AbstractSystemStateMicroscopeControl.export_stateMicroscopeControl.export_stateMicroscopeControl.get_stateMicroscopeControl.guiMicroscopeControl.initializeMicroscopeControl.initializeMicroscopeControl.install_skillsMicroscopeControl.list_skillsMicroscopeControl.save_attributes_and_dataMicroscopeControl.save_group_recursiveMicroscopeControl.save_h5MicroscopeControl.set_stateMicroscopeControl.shutdownMicroscopeControl.shutdownMicroscopeControl.uninstall_skills
MicroscopeControl.MicroscopeControl — Module
MicroscopeControl is the main module for the MicroscopeControl package. It exports all abstract types and methods for instruments, as well as the implementations for all hardware interfaces. It also provides methods for saving data to HDF5 files, and the GUI methods for user interfaces.
Uses Reexport.jl to cleanly propagate exports from submodules.
MicroscopeControl.AbstractInstrument — Type
AbstractInstrument is an abstract type that all instruments should inherit from.MicroscopeControl.AbstractSystem — Type
AbstractSystemAbstract type for a microscope system (composite of instruments). Systems compose multiple instruments and manage their collective state.
MicroscopeControl.AbstractSystemState — Type
AbstractSystemStateAbstract type for system state. Concrete implementations should contain the configuration parameters for a specific system.
MicroscopeControl.export_state — Method
export_state(instrument::AbstractInstrument)Export the state of the instrument as a tuple of attributes, data, and children.
Arguments
instrument::AbstractInstrument: The instrument to export the state of.
Returns
- A tuple of dictionaries containing the attributes, data, and children of the instrument.
MicroscopeControl.export_state — Method
export_state(sys::AbstractSystem)Export the state of the system as a tuple of attributes, data, and children.
Arguments
sys::AbstractSystem: The system to export state from.
Returns
- A tuple of (attributes::Dict, data, children::Dict).
MicroscopeControl.get_state — Method
get_state(sys::AbstractSystem)Get the current state of the system.
Arguments
sys::AbstractSystem: The system to get state from.
Returns
- An
AbstractSystemStaterepresenting the current configuration.
MicroscopeControl.gui — Method
gui(instrument::AbstractInstrument)Open a GUI control panel for the instrument.
Arguments
instrument::AbstractInstrument: The instrument to build a GUI for.
MicroscopeControl.initialize — Method
initialize(instrument::AbstractInstrument)Initialize the instrument.
Arguments
instrument::AbstractInstrument: The instrument to initialize.
MicroscopeControl.initialize — Method
initialize(sys::AbstractSystem)Initialize all instruments in the system.
Arguments
sys::AbstractSystem: The system to initialize.
MicroscopeControl.install_skills — Function
install_skills(target=pwd(); skills=:all, force=false, quiet=false) -> Vector{String}Copy Claude Code skills from this package's skills/ directory into target's .claude/skills/, stamping each SKILL.md with the installed package version and recording a manifest of installed files and hashes.
skills is :all or a Vector of skill names/Symbols to install selectively. On reinstall, a file whose on-disk hash no longer matches the manifest (a local edit, or a file the manifest never tracked) is left alone unless force=true; otherwise it is reported in an error listing every such file. A file a skill used to ship but no longer does is removed if it is still unmodified, or kept (and reported) if it was locally edited. A skill name or relative path that would resolve outside target's .claude/skills directory – including through a symlinked skill directory – is always refused, regardless of force. Returns the names of the skills that were (at least partially) processed.
MicroscopeControl.list_skills — Method
list_skills() -> Vector{String}Names of the Claude Code skills bundled in this package's skills/ directory, sorted alphabetically.
MicroscopeControl.save_attributes_and_data — Method
save_attributes_and_data(filename::String, group::String, attributes::Dict, data::Any, children::Dict{String,Any})Saves hierarchical data to an HDF5 file.
Arguments
filename::String: Path to the HDF5 filegroup::String: Name of the HDF5 groupattributes::Dict: Dictionary of attributes to savedata::Any: Data to save in the groupchildren::Dict{String,Any}: Dictionary of child groups
MicroscopeControl.save_group_recursive — Method
save_group_recursive(h5parent, group_name::String, attributes::Dict, data, children)Recursively saves hierarchical data to an HDF5 file.
Arguments
h5parent: Parent HDF5 groupgroup_name::String: Name of the HDF5 groupattributes::Dict: Dictionary of attributes to savedata::Any: Data to save in the groupchildren::Dict{String,Any}: Dictionary of child groups
MicroscopeControl.save_h5 — Method
save_h5(filename::String, state_data)Save the state data to an HDF5 file.
Arguments
filename::String: Path to the HDF5 filestate_data: Tuple of dictionaries containing the attributes, data, and children of the instrument.
MicroscopeControl.set_state — Method
set_state(sys::AbstractSystem, state::AbstractSystemState)Set the state of the system, updating all relevant instruments.
Arguments
sys::AbstractSystem: The system to configure.state::AbstractSystemState: The desired state.
MicroscopeControl.shutdown — Method
shutdown(instrument::AbstractInstrument)Shuts down the instrument.
Arguments
instrument::AbstractInstrument: The instrument to shut down.
MicroscopeControl.shutdown — Method
shutdown(sys::AbstractSystem)Shutdown all instruments in the system.
Arguments
sys::AbstractSystem: The system to shut down.
MicroscopeControl.uninstall_skills — Function
uninstall_skills(target=pwd(); quiet=false) -> Vector{String}Remove skills previously installed by install_skills into target, using the manifest written there. Only files whose on-disk hash still matches the manifest are removed; a locally modified file is left in place (and reported), and its skill is not counted as removed. A manifest skill name or file path that would resolve outside target's .claude/skills directory – including through a symlinked skill directory – is refused and reported rather than touched. Never touches .claude/skills itself or skills not present in the manifest.