XENONnT / WFSim

Waveform simulator
BSD 3-Clause "New" or "Revised" License
7 stars 9 forks source link

S2 Photon timing downsampled for large time in instruction #425

Open FaroutYLq opened 10 months ago

FaroutYLq commented 10 months ago

When taking a instruction with huge timestamp (also in int64), you will have weird S2 waveforms, where the photons timing are downsampled. More discussion here. It is true to all S2s simulated.

Example for simulation using big time instruction

import cutax
st = cutax.xenonnt_sim_base(output_folder='/scratch/midway3/yuanlq/wfsim')
st.set_config({"fax_file" : "/project/lgrandi/yuanlq/wimp/s2sim/021952-9-se-all-20.csv"}) # feel free to check
se_peaklets = st.get_array('021952_se', 'peaklets')

for p in se_peaklets[:100]:
    if p['dt']==10:
        plt.plot(p['data'])
plt.xlabel('Sample [10ns]')

image

Example for simulation using small time instruction (what people usually do)

st = cutax.xenonnt_sim_base(output_folder='/scratch/midway3/yuanlq/wfsim')
st.set_config({"fax_file" : "/project/lgrandi/yuanlq/wimp/s2sim/jy_se_f6191.csv"}) # the first 100 rows of /project/lgrandi/jyangqi/se_sim_stuff/se_f6191.csv

se_peaklets = st.get_array('se_f6191', 'peaklets')
for p in se_peaklets[:100]:
    if p['dt']==10:
        plt.plot(p['data'])
plt.xlabel('Sample [10ns]')

image

The issue is suspected to happen when int64 were casted into float.

ramirezdiego commented 7 months ago

Solution in https://github.com/XENONnT/fuse/pull/171.