areadetector-plugin

Create custom EPICS areaDetector NDPluginDriver and NDPluginFile plugins.

1|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/BCDA-APS/opencode-skills --skill areadetector-plugin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: areadetector-plugin
Source: https://github.com/BCDA-APS/opencode-skills/tree/main/areadetector-plugin
Command: npx skills add https://github.com/BCDA-APS/opencode-skills --skill areadetector-plugin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you design custom EPICS areaDetector plugins that process or write image frames (NDArray) so your IOC can perform specialized transformations and file output without manual post-processing.

Core Features & Use Cases

  • Custom processing with NDPluginDriver: Implement processCallbacks() to analyze or transform NDArray pixel data, safely copying inputs when modification is required.
  • Custom file writing with NDPluginFile: Implement openFile(), writeFile(), readFile(), and closeFile() to stream frames to disk or recreate arrays from files.
  • Threading, queuing, and plugin chaining: Use the NDPluginDriver base infrastructure for queued processing, multi-threaded execution, and downstream handoff so your plugin fits into a standard areaDetector pipeline.
  • Real-world use case: Add a thresholding, filtering, compression, or proprietary format writer plugin to an existing areaDetector acquisition chain so images are processed and stored automatically as they arrive.

Quick Start

Ask: “Using the areadetector-plugin skill, generate a skeleton NDPluginDriver processing plugin and an NDPluginFile writer plugin that threshold NDUInt16 frames and writes them to a binary file with correct open/write/close behavior.”

Frequently Asked Questions about areadetector-plugin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a custom EPICS areaDetector plugin to process NDArray image frames?

To create a custom EPICS areaDetector plugin, implement the processCallbacks method within an NDPluginDriver to analyze or transform NDArray pixel data. You must use NDPluginDriver beginProcessCallbacks and endProcessCallbacks lifecycle methods for safe queued processing.

How do I write a custom areaDetector file writer plugin for an EPICS IOC?

Writing an areaDetector file plugin requires implementing the NDPluginFile openFile, writeFile, readFile, and closeFile operations. This streams NDArray frames to disk or recreates arrays from files within your EPICS IOC acquisition chain.

When do I need to copy NDArray data in an areaDetector processing plugin?

You need to copy NDArray data in an areaDetector processing plugin when your processCallbacks method modifies the pixel data. Using NDArray pool copy rules ensures the input frame remains intact for downstream chained plugins.

Can I chain a custom areaDetector processing plugin into an existing acquisition pipeline?

Yes, you can chain a custom areaDetector plugin into an existing pipeline. The NDPluginDriver base infrastructure supports multi-threaded execution, queued processing, and downstream handoff so your plugin integrates seamlessly into standard areaDetector workflows.

What is the best way to add a thresholding or filtering step to an areaDetector IOC?

The best way to add thresholding or filtering to an areaDetector IOC is building a custom NDPluginDriver plugin. By implementing processCallbacks, you can transform NDUInt16 frames and automatically pass processed images to downstream stages.