Skip to main content

Ask DeepWiki License: MIT Python 3.9+

fibsemOS

A universal API for FIBSEM Control, Development and Automation

Overview

fibsemOS is a Python package for controlling and automating FIB/SEM microscopes. It provides a universal API for FIBSEM control, development and automation, abstracting away the details of the microscope hardware to provide a simple, intuitive interface. The package includes reusable modules for common workflows and operations, and is extensible to support new microscopes.

We currently aim to support ThermoFisher AutoScript, TESCAN Automation SDK, and Zeiss Python API. Support for other FIBSEM systems is planned.

For more information see the website.

Installation

There are several ways to install fibsemOS depending on your application and needs. Requires Python 3.9+.

PyPI (For Users)

pip install fibsem 

Github (For Development)

Clone this repository:

git clone https://github.com/fibsem-os/fibsem-os.git
cd fibsem-os

Install dependencies and package:

conda create -n fibsem python=3.11 pip
conda activate fibsem
pip install -e '.[ui]'

To run:

fibsem-autolamella-ui

Two flags skip the clicks that start every session, for development against a simulator or an instrument you reconnect to all day. --quickstart connects with the default microscope configuration as soon as the window is up; --quickload does that and then reopens the most recent experiment:

fibsem-autolamella-ui --quickload

Offline Installation

For computers with no internet connection, you can download the dependencies on a separate internet connected computer and transfer it to the Support PC (e.g. via USB).

On internet connected PC (Environment should match python version):

mkdir pkg
cd pkg
pip download fibsem[ui]

On Support PC: Transfer the pkg directory to the support pc, and then change to the pkg directory

cd pkg
pip install --no-index --find-links . fibsem[ui]

Additional Installation Information

For detailed instructions on installation, and installing the commercial microscope APIs, see Installation Guide.

Getting Started

For a complete walkthrough of the AutoLamella workflow, see the Getting Started Guide.

Getting Started with the API

To get started with the fibsemOS API, see the example/example.py:

You can start an offline demo microscope by specifying manufacturer: "Demo" in the configuration yaml file (fibsem/config/microscope-configuration.yaml). This will start a demo microscope that you can use to test the API without connecting to a real microscope. To connect to a real microscope, set the ip_address and manufacturer of your microscope in the configuration file or alternatively, you can pass these arguments to utils.setup_session() directly.

This example shows you how to connect to the microscope, take an image with both beams, and plot the results.

from fibsem import utils, acquire
import matplotlib.pyplot as plt

def main():

    # connect to microscope
    microscope, settings = utils.setup_session(ip_address="localhost", manufacturer="Demo")

    # take image with both beams
    sem_image, fib_image = acquire.take_reference_images(microscope, settings.image)

    # show images
    fig, ax = plt.subplots(1, 2, figsize=(7, 5))
    ax[0].imshow(sem_image.data, cmap="gray")
    ax[1].imshow(fib_image.data, cmap="gray")
    plt.show()


if __name__ == "__main__":
    main()

This example is available as a script in example/example.py. For more detailed examples, see the Examples section below.

Examples

Core Functionality

For examples of core functionality please see:

  • example/example_imaging.py: image acquisition
  • example/example_movement.py: stage movement
  • example/example_milling.py: drawing patterns and beam milling
  • example/autolamella.py: recreation of AutoLamella V1 (automated cryo-lamella preparation) in ~150 lines of code

Additional example scripts and notebooks are available.

Working with experiment data

To read or modify a saved AutoLamella experiment from a plain Python script — no microscope or GUI needed — see the Scripting Guide.

Contributing

Contributions are welcome! Please open a pull request or issue.

Docs

fibsemOS is a large package with many features. For more detailed documentation, please see the Documentation Website.

Name Full Title Date
3DCT Site-Specific Cryo-focused Ion Beam Sample Preparation Guided by 3D Correlative Microscopy 2016
AutoLamella Automated cryo-lamella preparation for high-throughput in-situ structural biology 2020
SerialFIB A modular platform for automated cryo-FIB workflows 2021
PFIB-SEM Cryo-plasma FIB/SEM volume imaging of biological specimens 2023
OpenFIBSEM OpenFIBSEM: A universal API for FIBSEM control 2023
SEM Charging Reduction of SEM charging artefacts in native cryogenic biological samples 2025
Fillets Mind the corner: Fillets in cryo-FIB lamella preparation to minimise sample loss 2025

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fibsem-0.5.2.tar.gz (12.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fibsem-0.5.2-py3-none-any.whl (11.3 MB view details)

Uploaded Python 3

File details

Details for the file fibsem-0.5.2.tar.gz.

File metadata

  • Download URL: fibsem-0.5.2.tar.gz
  • Upload date:
  • Size: 12.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fibsem-0.5.2.tar.gz
Algorithm Hash digest
SHA256 3cef7d7e3fa5e2a2b4d47941ba00464a53c1497534e90a4c13a1bef465e6b7e2
MD5 9f678a4e402138d88b8245d2b5f7cf5c
BLAKE2b-256 710398a7f72008b2c23615aef7b49eeb2f607c6a7fcc961b048690b7accf142a

See more details on using hashes here.

Provenance

The following attestation bundles were made for fibsem-0.5.2.tar.gz:

Publisher: publish.yml on fibsem-os/fibsem-os

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fibsem-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: fibsem-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 11.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fibsem-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e15ce8e9dbaedb9bb3fb4dc3de9e5cd17d2960a2825773211164558dc1f89e54
MD5 a0a3a7b04ad42d679c7b598eb47f348a
BLAKE2b-256 d753c59933a33a31578aecfc72c67c5c2ecc7602f03ea241a5ed038fb6c088fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for fibsem-0.5.2-py3-none-any.whl:

Publisher: publish.yml on fibsem-os/fibsem-os

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.5

1 file

0.2.4

1 file

0.2.3

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page