Implementing custom detector model

Hello,

I’m trying to implement a custom detector model but I’ve been struggling with getting it working. I have put the model in a custom_models directory and I add it using model_paths, but when I try to run a simulation I get an error thrown:

(FATAL) Error during execution of run:
Could not find a detector model of type ‘medipix3_no_al.conf’

I’m not sure where I am going wrong, so any assistance would be greatly appreciated. My only idea is that maybe it’s something to do with how I am running allpix? I’m using it on a VM so I source the code from cvfms each time I login.

I’ve attached the configuration files that I’m using. dac_scan.conf is the main configuration file.
dac_scan.conf (472 Bytes)
charge_deposition.conf (783 Bytes)
medipix3_no_al.conf (614 Bytes)

Cheers,
Rory

Hi @rory_mcfeely ,

Are you running charge_deposition.conf and getting this error? There the model paths is set to ./, rather than a custom_models directory.
In principle it looks right, but it also depends a bit on what is in your detector_geometry.conf

In dac_scan.conf, it would be safer to give the path to the directory explicitly.

Kind regards,
Håkan

Hi Hakan,

I uploaded charge_deposition.conf by accident actually. I had meant to upload detector_geometry.conf. I’ll attach it to this reply.
detector_geometry.conf (128 Bytes)
It is dac_scan.conf which I am running and getting the error from.

Hi @rory_mcfeely ,

Ah, I see! This explains it. The type should not have the .conf suffix. So if you put
type = "medipix3_no_al"
it should work fine

Kind regards,
Håkan

Yes that along with ensuring I had the model_paths set correctly in the main configuration file seems to have solved it. Thanks for your help.

Cheers,
Rory