From a19c989dd9ccfa7c0e4c51be2a67d0abc4b3856a Mon Sep 17 00:00:00 2001 From: bergamaschi Date: Thu, 4 Apr 2013 15:16:04 +0000 Subject: [PATCH] slsReceiverUsers added to API documentation git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorsPackage@48 08cae9ef-cb74-4d14-b03a-d7ea46f178d7 --- Makefile | 21 ++----- manual/Makefile | 14 ++++- manual/manual-api/slsDetectorUsers.doxy | 2 +- manual/manual-main/Makefile | 16 +++-- manual/manual-main/generalDet-FAQ.tex | 63 ++++++++++++++++++- .../manual-main/singlePhotonCounting-FAQ.tex | 27 ++++++-- manual/manual-main/slsDetectors-FAQ.tex | 8 +-- 7 files changed, 115 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 64f0fb7ea..37e68778a 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ ASM=$(shell echo "/lib/modules/`uname -r`/build/include") -INCLUDES='-I. -I$(LIBRARYDIR)/commonFiles -I$(LIBRARYDIR)/slsDetector -I$(LIBRARYDIR)/MySocketTCP -I$(LIBRARYDIR)/usersFunctions -I$(LIBRARYDIR)/multiSlsDetector -I$(LIBRARYDIR)/slsDetectorUtils -I$(LIBRARYDIR)/slsDetectorCommand -I$(LIBRARYDIR)/slsDetectorAnalysis -I$(LIBRARYDIR)/slsReceiverInterface -I$(ASM)' +INCLUDES='-I. -I$(LIBRARYDIR)/commonFiles -I$(LIBRARYDIR)/slsDetector -I$(LIBRARYDIR)/MySocketTCP -I$(LIBRARYDIR)/usersFunctions -I$(LIBRARYDIR)/multiSlsDetector -I$(LIBRARYDIR)/slsDetectorUtils -I$(LIBRARYDIR)/slsDetectorCommand -I$(LIBRARYDIR)/slsDetectorAnalysis -I$(LIBRARYDIR)/slsReceiverInterface -I$(LIBRARYDIR)/slsReceiver -I$(ASM)' @@ -64,22 +64,13 @@ gui: slsDetectorGUI doc: $(shell test -d $(DOCDIR) || mkdir -p $(DOCDIR)) - $(shell test -d $(DOCDIR)/pdf || mkdir -p $(DOCDIR)/pdf) - cd $(LIBRARYDIR) && make doc DOCDIR=$(DOCDIR) - cd $(CLIENTDIR) && make doc DOCDIR=$(DOCDIR) - cd $(GUIDIR) && make doc DOCDIR=$(DOCDIR) - cd $(CALWIZDIR) && make doc DESTDIR=$(DOCDIR) - cd $(MANDIR) && make DESTDIR=$(DOCDIR) + cd manual && make all DESTDIR=$(DOCDIR) htmldoc: make doc $(shell test -d $(DOCDIR) || mkdir -p $(DOCDIR)) - $(shell test -d $(DOCDIR)/html || mkdir -p $(DOCDIR)/html) - cd $(LIBRARYDIR) && make htmldoc DOCDIR=$(DOCDIR) - cd $(CLIENTDIR) && make htmldoc DOCDIR=$(DOCDIR) - cd $(GUIDIR) && make htmldoc DOCDIR=$(DOCDIR) - cd $(CALWIZDIR) && make htmldoc DESTDIR=$(DOCDIR) - cd $(MANDIR) && make html DESTDIR=$(DOCDIR) + cd manual && make html DESTDIR=$(DOCDIR) + clean: cd $(BINDIR) && rm -rf sls_detector_* slsDetectorGui slsReceiver angularCalibrationWizard energyCalibrationWizard @@ -89,8 +80,8 @@ clean: cd $(GUIDIR) && $(MAKE) clean cd $(RECEIVERDIR) && $(MAKE) clean cd $(CALWIZDIR) && $(MAKE) clean -# cd $(MANDIR) && $(MAKE) clean -# cd $(DOCDIR) && rm -rf * + cd manual && $(MAKE) clean + cd $(DOCDIR) && rm -rf * diff --git a/manual/Makefile b/manual/Makefile index d650fac33..b7571a518 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -5,7 +5,8 @@ DESTDIR?=../docs -MAINDIRS= manual-main manual-calwiz manual-calwiz manual-gui manual-client manual-api +MAINDIRS= manual-main +#manual-calwiz manual-calwiz manual-gui manual-client manual-api CLEANDIRS=$(MAINDIRS:manual-%=clean-%) PDFDIRS=$(MAINDIRS:manual-%=pdf-%) HTMLDIRS=$(MAINDIRS:manual-%=html-%) @@ -13,13 +14,22 @@ ALLDIRS=$(MAINDIRS:manual-%=all-%) all: $(ALLDIRS) + $(shell test -d $(DESTDIR)/pdf && rm -fr $(DESTDIR)/pdf) + mv pdf $(DESTDIR) + $(shell test -d $(DESTDIR)/html && rm -fr $(DESTDIR)/html) + mv html $(DESTDIR) pdf: $(PDFDIRS) + $(shell test -d $(DESTDIR)/pdf && rm -fr $(DESTDIR)/pdf) + mv pdf $(DESTDIR) html: $(HTMLDIRS) + $(shell test -d $(DESTDIR)/html && rm -fr $(DESTDIR)/html) + mv html $(DESTDIR) clean: $(CLEANDIRS) - + rm -fr $(DESTDIR)/pdf + rm -fr $(DESTDIR)/html all-%: echo diff --git a/manual/manual-api/slsDetectorUsers.doxy b/manual/manual-api/slsDetectorUsers.doxy index 380596144..e096ed1fe 100644 --- a/manual/manual-api/slsDetectorUsers.doxy +++ b/manual/manual-api/slsDetectorUsers.doxy @@ -81,6 +81,6 @@ LATEX_HIDE_INDICES = YES PREDEFINED = __cplusplus -INPUT = slsDetectorUsers.h detectorData.h +INPUT = slsDetectorUsers.h detectorData.h slsReceiverUsers.h OUTPUT_DIRECTORY = slsDetectorUsersDocs diff --git a/manual/manual-main/Makefile b/manual/manual-main/Makefile index b2ea53dbe..1725dc6cf 100644 --- a/manual/manual-main/Makefile +++ b/manual/manual-main/Makefile @@ -1,8 +1,4 @@ -DESTDIR?=../docs - - -#manual-api manual-calwiz manual-client manual-gui manual-main - +DESTDIR=../ TEX=latex @@ -27,12 +23,20 @@ all: $(PDFS) $(HTMLS) echo $(HTMLS) pdf: $(PDFS) + $(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR)) + $(shell test -d $(DESTDIR)/pdf || mkdir -p $(DESTDIR)/pdf) + mv $(PDFS) $(DESTDIR)/pdf html: $(HTMLS) + $(HTMLS): $(TEXS) $(MAINTEXS) + $(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR)) + $(shell test -d $(DESTDIR)/html || mkdir -p $(DESTDIR)/html) + $(shell test -d $(DESTDIR)/html/$@ && rm -fr $(DESTDIR)/html/$@) latex $@.tex - latex2html -split 4 $@.tex + latex2html -split 4 $@.tex + mv $(HTMLS) $(DESTDIR)/html %.dvi : %.tex $(TEXS) diff --git a/manual/manual-main/generalDet-FAQ.tex b/manual/manual-main/generalDet-FAQ.tex index 3caf7009f..1b3caf646 100644 --- a/manual/manual-main/generalDet-FAQ.tex +++ b/manual/manual-main/generalDet-FAQ.tex @@ -1,10 +1,69 @@ \section{In which X-ray energy range can I use the detector?} +What limits the energy range in which the detector can be used is defined both by the sensors characteristics and the readout electronics. -General remarks about sensor efficiency and electronic noise +\subsection{Sensors} +Most of the SLS detectors make use of silicon sensors. -\section{What is the electronic noise?}\label{sec:noise} +Since silicon is a relatively light for hard X-rays the only limitation at high energies is the acceptable absorption efficiency that can be achieved in the sensors thickness.\\ +Figure~\ref{fig:effidet} shows the absorption efficiency as a function of the X-ray energy and detector thickness. Normally it is possible to use sensors up to 1~mm thick, while to achieve larger absorption thicknesses it is necessary tu assemble and control telescopic systems (possible up to a few mms).\\ +To achieve larger absorption thicknesses, the sensors can be oriented in edge-on configuration (in particular strip sensors). However in this case one should take into consideration the dead entrance window due to the cutting distance from the strips, which is normally several hundreds micron, or even up to mms and reduces the absorption efficiency at lower energies. + +\begin{figure} +\caption{Efficiency of a silicon sensor as a function of the sensors thickness and X-ray energy.}\label{fig:effidet} +\includegraphics[width=\textwidth]{images/effiSiHardXRays2} +\end{figure} + +In standard face-on orientation, the backplane of the sensor acts as the entrance window. It presents a think n+ doped layer, which is unsensitive to radiation and causes a loss of efficiency at low energies. +Figure~\ref{fig:effiback} shows the absorption efficiency of the sensors for different backplane thicknesses at low energies.\\ +The exact thickness of the backplane for standard SLS sensors is not exactly known but should be about 1-2~$\mu$m. + +\begin{figure} +\caption{Efficiency of a silicon sensor as a function of the X-ray energy for different thicknesses of the backplane.}\label{fig:effiback} +\includegraphics[width=\textwidth]{images/effiThinkBackplanes} +\end{figure} + +However for lower energies, the main limitation is normally given by the noise of the frontend electronics (if single photon resolution is required).\\ +For higher energies it is also possible to use different sesnor materials as CdTe or Ge, although up to now they cannot provide the same signal quality as silicon. + + +\subsection{Frontend electronics} + +The limitations on the energy range arising from the readout electronics come from the noise and from saturation. +The electronic noise limits the minimum detectable energy for single photons, while saturation limits the maximum detectable signal either for single photons or in total. +\begin{itemize} +\item In \textbf{single photon counting detectors}, the minimum threshold cannot be set lower than 3-5 times the electronic noise. +If the threshold is set at approximately half of the X-ray energy (see specific documentation about single photon counting detectors), the minimu detectable energy will be about 6-10 times the noise.\\ +In order to reduce the noise of the frontend electronics different settings can be chosen, but this puts a limit on the maximum incoming flux that can be detected without incurring in pileup (see specific documentation about single photon counting detectors). Figure~\ref{fig:mythensett} shows an example of the settings used for the MYTHEN detector for different energy ranges and fluxes.\\ +For state of the art single photon counting detectors, the minimum thrshold can be about 2-3~keV (details depend on the detector and can be further reduced using special settings). + +Concerning saturation, this imposes a maximum value for the comparator threshold. Normally photons of higher energies can still be detected, but without resolution concerning the threshold energy and eventually losing spatial resolution. +By changing the settings it is possible to increase the maximum threshold value (normally also noise increases in this case). + +\item For \textbf{charge integrating detectors} the electronics noise puts a limit on the minimum detectable signal. Therefore if single photon resolution is required, the minimum detectable energy is defined as for single photon counting detectors at about 6-10 times the electronic noise. In case no single photon resolution is required, the electronic noise will put a limit on the sensitivity of the detector i.e. the total accumulated signal needs to be larger than 6-10 times the noise in order to be detected (also about 2-3~keV depending on the detector). It is important to point out that the acquisition time of charge integrating detectors is limited by the leakage current of the sesnors and the noise quadratically sums out. Therefore the signal for low energy photons should be strong enough to be acquired during single frames. + +Concerning saturation, this sets a limit on the total number of photons acquired during the acquistion slot and is normally much larger than the energy released by single X-rays. Dynamic gain switching can strongly increase the dynamic range of the detector up to 10E+4 12~keV photons. + + +\end{itemize} + + +\begin{figure} +\caption{Settings to be chosen for the MYTHEN detector as a function of the X-ray energy and radiation intensity.}\label{fig:mythensett} +\includegraphics[width=\textwidth]{images/settings} +\end{figure} + +%\section{What is the electronic noise?}\label{sec:noise} \section{What limits the maximum frame rate?} +In order to acquired the data, they should be: +\begin{itemize} +\item Transferred from readout electronics to readout board memory. This readou time is very dependent on the detector and on the dynamic range chose (for single photon counting detectors if configurable) and can range from hundreds or tens to few us. \\ +In case the board has some memory that can be accessed by the hardware, this is the only limitation on the maximum frame rate as long as the memory is not filled (burst mode). Frame rates as high as a few tens of kHz can be achieved for photon countign detectors (EIGER) or up to 1~MHz for charge integrating (GOTTHARD). + +\item Transferred from readout board to client PC or file server. In this case the main bottleneck is normally given by the data transfer rate on the network and on the performances of the receiver PC. This limits the frame rate in continous mode. However also the data writing capabilities and amount of data which are being acquired should be taken into consideration when setting up very fast acquisitions. + +\end{itemize} + diff --git a/manual/manual-main/singlePhotonCounting-FAQ.tex b/manual/manual-main/singlePhotonCounting-FAQ.tex index 6c2eaa89f..d0c4bdb1c 100644 --- a/manual/manual-main/singlePhotonCounting-FAQ.tex +++ b/manual/manual-main/singlePhotonCounting-FAQ.tex @@ -2,9 +2,17 @@ \section{Which detector settings should I choose?} -The choice of the operation settings is very important in order to obtain good quality data. +The choice of the operation settings is very important in order to obtain good quality data. \\ +Normally slower settings will reduce the electronics noise and therefore it is possible to work at lower energies, but will saturate for high photon fluxes.\\ +On the other hand, faster settings will allow to work with higher photon intensities without pileup, but not to access lower energies because of an higher electronics noise.\\ +Therefore it is extremely important to chose adequate settings for the detector depending on the X-ray energy and expected maximum count rate. +In the following is a description of the energy and intensity range coverd by the different settings for each detector. + + +\subsection{MYTHEN} + Normally the user can follow these rules: \begin{enumerate} \item If the X-ray energy is lower than 8~keV the \textit{High gain} setting should be used. Since it is a slow mode of operation it is necessary to take care that the maximum count rate is lower than 100~kcounts/s for all channels (use filters to reduce the beam intensisty). @@ -13,8 +21,6 @@ Normally the user can follow these rules: \item In case a larger count rate is required in order to keep the acquisition time shorter, the \textit{Fast} setting must be selected. However the maximum count rate should never exceed 1~Mcounts/s for all channels. \end{enumerate} -\subsection{MYTHEN} - \begin{figure} \begin{center} @@ -81,8 +87,9 @@ If the range where both requirements are satisfied is large, try to increase the \caption{Example of data from a sample emitting fluorescent light and detector threshold set at a value close to the emission line. The background data cannot be properly flat field corrected.}\label{fig:samplefluo} \end{figure} +\section{How does the flat field correction work?} -\section{Why isn't my flat-field flat?} +\subsection{Why isn't my flat-field flat?} The main reasons of a non flat flat-field can be: \begin{itemize} @@ -91,7 +98,7 @@ The main reasons of a non flat flat-field can be: \begin{center} \includegraphics[width=\textwidth]{images/bad_ff_col} \end{center} -\caption{Example of a very bad flat field data set with highlights of some of the reasons which can cause the non-flat behavior.}\label{fig:badff} +\caption{Example of a very bad flat field data set with highlights of some of the reasons which can cause the non-flat behavior for the MYTHEN detector. Similar effects can be visible also in 2D.}\label{fig:badff} \end{figure} \item The entrance window for the X-rays is deformed (we also have this problem at the SLS). In this case when you move the detector the "mountain" moves with it in angle (And remains still in channel number). However this should correct without problems with the flat field correction, even in case of fluorescent emission. Should appear at all energies. @@ -112,11 +119,19 @@ These differences get much worse in presence of fluorescent emission, but normal \begin{center} \includegraphics[width=\textwidth]{images/ff_calibration} \end{center} -\caption{Variations in the flat field due to a non precise energy calibration or trimming of the detector modules.}\label{fig:ffcal} +\caption{Variations in the flat field due to a non precise energy calibration or trimming of the detector modules for the MYTHEN detector. Similar effects can be visible also in 2D.}\label{fig:ffcal} \end{figure} \end{comment} + \subsection{Dynamic acquisition of the flat field} +In case it is not possible to uniformely illuminate the detector due to its large dimensions, one of the solutions is to scan it in front of an illuminated are with a uniform speed such that the integrated number of counts during the exposure time is the same for all channels.\\ + +To do that, at the SLS we have optimized the dynamic acquisition of the flat fiel with the MYTHEN detector using a setup similar to the one sketched in figure~\ref{fig:ffsetup}. +It is important that the scanning range of the detector is chose such that the detector is not illuminated both at the beginning and at the end of the acquisition. Moreover the movement of the detector should be as uniform as possible. To avoid this kind of systematic errors we normally sum two flat field images taken in the two opposite directions of translation.\\ + +Also take care that your sample does not emit fluorescent light at the chosen energy (e.g. a glass rod works at all energies, but heavier materials can be chosen to increase the efficiency at higher energies taking care that the fluorescence emission is negligible). + \begin{figure} \begin{center} \includegraphics[width=\textwidth]{images/FFSetup} diff --git a/manual/manual-main/slsDetectors-FAQ.tex b/manual/manual-main/slsDetectors-FAQ.tex index 730fb86b4..20b7ac058 100644 --- a/manual/manual-main/slsDetectors-FAQ.tex +++ b/manual/manual-main/slsDetectors-FAQ.tex @@ -113,16 +113,16 @@ \input{slsDetector-softFAQ} \chapter{General questions about detectors} -%\input{generalDet-FAQ} +\input{generalDet-FAQ} \chapter{Single photon counting detectors} -%\input{singlePhotonCounting-FAQ} +\input{singlePhotonCounting-FAQ} \chapter{Charge Integrating detectors} -%\input{chargeInt-FAQ} +\input{chargeInt-FAQ} \chapter{Angular conversion} -%\input{angConv-FAQ} +\input{angConv-FAQ} \end{document}