MCA8000a
This programs implements control and readout of an
Amptek MCA8000a serial device.

The MCA8000a accepts input signals of 0 - +5V or
0 - +10 selectable by a hardware switch on the device.
The resolution of the spectrum can be selected by
software between 256 and 16384 channels.
The upper 1/32 channels are used for sliding scale
linearisation hence of e.g. 1024 channels only 992 contain
useful data.
Channel data are stored with 32 bits.
Input signals require no gate, the threshold is set by
software.
The preset acquisition time is selectable, 0 indicates no preset
The time can be real (wall clock) of ADC live time
Data acquisition may be stopped and restarted at any time.
The checkbutton On StartAcq clear: Spectrum data and time
selects if preset time or spectra should be cleared on restart.
Note:The spectrum is a priori stored in the MCA hardware
only with Fill Histogram it is copied into a histgram

The runtime[seconds] and the run state is displayed once/second
Note however that for performance reasons this runtime is not
read from the MCA8000d but taken from a wallclock and is
therefore only approximate. The real runtime and live time is
read from MCA8000d at Stop Acq, Fill Histogram or Print Status.

Data should be stored in a histogram. Number of channels and
axis ranges are determined by the selected resolution of the MCA.
E.g. resolution 1024 gives Nbins: 1024, low edge: 0, upper 1024.
The name of the hist is the date/time stamp of the time at
StartAcq e.g. h_20200416_090332, the title may be generated
automatically or defined by the user.
The automatic title contains the acquisition time (wallclock time
minus the time taken by possible intermediate readouts,
about 4 sec / readout) and the livetime (acquisition time minus
the deadtime induced by digitisation, which is 5 usec / pulse)

Book Histogram may be issued at any time, Fill Histogram
uses the last booked histogram, if none exists yet it is booked
automatically.
Name and title of the histogram may given manually or generated
automatically
This is controlled by checkbuttons
Auto generate histo name or title

To display the histograms use List Objects in Memory from
HistPresents main menu.
Use Save Hist to ROOT or Save Hist as ASCII
to save the histogram in a ROOT- or text file
This refers to the last booked histogram
From the File popup menu any of the displayed histograms can
be saved in other formats
If a displayed histogram is closed it is removed from memory
so it should be saved to file in beforehand if required.


Automatic display of histograms
-------------------------------

Filling and displaying can be done automatically with selectable
repetition time.
If On StartAcq clear: Spectrum data and time is checked
the content is reset after display.
HistPresent shifts newly displayed histograms by an amount
which can be selected from Hpr-Options->Default Windowsizes
in the startup menu.

Note on permissions:
--------------------
To access the MCA8000a the user needs read/write permissions for
the serial device, normally /dev/ttyS0