• No results found

2.5 Conclusion

3.1.1 Detector System Specifications

3.1.1.4 Software Application

In order to acquire and analyse data for the experiments planned in this thesis, a graphical user interface has been designed and coded in C++ using the QT5 framework (The Qt Company, Helsinki, Finland). The author of the thesis was heavily involved in the development and maintenance of the software application, along with two colleagues. The application runs on a Microsoft Windows based PC and connects to the DAS via a USB 2.0 link. The main features of the application are:

• Upload acquisition parameters to the FPGA - e.g integration time, length of acquisition, trigger frequency etc

• Start and stop the acquisition

• Receive data frames from the FPGA

• Save data frames to file for later processing

• Display frame-by-frame and cumulative integral detector response on screen during an acquisition

• Automated baseline subtraction and equalisation procedure

• Post processing tools such as exporting mapped integral response or exporting the time resolved response of a single diode

The software is split into two main tabs; acquisition and analysis. Figure 3.6 shows the main screen of the acquisition tab. From here the user enters their desired ac- quisition length, range (sensitivity), integration time, buffer size (amount of data transferred from the FPGA to PC in each communication event) and trigger fre- quency. There is also the option to toggle the external trigger, for example to synchronise the acquisition with the linac electron gun pulse.

Above the acquisition parameters is the real-time visualisation panel, in this case the MP512 2D detector geometry is shown. This section displays both the instanta- neous and cumulative integral detector response during an acquisition. The colour scale is normalised to the maximum detector response during the acquisition. Al- ternatively, a histogram display can be selected which shows the response of each detector channel in a linear bar graph.

The auto-decode option will trigger the file to be decoded immediately after the acquisition. The raw data files are saved in a binary format and contain hexadecimal values generated by the DAS. The decode function converts the binary hex files into text files. The resulting text file is a matrix of 512 columns (corresponding to the number of channels in the system (8 × 64 channel AFEs)). The number of rows depends on the acquisition frequency and length of measurement. The values generated in the text file are proportional to the detector response and depend on what range (sensitivity) the acquisition was performed at. For example, the default range setting of 7 means each integrator in the AFE will accumulate 9.6pC before registering a ’count’. The total counts for each channel in each data frame is then expressed as a value between 0 and 65535 - i.e values have 16-bit resolution. A value of 65535 represents a full scale reading and a value of 32766 represents approximately a half scale reading. The range can be changed to ensure the detector is not saturating for a given set of experimental conditions.

Data files are automatically named with the date and time of acquisition and all of the acquisition parameters. For example a typical file name would be ”11-12-16 15- 12-13 AcqLength-70s IntTime-78us Range-7 Freq-360Hz.dat”. A logfile feature ex- ists to relate each data file to a description of the acquisition. The user is prompted to enter a description after initiating each measurement. The logfile is then used at a later date for opening the data files for analysis.

The second major tab of the software application is the analysis tab, shown in figure 3.7. From here the user can use the ’Read Log’ button to open a logfile from an experimental session and browse all of the data files associated with that particular session. The user can decode or load files directly from the logfile by double clicking. A file has to be decoded first before it can be loaded for analysis.

Figure 3.6: Main screen on the acquisition tab of the software application

Data files can be separately decoded and loaded outside of the logfile environment with the ’Decode File’ and ’Load File’ buttons, respectively. This is particularly useful if a user has defined their own folder structure when saving data files or has a paper logbook.

The metadata from each measurement is displayed front and centre for quick refer- ence. This includes date and time of measurement, acquisition length and frequency, integration time and range. These values are read directly from the filename of the currently loaded datafile. Above the metadata is the visualisation panel. Similarly to the acquisition tab, this consists of an instantaneous and cumulative integral de- tector response. In figure 3.7 the MP512 2D detector geometry is displayed and the resulting dose map can be seen. Controls exist below the instantaneous display to step through the dataset as a function of time. The display then updates to show the detector response at that particular point in time.

The pixels in the integral map are interactive, single pixels or entire rows or columns can be selected. If a single pixel is highlighted and the users hits ’Enter’ on the keyboard then a dialog popup displays the response of that individual pixel as a function of time. From there this data can be saved to an additional file for offline processing. If a row or column is selected and the user hits ’Enter’ then a dialog popup displays a profile generated for the integral response of each of the pixels in the row or column. This subset of data can also be saved for offline analysis. In addition to the dose map display, the analysis tab can also display the detector response as a 1D histogram, as shown in figure 3.8. This is useful for testing and debugging the system.