mmc2json add an extra [ when there are multiple detectors

14 views
Skip to first unread message

Andrea Farina

unread,
Sep 9, 2024, 12:31:16 PM9/9/24
to mmc-users
Dear Qinquian,
I've found that mmc2json.m add an extra [ in the "Detector" section when multiple detectors are defined. This prevent the simulation from running. I use iso2mesh from github so the file uses that savejson.m version.
Thanks a lot!
Andrea

Qianqian Fang

unread,
Sep 9, 2024, 5:17:54 PM9/9/24
to mmc-...@googlegroups.com, Andrea Farina

thanks, this is now fixed - it was previously fixed in mcx2json, but I did not port it to mmc2json - now it is

https://github.com/fangq/mmc/commit/868cde3010e185e114d19216746f4155b8c568e9

--
You received this message because you are subscribed to the Google Groups "mmc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mmc-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mmc-users/2a5c2b6d-2ee0-4b79-ae6d-c4f4a0552c73n%40googlegroups.com.

Andrea Farina

unread,
Sep 9, 2024, 6:22:43 PM9/9/24
to mmc-users
Other two issues I've seen in mmc2json.m right now:
1. the line Mesh.MeshID = fname
must be moved above after the command Mesh = copycfg(cfg, 'unitinmm', Mesh, 'LengthUnit');
otherwise if the mesh files are not in the folder the field MeshID will be missing in the json file.

2. Typo: cfg.isnormalize --> cfg.isnormalized
Session = copycfg(cfg, 'isnormalize', Session, 'DoNormalize');

Best regards and thanks a lot!

Andrea

Qianqian Fang

unread,
Sep 9, 2024, 6:57:05 PM9/9/24
to mmc-...@googlegroups.com, Andrea Farina

can you submit a pull-request on github?

please keep the modification as compact/as local as possible (also make the line follow the existing coding style if possible).

Reply all
Reply to author
Forward
0 new messages