golosio / xrmc

17 stars 10 forks source link

XMIMSIM but keep line spectrum #49

Open woutdenolf opened 4 years ago

woutdenolf commented 4 years ago

Would it be possible to use xmimsim for detector response (attenuation, escape peaks,...) but obtain the line spectrum?

Newdevice detectorconvolute
detector
...
Save detector Image output/detector_lines.dat  # lines but does not include detector response
Save detector ConvolutedImage output/detector_convoluted.dat  # spectrum
tschoonj commented 4 years ago

Hey Wout,

You mean that you don't want to include detector peak broadening when generating the ConvolutedImage? That is not possible, also not in XMI-MSIM by the way: in the detector response function everything is optional except peak broadening 😄

woutdenolf commented 4 years ago

I want everything except peak broadening with xrmc+xmimsim (if possible).

xmimsim-pymca has --spe-file-unconvoluted. I see lines and escape peaks so I assumed it includes everything except noise/fano broadening, which is what I want, but then with xrmc.

I thought I could do this with xrmc+xmimsim (detectorconvolute) but Save detector Image output/detector_lines.dat does not show escape peaks, so probably none of the xmimsim response calculations. Save detector ConvolutedImage output/detector_convoluted.dat includes the xmimsim response but also the noise/fano broadening.

woutdenolf commented 4 years ago

xmimsim-pymca has --spe-file-unconvoluted. I see lines and escape peaks so I assumed it includes everything except noise/fano broadening, which is what I want, but then with xrmc.

I thought I could do this with xrmc+xmimsim (detectorconvolute) but Save detector Image output/detector_lines.dat does not show escape peaks, so probably none of the xmimsim response calculations.

tschoonj commented 4 years ago

Escape peaks are not part of the unconvoluted spectra (and they never have been) in xmimsim, xmimsim-pymca or xrmc+xmi-msim: they are generated as part of the detector response.

woutdenolf commented 4 years ago

So xmimsim-pymca --spe-file-unconvoluted=... doesn't contain any detector response? So it shouldn't change when changing the detector thickness for example?

tschoonj commented 4 years ago

That is correct. It's basically the data as it comes out of the 'regular' Monte Carlo simulation, which deals with sample interactions, so before it gets sent to the detector response.

Yes, the detector thickness should not influence this.... actually in old versions, the transmission efficiency correction was applied already before sending it to the detector response, so in this case the detector thickness would make a difference. Are you using 8.1?

woutdenolf commented 4 years ago

Yes I use 8.1. I'll check again, maybe I made a mistake somehow ...