Pixelman - Manual

Pixelman has an open and flexible modular architecture with custom-made plugin support enhancing its functionality to fit experiment needs. The core of Pixelman is composed of several parts - Medipix Manager, Medipix Control library and Hardware Libraries. Hardware libraries provides access to connected Medipix2. One hardware library corresponds to each interface type - MUROS, USB, Dummy. Dummy hw library simulates connected Medipix2 and is present mainly for developers. Medipix Control library manages all connected Medipix2 devices, their settings, configuration files, buffers for data, and provides access to them for Medipix Manager. Medipix Manager manages communication between all parts - initialize plugins, handle functions registered by plugins, provides access to Control library for plugins, handles events and much more. All other functionalities including most of user interface are implemented as plugins. The architecture can be seen in following figure.

arch.png, 51kB

Pixelman directory structure

dirstruct.png, 14kB

Pixelman main directory contains core files - MpxCtrl.dll, MpxManager.dll, MpxMgrUtils.dll and MpxLoader.exe. Only these files are really required to run Pixelman. Other files that might be present are:

Configs directory contains default configuration files for individual Medipix devices and cofig. files for plugins. The files with extension mcf (mcf stands for "medipix configuration file", ASCII file) contain settings like polarity, Medipix2 DACs values etc. The files with extension bpc ("binary pixels configuration") contain default pixel configuration (mask bit, test bit, THL bits, THH bits, binary file - one byte for each pixel). These files hold last configuration of each device - this configuration is loaded when Pixelman is loaded and are replaced by current configuration during Pixelman exit. The name of configuration file is derived in the following way: if chip is Medipix2 MXR (which contains unique "wafer position" identification) the name is interfacename_uniqueid, if chip is non-MXR and interface is USB (which contains serial number) the name is USB_serialnumber. If chip is non-MXR and interface is MUROS the name is muros_1001, muros_10002, etc.

Hwlibs directory contains HW libraries and configurations files for individual interfaces (currently MUROS, USB, Dummy). dummy_2000.txt contains reference picture used as output of dummy devices. Number of dummy devices can be specified in mpxHwDummy.ini. If you want different output from different dummy devices add dummy_2001.txt, dummy_2002.txt, etc. and set Unique=1 in mpxHwDummy.ini.

Plugins is a default directory for plugins (they can be placed in any directory, this is just preferred location).

Starting Pixelman

Run Medipix Loader (MpxLoader.exe) to start. Loader is just simple application which loads and initialize Medipix Manager. The rest of initialization is done by Medipix Manager. During initialization Pixelman creates tray icon which will appear on the task bar. Right click on the icon to open tray menu. For each detected device there will be submenu with name derived in the following way: if chip is Medipix2 MXR (which contains unique "wafer position" identification) the name is devID - interfacename uniqueid (e.g. "1 - muros I10 - W13"), if chip is non-MXR and interface is USB (which contains serial number) the name is devID - usb serialnumber. If chip is non-MXR and interface is MUROS the name is devID - muros 1001, devID muros 10002, etc. "devID" is Pixelman internal number assigned to detected device (starting from 0, and increasing for each detected device). The submenu contains menu items which were created by registered plugins and are unique for each detected device. Each item usually opens user interface for corresponding plugins (e.g. Medipix Control opens window of MpxCtrlUI.dll plugin, Threshold equalization opens dialog for equalization etc.). Plugins in these sub menus are so called "per-device plugins" which opens window which controls single Medipix device. So for each detected device you have one window (or set of windows). Example of such plugin is DAC control panel. You can have this panel open for each detected device. The second group of plugins are so called "global plugins" which are not bound to single device. They can control all plugins simultaneously or not use Medipix devices at all. So these plugins have only one set of user interface totally (and not one set per device). Example of such plugins are e.g. Coincidence plugin (which controls several devices at time) or Frame Browser plugin (which does not access Medipix at all). These "global" plugins are currently contained in "Utilities" submenu.

tray.png, 5,9kB

Other items in tray menu are:

Managed items window:

managed_items.png, 17kB

Medipix Control UI

Medipix Control UI is plugin which provides simple interface for acquisition control. There are several windows - main window, preview window and settings sheet.

Main window

Acquisition can be started by clicking Start button (or through menu Acquisition->Start). If acquisition is running it can be aborting by clicking the same button which is changed during acquisition to Abort (Acquisition->Abort). If any error occurs it will be shown in Info and error messages list box. The following options are available:

main.png, 6,4kB

The structure of File menu:

mpxctrlui_filemenu.png, 2,8kB

The structure of Acquisition menu:

test_pulse.png, 2,7kB

The structure of Options menu:

Settings sheet

Settings sheet is invoked by Options->Device Settings:

Device Settings/Info page

Acquisition settings:

Digital Test:

After clicking "Test now" button digital test is performed. That means that random matrix is written to chip a read back, if values are different for some pixels it means its digital part does not work correctly. If "Show in preview" is checked the result of test is displayed as a frame in Preview window (bad pixels have value of 1, good 0). If "Mask bad pixels" is checked the pixels which fails digital test are masked.

Device info part contains basic information about device like Medipix type, Mpx ID, interface name, number of chips, parameters of HW timer.

mpxctrlui_devsettings.png, 7,8kB

Medipix DACs page

DACs page allows to control Medipix DACs and shows corresponding analog values. This page is generated dynamically according to detected Medipix type. If you have quad you can select chip number in Chip number combo box. If one clicks Refresh Sense button the analog values are read again. If you change DACs value click Apply button to send new DACs values to Medipix and to automatically refresh analog values. If you change DACs values and click OK button the values will be send to chip and settings dialog will be closed. After clicking Default Values button the default values will be set.

mpxctrlui_dacsettings.png, 8,4kB

Interface Specific Info page

Interface Specific Info page shows informations which are relevant only for current type of interface. These informations are received from hw libraries as a list of "unknown" items which are fed to list box. The highlighted items are editable and can be used for controlling certain interface-specific settings. You can edit by clicking on item (to have focus on item) a then click second time to edit item. If item is boolean type you can write "TRUE", "true" or just "1" for true settings (similarly for false). If Auto refresh is checked the items are read-back from hw library in regular intervals (useful e.g. for bias monitor in USB interface).

Interface Specific Info for MUROS shows informations Nidaq version installed, type of NI board, Muros clock frequency. The editable items are:

mpxctrlui_ifacespec_muros.png, 8,3kB

Interface Specific Info for USB displays a lot of informations about current settings which are not particularly interesting for common user. Here is few basic option:

mpxctrlui_ifacespec_usb.png, 10kB

Interface Specific Info for Dummy. Editable items:

mpxctrlui_ifacespec_dummy.png, 7,4kB

Preview window

The visibility of preview window can be set in Options menu. This preview can be used to watch the progress of current serie of acquisitions or to browse frames which were already taken (including the acquisition to files) in last series of acq. Browsing/visualization of frames can be controlled by these UI elements:

mpxctrlui_preview.png, 67kB

The structure of File menu:


Options menu:


Service Frames menu contains "special frames" that represents currently set pixels configurations. If you want to return to "normal" frame just uncheck currently selected service frame.

mpxctrlui_prev_THL.png, 100kB

Zooming in preview:

You can easily zoom in by holding left-mouse button and dragging mouse to create selection rectangle. After releasing mouse button image view will zoom to selected area. If you want to return to original state you can just double click with left mouse button on the image.


Context menu:

If you right click on the image the context menu will appear. It contains following items:

If you just click on just one pixel you can see currently selected THL/THH/Mode - there is check mark for currently set value.

mpxctrlui_prev_context.png, 58kB

Threshold equalization

Threshold equalization is a procedure which exploits 3-bits (4-bits Timepix) THL/THH adjustment to make overall threshold as homogenous as possible. It finds distribution of thresholds for each adjustment value and selects for each pixel such adjustment that its threshold is as near as possible to average of means of threshold distributions.

thequal.png, 15kB

THL equalization - THL is scanned from above noise to the direction of noise (real direction depends on Mpx type/polarity). If certain condition (number of counts) is reached for a THL value then the value is added to THL distribution. The condition for THL selection depends on eq. type:


THH equalization - THL should be equalized and set above noise. THH is scanned from above the noise to the direction of noise (it is used the transition from window mode to single mode). If certain condition (number of counts) is reached for a THH value then the value is added to THL distribution. The condition for THH selection depends on eq. type:


Equalization setting:


Acquisition options:


THL/THH range - set "From", " To" and "Step". You do not need to care if "From" should be bigger than "To " - equalization procedure will select it properly according to Medipix type and polarity which is selected.


Threshold Count - defines the value (for equalization with noise/source) which has to be reached to consider the current value of THL/THH as threshold.


Progress:


Results for selected chip (chip is selected by clicking on button Chip 0, ...)


Distribution plot - each color corresponds to distribution when certain th. adjustment is set (e.g. if interpolation is enabled red is for adj=0, blue for adj=Max and black for equalized adj. bits.).


Structure of menu

DACs Scan

This plugin allows to see response of detector while scanning over a selected range of any Medipix DAC or selected "window" of any two DACs. It is useful e.g. for spectroscopic measurement with Medipix2 (with selected THL-THH window) or for quick scan of THL/THH before equalization (to find proper range for THL/THH).

dacscan.png, 11kB

Scan options:


Acquisition:


Plot:


Progress:


Structure of menu

DACs Dependency Scan

This scan shows the dependency of sensed values on digital codes of Medipix DACs. Check the DACs which you want to scan (you can check/uncheck all with buttons Check all and Clear all ), select the range and step in From, To, Step edit boxes and click on Start button. If Set DACs defaults is checked the DACs will be set to default middle value (128 for most) for duration of scan. Each DACs which was selected will have its curve in graph. The curve has same color as background of the corresponding check box. If you want output to file check Output file and specify (or browse with "..." button) filename before starting the scan. If you check Append range the scan range will be appended to file name, e.g. if you specify "scan.txt", the name of file will be "scan_From-To_step Step.txt" (e.g. "scan_0-255_step10.txt"). The file contains column of values for each scanned DAC, on the first line there are DAC names as heading.

dependency.png, 11kB

DAC Control Panel

DAC Control Panel allows to instant change DACs values during series of acquisition. If the change is not possible do immediately (e.g. acquisition is running) the operation is postponed. If device has several chips you can select chip with Chip number combo box. The Effective threshold displays the difference of sensed values THL/THH and FBK. If you click Settings button the dialog will appear. You can check the DACs which you want to control via DAC panel. You can use Save as default button to save current DACs selection as default - if new chip is connected and there is no DAC Control Panel *.ini file for this device this default configuration will be used.

This plugin is especially useful if you need find noise level of some chips (with certain settings) - just run few hundreds of short acquisition (e.g. 0.1 s) and control THL slider with mouse wheel or arrow keys. You can also observe what other plugin (e.g. Threshold equalization) does with DACs - each DAC change is immediately visible on DAC panel.

dacpanel_full_res.png, 22kB
dacpanel_settings.png, 3,5kB dacpanel_sel.png, 3,3kB

Frame Browser

Frame Browser is plugin for easy managing of measured data (frames). It allows to browse currently measured frames, display informations about their attributes, loading frames from files, saving frames to files, browse directories on disks and displaying any frame from disk.

fb_main1.png, 13kB

Frames in Pixelman

"Frame" is an object representing measured or created data in Pixelman. It consists from data buffer (possible types: i16 (2 bytes integer), u32 (4 bytes unsig. integer), double (8 byte floating point)) and attributes associated with frame. Each frame has ID number which is unique during Pixelman run. Attributes are associated data (of any type) which are added to frame by the Pixelman (e.g. by MpxCtrl layer) or by any Pixelman plugin. E.g. frame from acquisition contains informations about acq. and Medipix settings (like acq. mode, acq. time, Mpx ID, DACs,...). If frame is saved 2 files are created - data file which contains frame data (as ASCII matrix or binary stream) and description file (*.dsc) which contains information about frame type and also frame attributes. Every frame created is available to all plugins. Any plugin can "open" frame to ensure that frame will not be deleted by Pixelman. Each "open" operation increase "Reference counter", each "close" decrease it. Once "Reference counter" reaches zero frame is deleted by Pixelman.

Frame browser is composed of 3 "panels": browse tree, simple preview and attributes panel. Browse tree can display Frames in the system or Browse files on disks (these panels can be switched by Frames and Browse files buttons or in menu by Options->View Frames/View Disk or by accelerator Ctrl+1, Ctrl+2) . As you move with focus (caret) in browse tree simple preview displays the frames immediately and frame attributes panel is updated as well. If you want to display the frame in "Full Preview window" you can double click with left mouse button or press "Enter" on the selected frame.

fb_preview.png, 54kB

To perform operation on several frames you can select them one by one by Ctrl key or select interval of items by Shift key. If whole folder is selected the operation is performed to all items in folder.

If you right click in Frames browse tree a context menu appears. Following operations can be performed with selected frames:

If browse tree is switched to Browse files the following context menu appears after right click:

If you right click on small preview following context menu appears:


Structure of menu:

Filter Chain Editor

Filter Chain Editor is plugin for creating "Chain of filters". Filter is "special" function (that can be registered by any plugin) which has only one (beside userData par) parameter which is ID of frame. Filter will perform some work/computation and can (but it need not) change the frame. Such operations on frame can be chained to create one "processing pipeline" without need to maintain it (it is maintained by Pixelman) and any plugins can used it.

fcheditor.png, 8,9kB

Filter Chain combo-box contains all available filter chains (their names are classified by plugin name which created it). To create new filter chain or remove currently selected press New Filter Chain or Remove Filter Chain respectively. If filter chain is selected in Filter Chain combo-box the filters which are in chain are displayed in Contained filters list. Available filters list contains all filters registered in Pixelman. Use drag&drop from Available filters to Contained filters to add new filter to currently selected filter chain. If you want to change an order of filters use drag&drop too. Use "Delete" key to remove selected filter from current filter chain.

Example: Current "test" filter chain in the picture contains several filter: "Save ASCII", "Duplicate", "Quad 516 distribute", "Save ASCII". The filter chain will work in the following way: Once the filter chain is invoked (by any plugin, e.g. by selecting in Preview window) the filters are called one by one. First "Save ASCII" saves the input frame to file (to "files" subdirectory in Pixelman dir), then "Duplicate" is called which creates new frame which is duplication the input frame (to preserve original data), then "Quad 516 distribute" filter is called which change input frame (if it is frame from quad) from 512x512 to 516x516 to compensate for bigger pixel (counts in bigger pixel are distributed to small ones). Then "Save ASCII" is called again to store this recomputed 516x516 image to file.

Coincidence Control

Coincidence Control plugin is simple plugin for easy setting up several Medipix devices (connected via USB interface) to a coincidence system.

coinc_control.png, 16kB

Left list contains all devices which are currently connected via USB. If you check the device it will be added to Medipix device combo box. For each "active" (that means checked) device you can set coincidence parameters (Mode and Delay). You just select the device in combo box and check configuration bits of Mode and selects Delay. If you want to set Mode or Delay for all devices at once check corresponding Set for all checkbox.

If Output base file name remains empty measured frames are stored in memory otherwise they will be saved to files in ASCII format. File names are composed of selected Output base file name, device ID and index of frame. E.g. if Output base file name will be "c:\temp\data.txt" and you will have two devices (with device ID 0 and 1) connected to coincidence system data from first device will be written to files "c:\temp\data_0_000001.txt", "c:\temp\data_0_000002.txt", " c:\temp\data_0_000003.txt", ... and data from second one will be written to "c:\temp\data_1_000002.txt", "c:\temp\data_1_000003.txt", ...

Time controls how long the system will measure. If Time is set to zero the measurement will run until Abort is pressed. Result list contains: