epics-modules / dxp

EPICS support for digital x-ray spectroscopy electronics from X-ray Instrumentation Associates (XIA)
2 stars 3 forks source link

How to set parameters of Ketek Detector in EPICS dxp module on Linux? #11

Open 1458861693 opened 4 months ago

1458861693 commented 4 months ago

Hi, I am using a Ketek Detector, I control this detector(microDXP) by EPICS dxp module on Linux. But there are some differences of use between EPICS dxp module and ProSpect Software. I want to know how to set these parameters in EPICS dxp module listed below. 1、Number MCA Bins. 2、MCA Bin Width. 3、Dynamic Range(KeV) 4、eV/Bin. The above parameters are able to be set in ProSpect as this picture.

image

But the above parameters are all RBV or not used in microDXP from dxp & MCA documentation. Could you tell me how to compute these parameters or set these? Looking forward to your reply. Thanks!

MarkRivers commented 4 months ago

I want to know how to set these parameters in EPICS dxp module listed below. 1、Number MCA Bins. 2、MCA Bin Width. 3、Dynamic Range(KeV) 4、eV/Bin.

These are explained in the documentation: https://epics-modules.github.io/dxp/dxpDoc.html

1458861693 commented 4 months ago

Thanks for your reply very much. Could you explain the second point detailedly? I find that I can set eV/Bin by change MaxEnergy, but I don't quite understand how to set the value of Gain and Fine Gain appropriately? In Additional, I want to know the differences between realTime and liveTime. When I want to set the acquire time or duration time, which value should I change? My question may be a bit simple, but there are some parts of the document that confuse me. Thanks again.

MarkRivers commented 4 months ago

I find that I can set eV/Bin by change MaxEnergy, but I don't quite understand how to set the value of Gain and Fine Gain appropriately?

You set Gain and Fine Gain so that the MaxEnergy that you specify matches reality when you do an energy calibration. For example, let's assume you can see the Ag Ka peak which should be at 22.1 keV. You set NUSE to 2048 and MaxEnergy to 30 keV. In that case the Ag Ka peak should be at channel 22.1/30*2048 = 1508. If you measure the actual peak position and it is 1300 then you need to increase the Gain or Fine Gain until that peak is actually at channel 1508. When it is then channel 2048 will actually be 30 keV.

In Additional, I want to know the differences between realTime and liveTime. When I want to set the acquire time or duration time, which value should I change?

There are 5 choices for the PresetMode

  1. No preset
  2. Preset Real Time
  3. Preset Live Time
  4. Preset Events
  5. Preset Triggers

If you select Preset Real Time then you set the time in the Prese Real field. If you select Preset Live Time then you set the time in the Preset Live field.

1458861693 commented 3 months ago

Thanks for your reply. I still have two questions. 1、I still have some doubts about Gain and Fine Gain. Is Fine Gain a more detailed adjustment? 2、How to calibrate the Energy in EPICS dxp module? I don't find the Energy calibration display in dxp module and mca module, except IDL MCA display. Is there any other tools to calibrate Energy in EPICS dxp? I have no experience using IDL. Thanks again very much.

MarkRivers commented 3 months ago

1、I still have some doubts about Gain and Fine Gain. Is Fine Gain a more detailed adjustment? Yes.

2、How to calibrate the Energy in EPICS dxp module?

The energy calibration needs to be done in a client program, there is no routine in the MCA record or dxp software to do the calibration. We use IDL for which I have written a class and a GUI to do the calibration. It basically finds the centroids of several peaks and fits energy to a linear or quadratic function of channel number. Those calibration values can then be written back into the MCA record.

1458861693 commented 3 months ago

Thanks for your help. Where is the IDL Energy calibration tool? I would greatly appreciate it if you could provide me with a network link. I have no experience using IDL program. Is there a user manual? or is there a Python Version to Energy calibration for MCA record and dxp software? Looking forward to your reply.

MarkRivers commented 3 months ago

IDL is commercial, so normally you need to buy it. I have packaged the mcaDisplay as an IDL .sav file, so it can be run for free under the IDL Virtual Machine. If necessary I could help you try that.

However, recently Ross Hrubiak has written a very nice Python program which is based on my IDL program, but does much more. It is located here: https://github.com/hp-edxd/hp-edxd

There is a paper describing it here: https://www.tandfonline.com/doi/full/10.1080/08957959.2023.2209731

If you cannot access the paper I can send you a PDF by e-mail.

1458861693 commented 3 months ago

Thanks, I will try hp-edxd software. If I calibrate Energy by ProSpect software on Windows, will some related parameters be written to microDXP? Do I need to correct the value of some PVs in dxp software or MCA record after Energy calibration by ProSpect software on Windows? Thanks again.

1458861693 commented 3 months ago

which GENSET table of microDXP of XIA is used in dxp software and MCA record? Is GENSET0? How to set used GENSET table in dxp and MCA software? I don't find this setting in dxp and MCA doc.

MarkRivers commented 3 months ago

If I calibrate Energy by ProSpect software on Windows, will some related parameters be written to microDXP?

No, the parameters are just in the EPICS software.

Do I need to correct the value of some PVs in dxp software or MCA record after Energy calibration by ProSpect software on Windows?

No, the ProSpect energy calibration is independent of the EPICS energy calibration.

which GENSET table of microDXP of XIA is used in dxp software and MCA record?

I don't know what GENSET is. I have not had to use that with EPICS.