diff --git a/ChangeLog.txt b/ChangeLog.txt index c807da53..c9ffe78d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,8 +2,78 @@ Major updates are marked with a "*" -== MCX v2024.6.pre (Jumbo Jolt - 2.6), FangQ == +== MCX v2025 (Jumbo Jolt - 2.6), FangQ == + 2025-01-22 [24b445e] [bug] fix incorrect per-voxel pathlength when mua->0, #164 + 2025-01-21 [1f536ba] [bug] fix windows -N error + 2025-01-21 [aeca212] [cmake] update cmake to add -N support + 2025-01-21 [134ab82] [ci] fix windows msvc compilation error + 2025-01-21 [12071fd] [feat] add -N/--net to download simulations from NeuroJSON.io, add -Q + 2025-01-10 [cf10d5f] [pmcx] Parse issavedet field of the cfg dict as an int instead of a bool. + 2025-01-03 [8f433e9] [feat] allow plotting logical arrays in mcxplotvol + 2024-12-15 [eafea84] [feat] polish and miss_hit format of demo_mcxlab_replay_traj.m + 2024-12-15 [82e100b] [feat] add missing demo_mcxlab_replay_traj.m script + 2024-12-11 [22bf12a] [bug] fix mcxlab castlist + 2024-12-04 [86dcba9] [bug] force most scalar inputs to be double to avoid incorrect typecasting + 2024-11-25 [4b7020d] [ci] upgrade pmcx macos build to macos-13 + 2024-11-25 [51e9970] [bug] fix mcx crash when replay is requested without seed file + 2024-11-22 [e8907db] [ci] include vcomp140.dll in windows binary + 2024-11-22 [2902119] [ci] further test vcomp140 + 2024-11-22 [c3d413d] [ci] find vcomp140.dll + 2024-11-21 [4f1335c] [ci] print vcomp1xx.dll path + 2024-11-21 [d033755] [bug] apply patch in #235 to pmcx, bump pmcx to v0.3.6 + 2024-11-21 [744c088] [bug] correctly return integer based w0 and detid in pattern3d + 2024-11-21 [dcf11c4] [bug] enable photon sharing for pattern3d source + 2024-11-18 [bd62362] [bug] fix mcxlab crash with >2^31-1 voxels, fix #235, revert #164 + 2024-11-13 [188338b] [feat] negative detector radius captures but does not save photons + 2024-11-12 [dfc704f] [ci] reduce macos binary size using strip + 2024-11-12 [7d33c14] [ci] disable octave download on macos + 2024-11-12 [43e7416] [ci] download octave app with -L + 2024-11-12 [c978a3e] [ci] use octave app on macos + 2024-11-12 [30cc3cb] [ci] upload macos mcx package + 2024-11-12 [24d1257] [ci] downgrade download-artifact as it does not support multiple jobs + 2024-11-10 [f17dcc6] [bug] fix mcxlab crash when using issave2pt=0 with photonsharing + 2024-11-09 [8c69db3] [ci] update setup.py for pmcx + 2024-11-09 [fd83829] [ci] disable CMAKE_RANLIB + 2024-11-09 [dbada19] [ci] debug ranlib + 2024-11-09 [208c31d] [ci] use verbose option to debug macos build flags + 2024-11-09 [4e0c672] [bug] fix maskdet 1cube test + 2024-11-08 [ee5be15] [feat] make onecube benchmark maskdet work, fix --dumpmask + 2024-11-08 [f2d3bc4] [feat] support 1x1x1 volume, add onecube/twocube benchmarks, det not working + 2024-11-06 [eaafb0b] [feat] disabling issaveref if issave2pt is false + 2024-10-14 [6dbcc0f] Merge pull request #234 from epini/epini-patch-1 + 2024-10-09 [0411ec6] Fix data ordering in traj.iquv + 2024-09-25 [8c0cfec] [pmcx] bump up pmcx version to 0.3.5 after fixing #233 + 2024-09-25 [58dec12] [bug] angleinvcdf and invcdf are not read in full in pmcx, fix #233 + 2024-09-14 [7b8ecb6] [ci] restore macos-12 + 2024-09-13 [6fbf3db] [bug] fix the potential typo in Custo et al for CSF mua, fix #232 + 2024-09-03 [c9456a7] [ci] fix action alert related to download-artifact + 2024-08-22 [70f95ba] [pmcx] fix CI error for pmcx + 2024-08-22 [82fb8f1] [feat] allow mcxlab and pmcx to use cfg.flog to control log printing + 2024-08-18 [17e347c] [bug] fix lzma memory leakage, NeuroJSON/zmat#11, lloyd/easylzma#4 + 2024-08-06 [5cc92ab] [bug] avoid using the same RNG seed when -E -1 on multiple GPUs + 2024-08-06 [3c480b6] [doc] clarify the default RNG seed (1648335518) in html doc + 2024-07-22 [d8959eb] [ci] update macos-11 to 12 as 11 no longer works + 2024-07-14 [b17cb1a] [bug] mcxplotshapes patch by ChenJY-L to plot Box, close #227 + 2024-07-14 [78716e4] [bug] avoid overwriting mua/mus when one is nan, fix #224, fix #225 + 2024-07-04 [80b5794] [bug] read g and n when mua or mus=nan in asgn_float, close #225, close #224 + 2024-06-22 [f959c71] [bug] store reflection position in trajectory + 2024-06-19 [4ff5b60] [bug] print large photon numbers without overflow + 2024-06-11 [d66a0a3] [test] sync test script between mcx and mcxcl after fangq/mcxcl#57 + 2024-06-11 [1e7d0f1] [bug] reset replay.tof when tof exceeds tend, like fangq/mcxcl#57 + 2024-06-07 [026eebf] [bug] ensure to clear shared mem buffer regardless of weight, #222 + 2024-06-06 [b41c915] [bug] fix skewed nscat distribution, fix #222 + 2024-06-05 [654dff1] [bug] fix outputtype error in json2mcx, reformat with miss_hit + 2024-06-05 [25b0268] [feat] export iquv in trajectory data when cfg.istrajstokes=1 + 2024-05-18 [0a76d17] [bug] fix mcxsvmc flipped normal direction in octave, fix #221 + 2024-05-18 [2f42524] [ci] downgrade matlab from v2024a to v2022a + 2024-05-14 [56aa355] [doc] update jsonlan and neurojson toolbox download links + 2024-04-25 [ea67ea9] [bug] avoid double-base64-encoding when -Z 2 is used, fix #219 + 2024-03-28 [3b7e11c] [doc] fix incorrect default value for gscatter + 2024-03-25 [b4706ae] [release] update winget mcxstudio package + 2024-03-18 [2953735] [doc] add documentation on the srcid output in detp and traj + 2024-03-18 [94961f3] [bug] return source ID in multi-source simulation, fix #217 + 2024-03-17 [3c3d755] [release] post v2024.2 release action, close #216 2024-03-17 [7902a4e] [mcxcloud] update docker image to v2024.2 2024-03-15 [08bfe11] [feat] support _ArrayData_ in Shapes volume input diff --git a/LICENSE.txt b/LICENSE.txt index fcb985c3..b9cb3f8e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -2,7 +2,7 @@ = Monte Carlo eXtreme (MCX) -- CUDA = ============================================================= -Copyright (c) 2010-2024 Qianqian Fang +Copyright (c) 2009-2025 Qianqian Fang ============================================================= diff --git a/NOTICE.txt b/NOTICE.txt index 4e41e11a..e828d7d4 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,9 +1,9 @@ ============================================================= Monte Carlo eXtreme (MCX) Suite - version 2024.6 + version 2025 ============================================================= -Copyright (c) 2009-2024 Qianqian Fang +Copyright (c) 2009-2025 Qianqian Fang - Computational Optics & Translational Imaging (COTI) Lab (http://fanglab.org) - Department of Bioengineering, Northeastern University diff --git a/README.md b/README.md index 2d3caa71..d1cfeccf 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Monte Carlo eXtreme (MCX) - CUDA Edition - Author: Qianqian Fang (q.fang at neu.edu) - License: GNU General Public License version 3 (GPLv3) -- Version: 2.6.pre (v2024.6, Jumbo Jolt) +- Version: 2.6 (v2025, Jumbo Jolt) - Website: - Download: @@ -42,123 +42,81 @@ Table of Content: What's New ------------- -MCX v2024.2 contains both major new features and critical bug fixes. -It is a strongly recommended upgrade for all users. - -Specifically, MCX v2024.2 received three important new features: - -* user-defined photon launch angle distribution (fangq/mcx#13) -* simulate multiple sources in a single session (fangq/mcx#163) -* per-voxel mua/mus/g/n format support (fangq/mcx#203) - -Similar to the user-defined phase-function feature included in -MCX v2023, the first feature allows users to define the zenith angle distribution for -launching a photon, relative to the source-direction vector, also via -a discretized inverse CDF (cumulative distribution function). -In MATLAB/Octave, they can be set as `cfg.invcdf` or `cfg.angleinvcdf`, -respectively. We provided ready-to-use demo scripts in -`mcxlab/examples/demo_mcxlab_phasefun.m` and `demo_mcxlab_launchangle.m`. - -The second feature allow users to specify more then one sources of the -same type when defining `srcpos`, `srcdir`, `srcparam1` and `srcparam2`. -Each source can have independent weight controled by the 4th element of srcpos. - -Aside from new features, a severe bug was discovered that affects all -`pattern` and `pattern3d` simulations that do not use photon-sharing, -please see - -https://github.com/fangq/mcx/issues/212 - -Because of this bug, MCX/MCX-CL in older releases has been simulating squared -pattern/pattern3d data instead of the pattern itself. If your simulation -uses these two source types and you do not use photon-sharing (i.e. simulating -multiple patterns together), please upgrade your MCX/MCX-CL and rerun your -simulations. This bug only affect volumetric fluence/flux outputs; it does not -affect diffuse reflectance outputs or binary patterns. - -It also includes a bug fix from fangq/mcx#195 regarding precision loss when -saving diffuse reflectance. - -We want to thank Haohui Zhang for reporting a number of critical issues -(fangq/mcx#195 and fangq/mcx#212), Liam Keegan for contributing a patch -to extend the slit source (fangq/mcx#214). ShijieYan and fanyuyen have also contributed -to the bug fixes and improvements. +MCX v2025 main features. The detailed updates can be found in the below change log -* 2024-03-13 [abdee14] [bug] fix multi-source replay bug, close #215 -* 2024-03-11 [9250a0d] [doc] make final doc update, bump pmcx to v0.3.2 -* 2024-03-10 [4e7f404] [ci] revert to windows-2019, add help info for #214, add note on nvidia-uvm -* 2024-03-10 [2750d70] [ci] choco install is failing on Windows, see actions/runner-images#9477 -* 2024-03-10 [7b6e0e0] [optimize] cut hyperboloid gaussian register use from 15 to 3, #127,#214 -* 2024-03-10 [a2279d6] [optimize] reduce gaussian slit register use from 9 to 2, #214 -* 2024-03-08 [4708e10] [doc] Create pull_request_template.md -* 2024-03-08 [14ca45d] [feat] use 'make register' to report register counts in the Makefile -* 2024-03-07 [411a007] [feat] add gaussian broadening to slit source (contributed by Liam Keegan, #214) -* 2024-03-04 [1e6c403] [doc] update instructions on running mcx on hybrid GPU Linux laptops -* 2024-03-04 [0344d84] [bug] fix cuda core count for Ada and Blackwell -* 2024-02-27 [558dbab] [pmcx] bump pmcx to 0.2.12 after fixing critical bug #212 -* 2024-02-27 [8e03878] \*[bug] critical: fix double-multiplication of pattern launched weight, fix #212 -* 2024-02-23 [61ae0b8] [bug] fix detid value #209 -* 2024-02-23 [90e2419] [bug] fix pmcx dettpsf overwrites input bug -* 2024-02-21 [744fba2] [bug] update srcparam2 after volume preprocessing close #206 -* 2024-02-18 [dbb23be] [ci] test removing lazhelphtml.pas to avoid error on linux/macos runners -* 2024-02-18 [4c88de2] [ci] test fix for lazarus 3.0 build error on macos action -* 2024-02-18 [54f732e] [mcxcloud] support backup servers, support x/y/z slice view and time-gates -* 2024-02-16 [8a8ff90] [ci] install libomp before downgrade xcode -* 2024-02-16 [99ca38f] [ci] test libomp error on macos runners -* 2024-02-13 [cb9b6c2] [doc] update openjdata to neurojson -* 2024-02-04 [007ecce] [feat] accept 3-element srcparam1/srcparam2 in mcxlab/pmcx -* 2024-01-23 [20b0aa2] [minor] debug addlog callback error -* 2024-01-23 [f63f73b] [bug] fix chrome webpage error messages -* 2024-01-11 [73fe834] [mcxcloud] add the missing flag to show optional json fields -* 2024-01-01 [0eb1a48] [doc] update changelog -* 2024-01-01 [4232764] [mcxlab] add speed comparison between different media formats -* 2024-01-01 [3bca606] [minor] fix typo -* 2024-01-01 [51003bc] \*[format] automatic format all matlab script with miss_hit -* 2024-01-01 [9951dd8] [minor] update copyright year -* 2024-01-01 [0f48b8f] [format] update source unit header info -* 2024-01-01 [6707eaa] [bug] fix detp output bug after adding srcid, #163 -* 2024-01-01 [49b5cef] [ci] update lazarus on windows to avoid build crash -* 2024-01-01 [9dc832d] \*[feat] support --srcid to simulate all, one or separate sources, #163 -* 2023-12-31 [f5b4aaa] [minor] fix file name spelling -* 2023-12-30 [7e1aec0] \*[feat] simulate multiple sources, close #163 -* 2023-12-29 [59f18a7] \*[feat] complete per-voxel mua/mus/g/n format support, close #203 -* 2023-12-29 [1e3b031] [feat] initial implementation of mua/mus/g/n all float format -* 2023-12-29 [1100e36] [bug] fix mcx2json bug when exporting 4D vol, fix #200 -* 2023-12-17 [9831c7e] [debug] print jdata compression message inside matlab -* 2023-11-27 [28e5101] [pmcx] bump pmcx version to 0.2.7 -* 2023-11-27 [fae5b72] [pmcx] typecast traj.id from float to uint32, fix #199 -* 2023-11-16 [4eec905] [mcxlab] add demo script comparing conv vs direct area src -* 2023-11-10 [6771752] [ci] fix matlab mex error after mingw64 was removed, matlab-actions/setup-matlab#75 -* 2023-11-08 [f4aec48] [ci] test conda command to install octave on mac -* 2023-11-08 [c976cbf] [ci] brew refuses to install octave, switch to conda -* 2023-11-07 [325a522] [release] post v2023 release action -* 2023-11-07 [a710ab3] allow converting integer cfg.vol to json -* 2023-10-31 [d6c64e4] [test] fix rng test after make double -* 2023-10-30 [08361eb] [pmcx] bump pmcx to v0.2.6 with dref fix #195 -* 2023-10-30 [9220578] \*[bug] apply #41 like 2xfloat-buffer for dref accumulation, fix #195 -* 2023-10-24 [961d059] pattern json data rstrict to single,set show_opt_in option -* 2023-10-24 [5f130fc] use 2d pattern by default -* 2023-10-24 [db608f7] use jq to format json schema; add Source.Pattern in schema -* 2023-10-14 [4c365f9] update zh-cn translation -* 2023-10-12 [8d23726] fix windows ci error -* 2023-10-12 [2904cc3] avoid error when compressing binaries -* 2023-10-12 [2ebe3de] include language locale files in github CI build -* 2023-10-12 [5782cff] enable DefaultTranslator for i18n support in mcxstudio -* 2023-10-11 [833d117] add compiled mo locale file -* 2023-10-11 [ad298c1] add initial translation for simplified Chinese -* 2023-10-11 [aa15780] add strings from additional forms -* 2023-10-10 [14285a0] \*prepare for adding i18n support -* 2023-10-10 [c5496ac] \*force invcdf/angleinvcdf even count of float, reapply 53d7ac0, fix #193 -* 2023-10-09 [ca1bf2b] use focal-length to select interpolation or discrete mode, #129 -* 2023-10-08 [be8b8c3] \*support user-defined launch angle profile, fix #129 -* 2023-10-03 [2ad9307] update winget package files to the v2023 release -* 2023-10-03 [26ede84] rename winget package file -* 2023-10-03 [2e71a51] treat cfg->bc as a null-ending string, #191 #192 -* 2023-10-03 [68db492] make cfg->bc a null terminated string -* 2023-10-02 [35170f9] Merge pull request #192 from lkeegan/pmcx_bc_overflow_error -* 2023-10-02 [3c77170] Fix buffer overflow error when bc has 12 characters +* 2025-01-22 [24b445e] [bug] fix incorrect per-voxel pathlength when mua->0, #164 +* 2025-01-21 [1f536ba] [bug] fix windows -N error +* 2025-01-21 [aeca212] [cmake] update cmake to add -N support +* 2025-01-21 [134ab82] [ci] fix windows msvc compilation error +* 2025-01-21 [12071fd] [feat] add -N/--net to download simulations from NeuroJSON.io, add -Q +* 2025-01-10 [cf10d5f] [pmcx] Parse issavedet field of the cfg dict as an int instead of a bool. +* 2025-01-03 [8f433e9] [feat] allow plotting logical arrays in mcxplotvol +* 2024-12-15 [eafea84] [feat] polish and miss_hit format of `demo_mcxlab_replay_traj.m` +* 2024-12-15 [82e100b] [feat] add missing demo_mcxlab_replay_traj.m script +* 2024-12-11 [22bf12a] [bug] fix mcxlab castlist +* 2024-12-04 [86dcba9] [bug] force most scalar inputs to be double to avoid incorrect typecasting +* 2024-11-25 [4b7020d] [ci] upgrade pmcx macos build to macos-13 +* 2024-11-25 [51e9970] [bug] fix mcx crash when replay is requested without seed file +* 2024-11-22 [e8907db] [ci] include vcomp140.dll in windows binary +* 2024-11-22 [2902119] [ci] further test vcomp140 +* 2024-11-22 [c3d413d] [ci] find vcomp140.dll +* 2024-11-21 [4f1335c] [ci] print vcomp1xx.dll path +* 2024-11-21 [d033755] [bug] apply patch in #235 to pmcx, bump pmcx to v0.3.6 +* 2024-11-21 [744c088] [bug] correctly return integer based w0 and detid in pattern3d +* 2024-11-21 [dcf11c4] [bug] enable photon sharing for pattern3d source +* 2024-11-18 [bd62362] [bug] fix mcxlab crash with >2^31-1 voxels, fix #235, revert #164 +* 2024-11-13 [188338b] [feat] negative detector radius captures but does not save photons +* 2024-11-12 [dfc704f] [ci] reduce macos binary size using strip +* 2024-11-12 [7d33c14] [ci] disable octave download on macos +* 2024-11-12 [43e7416] [ci] download octave app with -L +* 2024-11-12 [c978a3e] [ci] use octave app on macos +* 2024-11-12 [30cc3cb] [ci] upload macos mcx package +* 2024-11-12 [24d1257] [ci] downgrade download-artifact as it does not support multiple jobs +* 2024-11-10 [f17dcc6] [bug] fix mcxlab crash when using issave2pt=0 with photonsharing +* 2024-11-09 [8c69db3] [ci] update setup.py for pmcx +* 2024-11-09 [fd83829] [ci] disable CMAKE_RANLIB +* 2024-11-09 [dbada19] [ci] debug ranlib +* 2024-11-09 [208c31d] [ci] use verbose option to debug macos build flags +* 2024-11-09 [4e0c672] [bug] fix maskdet 1cube test +* 2024-11-08 [ee5be15] [feat] make onecube benchmark maskdet work, fix --dumpmask +* 2024-11-08 [f2d3bc4] [feat] support 1x1x1 volume, add onecube/twocube benchmarks, det not working +* 2024-11-06 [eaafb0b] [feat] disabling issaveref if issave2pt is false +* 2024-10-09 [0411ec6] Fix data ordering in traj.iquv +* 2024-09-25 [8c0cfec] [pmcx] bump up pmcx version to 0.3.5 after fixing #233 +* 2024-09-25 [58dec12] [bug] angleinvcdf and invcdf are not read in full in pmcx, fix #233 +* 2024-09-14 [7b8ecb6] [ci] restore macos-12 +* 2024-09-13 [6fbf3db] [bug] fix the potential typo in Custo et al for CSF mua, fix #232 +* 2024-09-03 [c9456a7] [ci] fix action alert related to download-artifact +* 2024-08-22 [70f95ba] [pmcx] fix CI error for pmcx +* 2024-08-22 [82fb8f1] [feat] allow mcxlab and pmcx to use cfg.flog to control log printing +* 2024-08-18 [17e347c] [bug] fix lzma memory leakage, NeuroJSON/zmat#11, lloyd/easylzma#4 +* 2024-08-06 [5cc92ab] [bug] avoid using the same RNG seed when -E -1 on multiple GPUs +* 2024-08-06 [3c480b6] [doc] clarify the default RNG seed (1648335518) in html doc +* 2024-07-22 [d8959eb] [ci] update macos-11 to 12 as 11 no longer works +* 2024-07-14 [b17cb1a] [bug] mcxplotshapes patch by ChenJY-L to plot Box, close #227 +* 2024-07-14 [78716e4] [bug] avoid overwriting mua/mus when one is nan, fix #224, fix #225 +* 2024-07-04 [80b5794] [bug] read g and n when mua or mus=nan in asgn_float, close #225, close #224 +* 2024-06-22 [f959c71] [bug] store reflection position in trajectory +* 2024-06-19 [4ff5b60] [bug] print large photon numbers without overflow +* 2024-06-11 [d66a0a3] [test] sync test script between mcx and mcxcl after fangq/mcxcl#57 +* 2024-06-11 [1e7d0f1] [bug] reset replay.tof when tof exceeds tend, like fangq/mcxcl#57 +* 2024-06-07 [026eebf] [bug] ensure to clear shared mem buffer regardless of weight, #222 +* 2024-06-06 [b41c915] [bug] fix skewed nscat distribution, fix #222 +* 2024-06-05 [654dff1] [bug] fix outputtype error in json2mcx, reformat with miss_hit +* 2024-06-05 [25b0268] [feat] export iquv in trajectory data when cfg.istrajstokes=1 +* 2024-05-18 [0a76d17] [bug] fix mcxsvmc flipped normal direction in octave, fix #221 +* 2024-05-18 [2f42524] [ci] downgrade matlab from v2024a to v2022a +* 2024-05-14 [56aa355] [doc] update jsonlan and neurojson toolbox download links +* 2024-04-25 [ea67ea9] [bug] avoid double-base64-encoding when -Z 2 is used, fix #219 +* 2024-03-28 [3b7e11c] [doc] fix incorrect default value for gscatter +* 2024-03-25 [b4706ae] [release] update winget mcxstudio package +* 2024-03-18 [2953735] [doc] add documentation on the srcid output in detp and traj +* 2024-03-18 [94961f3] [bug] return source ID in multi-source simulation, fix #217 +* 2024-03-17 [3c3d755] [release] post v2024.2 release action, close #216 +* 2024-03-17 [7902a4e] [mcxcloud] update docker image to v2024.2 +* 2024-03-15 [08bfe11] [feat] support `_ArrayData_` in Shapes volume input Introduction @@ -362,8 +320,8 @@ supported parameters, as shown below: ``` ############################################################################### # Monte Carlo eXtreme (MCX) -- CUDA # -# Copyright (c) 2009-2024 Qianqian Fang # -# https://mcx.space/ & https://neurojson.io/ # +# Copyright (c) 2009-2025 Qianqian Fang # +# https://mcx.space/ & https://neurojson.io # # # # Computational Optics & Translational Imaging (COTI) Lab- http://fanglab.org # # Department of Bioengineering, Northeastern University, Boston, MA, USA # @@ -373,22 +331,26 @@ supported parameters, as shown below: # Open-source codes and reusable scientific data are essential for research, # # MCX proudly developed human-readable JSON-based data formats for easy reuse.# # # -#Please visit our free scientific data sharing portal at https://neurojson.io/# +#Please visit our free scientific data sharing portal at https://neurojson.io # # and consider sharing your public datasets in standardized JSON/JData format # ############################################################################### -$Rev::d593a0$v2024.2 $Date::2024-03-04 00:04:10 -05$ by $Author::Qianqian Fang$ +$Rev::aeca21 $ v2025 $Date::2025-01-21 22:37:34 -05$ by $Author::Qianqian Fang$ ############################################################################### usage: mcx ... where possible parameters include (the first value in [*|*] is the default) == Required option == - -f config (--input) read an input file in .json or .inp format - if the string starts with '{', it is parsed as - an inline JSON input file + -f config (--input) read an input file in the .json format,if config + string starts with '{',it is parsed as an inline + JSON input file; if -f is followed by nothing or + a single '-', it reads input from stdin via pipe or - --bench ['cube60','skinvessel',..] run a buint-in benchmark specified by name - run --bench without parameter to get a list + -Q/--bench [cube60, skinvessel,...] run a buint-in benchmark specified by name + run -Q without parameter to get a list + -N benchmark (--net) get benchmark from NeuroJSON.io, -N only to list + benchmark can be dataset URL,or dbname/benchname + requires 'curl', install from https://curl.se/ == MC options == -n [0|int] (--photon) total photon number (exponential form accepted) @@ -521,7 +483,7 @@ where possible parameters include (the first value in [*|*] is the default) tx3 - GL texture data for rendering (GL_RGBA32F) the bnii/jnii formats support compression (-Z) and generate small files load jnii (JSON) and bnii (UBJSON) files using below lightweight libs: - MATLAB/Octave: JNIfTI toolbox https://neurojson.org/download/jnifti + MATLAB/Octave: JNIfTI toolbox https://neurojson.org/download/jnifty MATLAB/Octave: JSONLab toolbox https://neurojson.org/download/jsonlab Python: PyJData: https://neurojson.org/download/pyjdata JavaScript: JSData: https://neurojson.org/download/jsdata @@ -566,6 +528,7 @@ where possible parameters include (the first value in [*|*] is the default) --srcid [0|-1,0,1,2,..] -1 simulate multi-source separately;0 all sources together; a positive integer runs a single source --internalsrc [0|1] set to 1 to skip entry search to speedup launch + --trajstokes [0|1] set to 1 to save Stokes IQUV in trajectory data --maxvoidstep [1000|int] maximum distance (in voxel unit) of a photon that can travel before entering the domain, if launched outside (i.e. a widefield source) @@ -574,18 +537,26 @@ where possible parameters include (the first value in [*|*] is the default) stored (default: 1e7) == Example == -example: (list built-in benchmarks) - mcx --bench -or (list supported GPUs on the system) +example: (list built-in benchmarks: -Q/--net) + mcx -Q +or (list supported GPUs on the system: -L/--listgpu) mcx -L or (use multiple devices - 1st,2nd and 4th GPUs - together with equal load) - mcx --bench cube60b -n 1e7 -G 1101 -W 10,10,10 + mcx -Q cube60b -n 1e7 -G 1101 -W 10,10,10 or (use inline domain definition) mcx -f input.json -P '{"Shapes":[{"ZLayers":[[1,10,1],[11,30,2],[31,60,3]]}]}' or (use inline json setting modifier) mcx -f input.json -j '{"Optode":{"Source":{"Type":"isotropic"}}}' or (dump simulation in a single json file) - mcx --bench cube60planar --dumpjson + mcx -Q cube60planar --dumpjson +or (use -N/--net to browse community-contributed mcx simulations at https://neurojson.io) + mcx -N +or (run user-shared mcx simulations, see full list at https://neurojson.org/db/mcx) + mcx -N aircube60 +or (use -f - to read piped input file modified by shell text processing utilities) + mcx -Q cube60 --dumpjson | sed -e 's/pencil/cone/g' | mcx -f - +or (download/modify simulations from NeuroJSON.io and run with mcx -f) + curl -s -X GET https://neurojson.io:7777/mcx/aircube60 | jq '.Forward.Dt = 1e-9' | mcx -f ``` To further illustrate the command line options, below one can find a sample command diff --git a/README.txt b/README.txt index 30cd8152..e3b32475 100644 --- a/README.txt +++ b/README.txt @@ -5,7 +5,7 @@ *Author: Qianqian Fang *License: GNU General Public License version 3 (GPLv3) -*Version: 2.6.pre (v2024.6, Jumbo Jolt) +*Version: 2.6 (v2025, Jumbo Jolt) *Website: https://mcx.space *Download: https://mcx.space/wiki/?Get --------------------------------------------------------------------- @@ -18,123 +18,81 @@ Table of Content: == # What's New == -MCX v2024.2 contains both major new features and critical bug fixes. -It is a strongly recommended upgrade for all users. - -Specifically, MCX v2024.2 received four important new features: - -* user-defined photon launch angle distribution (fangq/mcx#13) -* simulate multiple sources in a single session (fangq/mcx#163) -* per-voxel mua/mus/g/n format support (fangq/mcx#203) - -Similar to the user-defined phase-function feature included in -MCX v2023, the first feature allows users to define the zenith angle distribution for -launching a photon, relative to the source-direction vector, also via -a discretized inverse CDF (cumulative distribution function). -In MATLAB/Octave, they can be set as `cfg.invcdf` or `cfg.angleinvcdf`, -respectively. We provided ready-to-use demo scripts in -`mcxlab/examples/demo_mcxlab_phasefun.m` and `demo_mcxlab_launchangle.m`. - -The second feature allow users to specify more then one sources of the -same type when defining `srcpos`, `srcdir`, `srcparam1` and `srcparam2`. -Each source can have independent weight controled by the 4th element of srcpos. - -Aside from new features, a severe bug was discovered that affects all -`pattern` and `pattern3d` simulations that do not use photon-sharing, -please see - -https://github.com/fangq/mcx/issues/212 - -Because of this bug, MCX/MCX-CL in older releases has been simulating squared -pattern/pattern3d data instead of the pattern itself. If your simulation -uses these two source types and you do not use photon-sharing (i.e. simulating -multiple patterns together), please upgrade your MCX/MCX-CL and rerun your -simulations. This bug only affect volumetric fluence/flux outputs; it does not -affect diffuse reflectance outputs or binary patterns. - -It also includes a bug fix from fangq/mcx#195 regarding precision loss when -saving diffuse reflectance. - -We want to thank Haohui Zhang for reporting a number of critical issues -(fangq/mcx#195 and fangq/mcx#212), Liam Keegan for contributing a patch -to extend the slit source (fangq/mcx#214). ShijieYan and fanyuyen have also contributed -to the bug fixes and improvements. +MCX v2025 main features. The detailed updates can be found in the below change log -* 2024-03-13 [abdee14] [bug] fix multi-source replay bug, close #215 -* 2024-03-11 [9250a0d] [doc] make final doc update, bump pmcx to v0.3.2 -* 2024-03-10 [4e7f404] [ci] revert to windows-2019, add help info for #214, add note on nvidia-uvm -* 2024-03-10 [2750d70] [ci] choco install is failing on Windows, see actions/runner-images#9477 -* 2024-03-10 [7b6e0e0] [optimize] cut hyperboloid gaussian register use from 15 to 3, #127,#214 -* 2024-03-10 [a2279d6] [optimize] reduce gaussian slit register use from 9 to 2, #214 -* 2024-03-08 [4708e10] [doc] Create pull_request_template.md -* 2024-03-08 [14ca45d] [feat] use 'make register' to report register counts in the Makefile -* 2024-03-07 [411a007] [feat] add gaussian broadening to slit source (contributed by Liam Keegan, #214) -* 2024-03-04 [1e6c403] [doc] update instructions on running mcx on hybrid GPU Linux laptops -* 2024-03-04 [0344d84] [bug] fix cuda core count for Ada and Blackwell -* 2024-02-27 [558dbab] [pmcx] bump pmcx to 0.2.12 after fixing critical bug #212 -* 2024-02-27 [8e03878]*[bug] critical: fix double-multiplication of pattern launched weight, fix #212 -* 2024-02-23 [61ae0b8] [bug] fix detid value #209 -* 2024-02-23 [90e2419] [bug] fix pmcx dettpsf overwrites input bug -* 2024-02-21 [744fba2] [bug] update srcparam2 after volume preprocessing close #206 -* 2024-02-18 [dbb23be] [ci] test removing lazhelphtml.pas to avoid error on linux/macos runners -* 2024-02-18 [4c88de2] [ci] test fix for lazarus 3.0 build error on macos action -* 2024-02-18 [54f732e] [mcxcloud] support backup servers, support x/y/z slice view and time-gates -* 2024-02-16 [8a8ff90] [ci] install libomp before downgrade xcode -* 2024-02-16 [99ca38f] [ci] test libomp error on macos runners -* 2024-02-13 [cb9b6c2] [doc] update openjdata to neurojson -* 2024-02-04 [007ecce] [feat] accept 3-element srcparam1/srcparam2 in mcxlab/pmcx -* 2024-01-23 [20b0aa2] [minor] debug addlog callback error -* 2024-01-23 [f63f73b] [bug] fix chrome webpage error messages -* 2024-01-11 [73fe834] [mcxcloud] add the missing flag to show optional json fields -* 2024-01-01 [0eb1a48] [doc] update changelog -* 2024-01-01 [4232764] [mcxlab] add speed comparison between different media formats -* 2024-01-01 [3bca606] [minor] fix typo -* 2024-01-01 [51003bc]*[format] automatic format all matlab script with miss_hit -* 2024-01-01 [9951dd8] [minor] update copyright year -* 2024-01-01 [0f48b8f] [format] update source unit header info -* 2024-01-01 [6707eaa] [bug] fix detp output bug after adding srcid, #163 -* 2024-01-01 [49b5cef] [ci] update lazarus on windows to avoid build crash -* 2024-01-01 [9dc832d]*[feat] support --srcid to simulate all, one or separate sources, #163 -* 2023-12-31 [f5b4aaa] [minor] fix file name spelling -* 2023-12-30 [7e1aec0]*[feat] simulate multiple sources, close #163 -* 2023-12-29 [59f18a7]*[feat] complete per-voxel mua/mus/g/n format support, close #203 -* 2023-12-29 [1e3b031] [feat] initial implementation of mua/mus/g/n all float format -* 2023-12-29 [1100e36] [bug] fix mcx2json bug when exporting 4D vol, fix #200 -* 2023-12-17 [9831c7e] [debug] print jdata compression message inside matlab -* 2023-11-27 [28e5101] [pmcx] bump pmcx version to 0.2.7 -* 2023-11-27 [fae5b72] [pmcx] typecast traj.id from float to uint32, fix #199 -* 2023-11-16 [4eec905] [mcxlab] add demo script comparing conv vs direct area src -* 2023-11-10 [6771752] [ci] fix matlab mex error after mingw64 was removed, matlab-actions/setup-matlab#75 -* 2023-11-08 [f4aec48] [ci] test conda command to install octave on mac -* 2023-11-08 [c976cbf] [ci] brew refuses to install octave, switch to conda -* 2023-11-07 [325a522] [release] post v2023 release action -* 2023-11-07 [a710ab3] allow converting integer cfg.vol to json -* 2023-10-31 [d6c64e4] [test] fix rng test after make double -* 2023-10-30 [08361eb] [pmcx] bump pmcx to v0.2.6 with dref fix #195 -* 2023-10-30 [9220578]*[bug] apply #41 like 2xfloat-buffer for dref accumulation, fix #195 -* 2023-10-24 [961d059] pattern json data rstrict to single,set show_opt_in option -* 2023-10-24 [5f130fc] use 2d pattern by default -* 2023-10-24 [db608f7] use jq to format json schema; add Source.Pattern in schema -* 2023-10-14 [4c365f9] update zh-cn translation -* 2023-10-12 [8d23726] fix windows ci error -* 2023-10-12 [2904cc3] avoid error when compressing binaries -* 2023-10-12 [2ebe3de] include language locale files in github CI build -* 2023-10-12 [5782cff] enable DefaultTranslator for i18n support in mcxstudio -* 2023-10-11 [833d117] add compiled mo locale file -* 2023-10-11 [ad298c1] add initial translation for simplified Chinese -* 2023-10-11 [aa15780] add strings from additional forms -* 2023-10-10 [14285a0]*prepare for adding i18n support -* 2023-10-10 [c5496ac]*force invcdf/angleinvcdf even count of float, reapply 53d7ac0, fix #193 -* 2023-10-09 [ca1bf2b] use focal-length to select interpolation or discrete mode, #129 -* 2023-10-08 [be8b8c3]*support user-defined launch angle profile, fix #129 -* 2023-10-03 [2ad9307] update winget package files to the v2023 release -* 2023-10-03 [26ede84] rename winget package file -* 2023-10-03 [2e71a51] treat cfg->bc as a null-ending string, #191 #192 -* 2023-10-03 [68db492] make cfg->bc a null terminated string -* 2023-10-02 [35170f9] Merge pull request #192 from lkeegan/pmcx_bc_overflow_error -* 2023-10-02 [3c77170] Fix buffer overflow error when bc has 12 characters +* 2025-01-22 [24b445e] [bug] fix incorrect per-voxel pathlength when mua->0, #164 +* 2025-01-21 [1f536ba] [bug] fix windows -N error +* 2025-01-21 [aeca212] [cmake] update cmake to add -N support +* 2025-01-21 [134ab82] [ci] fix windows msvc compilation error +* 2025-01-21 [12071fd] [feat] add -N/--net to download simulations from NeuroJSON.io, add -Q +* 2025-01-10 [cf10d5f] [pmcx] Parse issavedet field of the cfg dict as an int instead of a bool. +* 2025-01-03 [8f433e9] [feat] allow plotting logical arrays in mcxplotvol +* 2024-12-15 [eafea84] [feat] polish and miss_hit format of `demo_mcxlab_replay_traj.m` +* 2024-12-15 [82e100b] [feat] add missing demo_mcxlab_replay_traj.m script +* 2024-12-11 [22bf12a] [bug] fix mcxlab castlist +* 2024-12-04 [86dcba9] [bug] force most scalar inputs to be double to avoid incorrect typecasting +* 2024-11-25 [4b7020d] [ci] upgrade pmcx macos build to macos-13 +* 2024-11-25 [51e9970] [bug] fix mcx crash when replay is requested without seed file +* 2024-11-22 [e8907db] [ci] include vcomp140.dll in windows binary +* 2024-11-22 [2902119] [ci] further test vcomp140 +* 2024-11-22 [c3d413d] [ci] find vcomp140.dll +* 2024-11-21 [4f1335c] [ci] print vcomp1xx.dll path +* 2024-11-21 [d033755] [bug] apply patch in #235 to pmcx, bump pmcx to v0.3.6 +* 2024-11-21 [744c088] [bug] correctly return integer based w0 and detid in pattern3d +* 2024-11-21 [dcf11c4] [bug] enable photon sharing for pattern3d source +* 2024-11-18 [bd62362] [bug] fix mcxlab crash with >2^31-1 voxels, fix #235, revert #164 +* 2024-11-13 [188338b] [feat] negative detector radius captures but does not save photons +* 2024-11-12 [dfc704f] [ci] reduce macos binary size using strip +* 2024-11-12 [7d33c14] [ci] disable octave download on macos +* 2024-11-12 [43e7416] [ci] download octave app with -L +* 2024-11-12 [c978a3e] [ci] use octave app on macos +* 2024-11-12 [30cc3cb] [ci] upload macos mcx package +* 2024-11-12 [24d1257] [ci] downgrade download-artifact as it does not support multiple jobs +* 2024-11-10 [f17dcc6] [bug] fix mcxlab crash when using issave2pt=0 with photonsharing +* 2024-11-09 [8c69db3] [ci] update setup.py for pmcx +* 2024-11-09 [fd83829] [ci] disable CMAKE_RANLIB +* 2024-11-09 [dbada19] [ci] debug ranlib +* 2024-11-09 [208c31d] [ci] use verbose option to debug macos build flags +* 2024-11-09 [4e0c672] [bug] fix maskdet 1cube test +* 2024-11-08 [ee5be15] [feat] make onecube benchmark maskdet work, fix --dumpmask +* 2024-11-08 [f2d3bc4] [feat] support 1x1x1 volume, add onecube/twocube benchmarks, det not working +* 2024-11-06 [eaafb0b] [feat] disabling issaveref if issave2pt is false +* 2024-10-09 [0411ec6] Fix data ordering in traj.iquv +* 2024-09-25 [8c0cfec] [pmcx] bump up pmcx version to 0.3.5 after fixing #233 +* 2024-09-25 [58dec12] [bug] angleinvcdf and invcdf are not read in full in pmcx, fix #233 +* 2024-09-14 [7b8ecb6] [ci] restore macos-12 +* 2024-09-13 [6fbf3db] [bug] fix the potential typo in Custo et al for CSF mua, fix #232 +* 2024-09-03 [c9456a7] [ci] fix action alert related to download-artifact +* 2024-08-22 [70f95ba] [pmcx] fix CI error for pmcx +* 2024-08-22 [82fb8f1] [feat] allow mcxlab and pmcx to use cfg.flog to control log printing +* 2024-08-18 [17e347c] [bug] fix lzma memory leakage, NeuroJSON/zmat#11, lloyd/easylzma#4 +* 2024-08-06 [5cc92ab] [bug] avoid using the same RNG seed when -E -1 on multiple GPUs +* 2024-08-06 [3c480b6] [doc] clarify the default RNG seed (1648335518) in html doc +* 2024-07-22 [d8959eb] [ci] update macos-11 to 12 as 11 no longer works +* 2024-07-14 [b17cb1a] [bug] mcxplotshapes patch by ChenJY-L to plot Box, close #227 +* 2024-07-14 [78716e4] [bug] avoid overwriting mua/mus when one is nan, fix #224, fix #225 +* 2024-07-04 [80b5794] [bug] read g and n when mua or mus=nan in asgn_float, close #225, close #224 +* 2024-06-22 [f959c71] [bug] store reflection position in trajectory +* 2024-06-19 [4ff5b60] [bug] print large photon numbers without overflow +* 2024-06-11 [d66a0a3] [test] sync test script between mcx and mcxcl after fangq/mcxcl#57 +* 2024-06-11 [1e7d0f1] [bug] reset replay.tof when tof exceeds tend, like fangq/mcxcl#57 +* 2024-06-07 [026eebf] [bug] ensure to clear shared mem buffer regardless of weight, #222 +* 2024-06-06 [b41c915] [bug] fix skewed nscat distribution, fix #222 +* 2024-06-05 [654dff1] [bug] fix outputtype error in json2mcx, reformat with miss_hit +* 2024-06-05 [25b0268] [feat] export iquv in trajectory data when cfg.istrajstokes=1 +* 2024-05-18 [0a76d17] [bug] fix mcxsvmc flipped normal direction in octave, fix #221 +* 2024-05-18 [2f42524] [ci] downgrade matlab from v2024a to v2022a +* 2024-05-14 [56aa355] [doc] update jsonlan and neurojson toolbox download links +* 2024-04-25 [ea67ea9] [bug] avoid double-base64-encoding when -Z 2 is used, fix #219 +* 2024-03-28 [3b7e11c] [doc] fix incorrect default value for gscatter +* 2024-03-25 [b4706ae] [release] update winget mcxstudio package +* 2024-03-18 [2953735] [doc] add documentation on the srcid output in detp and traj +* 2024-03-18 [94961f3] [bug] return source ID in multi-source simulation, fix #217 +* 2024-03-17 [3c3d755] [release] post v2024.2 release action, close #216 +* 2024-03-17 [7902a4e] [mcxcloud] update docker image to v2024.2 +* 2024-03-15 [08bfe11] [feat] support `_ArrayData_` in Shapes volume input --------------------------------------------------------------------- @@ -334,8 +292,8 @@ supported parameters, as shown below:
###############################################################################
 #                      Monte Carlo eXtreme (MCX) -- CUDA                      #
-#          Copyright (c) 2009-2024 Qianqian Fang           #
-#                https://mcx.space/  &  https://neurojson.io/                 #
+#          Copyright (c) 2009-2025 Qianqian Fang           #
+#                https://mcx.space/  &  https://neurojson.io                  #
 #                                                                             #
 # Computational Optics & Translational Imaging (COTI) Lab- http://fanglab.org #
 #   Department of Bioengineering, Northeastern University, Boston, MA, USA    #
@@ -345,22 +303,26 @@ supported parameters, as shown below:
 #  Open-source codes and reusable scientific data are essential for research, #
 # MCX proudly developed human-readable JSON-based data formats for easy reuse.#
 #                                                                             #
-#Please visit our free scientific data sharing portal at https://neurojson.io/#
+#Please visit our free scientific data sharing portal at https://neurojson.io #
 # and consider sharing your public datasets in standardized JSON/JData format #
 ###############################################################################
-$Rev::d593a0$v2024.2 $Date::2024-03-04 00:04:10 -05$ by $Author::Qianqian Fang$
+$Rev::aeca21 $ v2025 $Date::2025-01-21 22:37:34 -05$ by $Author::Qianqian Fang$
 ###############################################################################
 
 usage: mcx   ...
 where possible parameters include (the first value in [*|*] is the default)
 
 == Required option ==
- -f config     (--input)       read an input file in .json or .inp format
-                               if the string starts with '{', it is parsed as
-                               an inline JSON input file
+ -f config     (--input)       read an input file in the .json format,if config
+                               string starts with '{',it is parsed as an inline
+                               JSON input file; if -f is followed by nothing or
+                               a single '-', it reads input from stdin via pipe
       or
- --bench ['cube60','skinvessel',..] run a buint-in benchmark specified by name
-                               run --bench without parameter to get a list
+ -Q/--bench [cube60, skinvessel,...] run a buint-in benchmark specified by name
+                               run -Q without parameter to get a list
+ -N benchmark  (--net)         get benchmark from NeuroJSON.io, -N only to list
+                               benchmark can be dataset URL,or dbname/benchname
+                               requires 'curl', install from https://curl.se/
 
 == MC options ==
  -n [0|int]    (--photon)      total photon number (exponential form accepted)
@@ -493,7 +455,7 @@ where possible parameters include (the first value in [*|*] is the default)
                                tx3 - GL texture data for rendering (GL_RGBA32F)
     the bnii/jnii formats support compression (-Z) and generate small files
     load jnii (JSON) and bnii (UBJSON) files using below lightweight libs:
-      MATLAB/Octave: JNIfTI toolbox   https://neurojson.org/download/jnifti
+      MATLAB/Octave: JNIfTI toolbox   https://neurojson.org/download/jnifty
       MATLAB/Octave: JSONLab toolbox  https://neurojson.org/download/jsonlab
       Python:        PyJData:         https://neurojson.org/download/pyjdata
       JavaScript:    JSData:          https://neurojson.org/download/jsdata
@@ -538,6 +500,7 @@ where possible parameters include (the first value in [*|*] is the default)
  --srcid  [0|-1,0,1,2,..]      -1 simulate multi-source separately;0 all sources
                                together; a positive integer runs a single source
  --internalsrc  [0|1]          set to 1 to skip entry search to speedup launch
+ --trajstokes   [0|1]          set to 1 to save Stokes IQUV in trajectory data
  --maxvoidstep  [1000|int]     maximum distance (in voxel unit) of a photon that
                                can travel before entering the domain, if 
                                launched outside (i.e. a widefield source)
@@ -546,18 +509,26 @@ where possible parameters include (the first value in [*|*] is the default)
                                stored (default: 1e7)
 
 == Example ==
-example: (list built-in benchmarks)
-       mcx --bench
-or (list supported GPUs on the system)
+example: (list built-in benchmarks: -Q/--net)
+       mcx -Q
+or (list supported GPUs on the system: -L/--listgpu)
        mcx -L
 or (use multiple devices - 1st,2nd and 4th GPUs - together with equal load)
-       mcx --bench cube60b -n 1e7 -G 1101 -W 10,10,10
+       mcx -Q cube60b -n 1e7 -G 1101 -W 10,10,10
 or (use inline domain definition)
        mcx -f input.json -P '{"Shapes":[{"ZLayers":[[1,10,1],[11,30,2],[31,60,3]]}]}'
 or (use inline json setting modifier)
        mcx -f input.json -j '{"Optode":{"Source":{"Type":"isotropic"}}}'
 or (dump simulation in a single json file)
-       mcx --bench cube60planar --dumpjson
+       mcx -Q cube60planar --dumpjson
+or (use -N/--net to browse community-contributed mcx simulations at https://neurojson.io)
+       mcx -N
+or (run user-shared mcx simulations, see full list at https://neurojson.org/db/mcx)
+       mcx -N aircube60
+or (use -f - to read piped input file modified by shell text processing utilities)
+       mcx -Q cube60 --dumpjson | sed -e 's/pencil/cone/g' | mcx -f -
+or (download/modify simulations from NeuroJSON.io and run with mcx -f)
+       curl -s -X GET https://neurojson.io:7777/mcx/aircube60 | jq '.Forward.Dt = 1e-9' | mcx -f
 
To further illustrate the command line options, below one can find a sample command diff --git a/mcxlab/NEWS b/mcxlab/NEWS index c807da53..c9ffe78d 100644 --- a/mcxlab/NEWS +++ b/mcxlab/NEWS @@ -2,8 +2,78 @@ Major updates are marked with a "*" -== MCX v2024.6.pre (Jumbo Jolt - 2.6), FangQ == +== MCX v2025 (Jumbo Jolt - 2.6), FangQ == + 2025-01-22 [24b445e] [bug] fix incorrect per-voxel pathlength when mua->0, #164 + 2025-01-21 [1f536ba] [bug] fix windows -N error + 2025-01-21 [aeca212] [cmake] update cmake to add -N support + 2025-01-21 [134ab82] [ci] fix windows msvc compilation error + 2025-01-21 [12071fd] [feat] add -N/--net to download simulations from NeuroJSON.io, add -Q + 2025-01-10 [cf10d5f] [pmcx] Parse issavedet field of the cfg dict as an int instead of a bool. + 2025-01-03 [8f433e9] [feat] allow plotting logical arrays in mcxplotvol + 2024-12-15 [eafea84] [feat] polish and miss_hit format of demo_mcxlab_replay_traj.m + 2024-12-15 [82e100b] [feat] add missing demo_mcxlab_replay_traj.m script + 2024-12-11 [22bf12a] [bug] fix mcxlab castlist + 2024-12-04 [86dcba9] [bug] force most scalar inputs to be double to avoid incorrect typecasting + 2024-11-25 [4b7020d] [ci] upgrade pmcx macos build to macos-13 + 2024-11-25 [51e9970] [bug] fix mcx crash when replay is requested without seed file + 2024-11-22 [e8907db] [ci] include vcomp140.dll in windows binary + 2024-11-22 [2902119] [ci] further test vcomp140 + 2024-11-22 [c3d413d] [ci] find vcomp140.dll + 2024-11-21 [4f1335c] [ci] print vcomp1xx.dll path + 2024-11-21 [d033755] [bug] apply patch in #235 to pmcx, bump pmcx to v0.3.6 + 2024-11-21 [744c088] [bug] correctly return integer based w0 and detid in pattern3d + 2024-11-21 [dcf11c4] [bug] enable photon sharing for pattern3d source + 2024-11-18 [bd62362] [bug] fix mcxlab crash with >2^31-1 voxels, fix #235, revert #164 + 2024-11-13 [188338b] [feat] negative detector radius captures but does not save photons + 2024-11-12 [dfc704f] [ci] reduce macos binary size using strip + 2024-11-12 [7d33c14] [ci] disable octave download on macos + 2024-11-12 [43e7416] [ci] download octave app with -L + 2024-11-12 [c978a3e] [ci] use octave app on macos + 2024-11-12 [30cc3cb] [ci] upload macos mcx package + 2024-11-12 [24d1257] [ci] downgrade download-artifact as it does not support multiple jobs + 2024-11-10 [f17dcc6] [bug] fix mcxlab crash when using issave2pt=0 with photonsharing + 2024-11-09 [8c69db3] [ci] update setup.py for pmcx + 2024-11-09 [fd83829] [ci] disable CMAKE_RANLIB + 2024-11-09 [dbada19] [ci] debug ranlib + 2024-11-09 [208c31d] [ci] use verbose option to debug macos build flags + 2024-11-09 [4e0c672] [bug] fix maskdet 1cube test + 2024-11-08 [ee5be15] [feat] make onecube benchmark maskdet work, fix --dumpmask + 2024-11-08 [f2d3bc4] [feat] support 1x1x1 volume, add onecube/twocube benchmarks, det not working + 2024-11-06 [eaafb0b] [feat] disabling issaveref if issave2pt is false + 2024-10-14 [6dbcc0f] Merge pull request #234 from epini/epini-patch-1 + 2024-10-09 [0411ec6] Fix data ordering in traj.iquv + 2024-09-25 [8c0cfec] [pmcx] bump up pmcx version to 0.3.5 after fixing #233 + 2024-09-25 [58dec12] [bug] angleinvcdf and invcdf are not read in full in pmcx, fix #233 + 2024-09-14 [7b8ecb6] [ci] restore macos-12 + 2024-09-13 [6fbf3db] [bug] fix the potential typo in Custo et al for CSF mua, fix #232 + 2024-09-03 [c9456a7] [ci] fix action alert related to download-artifact + 2024-08-22 [70f95ba] [pmcx] fix CI error for pmcx + 2024-08-22 [82fb8f1] [feat] allow mcxlab and pmcx to use cfg.flog to control log printing + 2024-08-18 [17e347c] [bug] fix lzma memory leakage, NeuroJSON/zmat#11, lloyd/easylzma#4 + 2024-08-06 [5cc92ab] [bug] avoid using the same RNG seed when -E -1 on multiple GPUs + 2024-08-06 [3c480b6] [doc] clarify the default RNG seed (1648335518) in html doc + 2024-07-22 [d8959eb] [ci] update macos-11 to 12 as 11 no longer works + 2024-07-14 [b17cb1a] [bug] mcxplotshapes patch by ChenJY-L to plot Box, close #227 + 2024-07-14 [78716e4] [bug] avoid overwriting mua/mus when one is nan, fix #224, fix #225 + 2024-07-04 [80b5794] [bug] read g and n when mua or mus=nan in asgn_float, close #225, close #224 + 2024-06-22 [f959c71] [bug] store reflection position in trajectory + 2024-06-19 [4ff5b60] [bug] print large photon numbers without overflow + 2024-06-11 [d66a0a3] [test] sync test script between mcx and mcxcl after fangq/mcxcl#57 + 2024-06-11 [1e7d0f1] [bug] reset replay.tof when tof exceeds tend, like fangq/mcxcl#57 + 2024-06-07 [026eebf] [bug] ensure to clear shared mem buffer regardless of weight, #222 + 2024-06-06 [b41c915] [bug] fix skewed nscat distribution, fix #222 + 2024-06-05 [654dff1] [bug] fix outputtype error in json2mcx, reformat with miss_hit + 2024-06-05 [25b0268] [feat] export iquv in trajectory data when cfg.istrajstokes=1 + 2024-05-18 [0a76d17] [bug] fix mcxsvmc flipped normal direction in octave, fix #221 + 2024-05-18 [2f42524] [ci] downgrade matlab from v2024a to v2022a + 2024-05-14 [56aa355] [doc] update jsonlan and neurojson toolbox download links + 2024-04-25 [ea67ea9] [bug] avoid double-base64-encoding when -Z 2 is used, fix #219 + 2024-03-28 [3b7e11c] [doc] fix incorrect default value for gscatter + 2024-03-25 [b4706ae] [release] update winget mcxstudio package + 2024-03-18 [2953735] [doc] add documentation on the srcid output in detp and traj + 2024-03-18 [94961f3] [bug] return source ID in multi-source simulation, fix #217 + 2024-03-17 [3c3d755] [release] post v2024.2 release action, close #216 2024-03-17 [7902a4e] [mcxcloud] update docker image to v2024.2 2024-03-15 [08bfe11] [feat] support _ArrayData_ in Shapes volume input diff --git a/mcxlab/README.txt b/mcxlab/README.txt index f6c64ed7..ea4ae504 100644 --- a/mcxlab/README.txt +++ b/mcxlab/README.txt @@ -2,7 +2,7 @@ Author: Qianqian Fang License: GNU General Public License version 3 (GPLv3) -Version: this package is part of Monte Carlo eXtreme (MCX) v2024.6 +Version: this package is part of Monte Carlo eXtreme (MCX) v2025 @@ -57,12 +57,12 @@ function. The help information is listed below. You can find the input/output formats and examples. The input cfg structure has very similar field names as the verbose command line options in MCX. -
 ====================================================================
+
  ====================================================================
        mcxlab - Monte Carlo eXtreme (MCX) for MATLAB/GNU Octave
- --------------------------------------------------------------------
- Copyright (c) 2011-2023 Qianqian Fang 
-                       URL: http://mcx.space
- ====================================================================
+  --------------------------------------------------------------------
+  Copyright (c) 2011-2025 Qianqian Fang 
+                       URL: https://mcx.space
+  ====================================================================
  
   Format:
      fluence=mcxlab(cfg);
@@ -71,8 +71,8 @@ the verbose command line options in MCX.
      [fluence,detphoton,vol,seed,trajectory]=mcxlab(cfg, option);
  
   Input:
-     cfg: a struct, or struct array. Each element of cfg defines 
-          the parameters associated with a simulation. 
+     cfg: a struct, or struct array. Each element of cfg defines
+          the parameters associated with a simulation.
           if cfg='gpuinfo': return the supported GPUs and their parameters,
           if cfg='version': return the version of mcxlab as a string,
           see sample script at the bottom
@@ -89,7 +89,7 @@ the verbose command line options in MCX.
  
      cfg may contain the following fields:
  
- == Required ==
+  == Required ==
       *cfg.nphoton:    the total number of photons to be simulated (integer)
                        maximum supported value is 2^63-1
       *cfg.vol:        a 3D array specifying the media index in the domain.
@@ -108,6 +108,7 @@ the verbose command line options in MCX.
                                           the optical properties are first read based on the label, then the i-th property is replaced by the property value
                          3 x Nx x Ny x Nz int16/uint16 array:  "mixlabel"/98 format: {[int16 label1][uint16 label2][0-65535 label1 percentage]}
                          4 x Nx x Ny x Nz uint8 array: "asgn_byte"/103 format: mua/mus/g/n gray-scale (0-255) interpolating between prop(2,:) and prop(3,:)
+                         4 x Nx x Ny x Nz single array: "asgn_float"/96 format: per-voxel mua/mus/g/n floating point values (internally convert to half-precision)
                          2 x Nx x Ny x Nz uint16 array: "muamus_short"/104 format: mua/mus gray-scale (0-65535) interpolating between prop(2,:) and prop(3,:)
                          8 x Nx x Ny x Nz uint8 array: "svmc"/97 format: split-voxel MC (SVMC) hybrid domain, can be created by mcxsvmc.m
                          Example: . If voxel-based media are used, partial-path/momentum outputs are disabled
@@ -121,7 +122,7 @@ the verbose command line options in MCX.
       *cfg.tstart:     starting time of the simulation (in seconds)
       *cfg.tstep:      time-gate width of the simulation (in seconds)
       *cfg.tend:       ending time of the simulation (in second)
-      *cfg.srcpos:     a 1 by 3 vector, the position of the source in grid unit; if a non-zero 
+      *cfg.srcpos:     a 1 by 3 vector, the position of the source in grid unit; if a non-zero
                        4th element is given, it specifies the initial weight of each photon packet
                        (or a multiplier in the cases of pattern/pattern3d sources); this initial weight
                        can be negative - the output fluence is expected to be linearly proportional
@@ -134,9 +135,15 @@ the verbose command line options in MCX.
                        of the srcdir direction; if the focal length is -inf, the launch
                        angle will be computed based on the Lambertian (cosine) distribution.
  
- == MC simulation settings ==
-       cfg.seed:       seed for the random number generator (integer) [0]
-                       if set to a uint8 array, the binary data in each column is used 
+       Starting v2024, cfg.{srcpos,srcdir,srcparam1,srcparam2} accept multiple sources,
+       with each source corresponding to a single row of the array. For all 4 components,
+       srcpos/srcdir support 3 or 4 columns, and srcparam1/srcparam2 support 4 columns.
+       If any of the 4 compnents present, they should have matching row number.
+ 
+  == MC simulation settings ==
+       cfg.seed:       seed for the random number generator (integer) [default 1648335518]
+                       setting seed to a negative integer or 0 uses system clock as seed;
+                       if set to a uint8 array, the binary data in each column is used
                        to seed a photon (i.e. the "replay" mode)
                        Example: 
        cfg.respin:     repeat simulation for the given time (integer) [1]
@@ -144,7 +151,7 @@ the verbose command line options in MCX.
        cfg.isreflect:  [1]-consider refractive index mismatch, 0-matched index
        cfg.bc          per-face boundary condition (BC), a strig of 6 letters (case insensitive) for
                        bounding box faces at -x,-y,-z,+x,+y,+z axes;
- 		               overwrite cfg.isreflect if given.
+                       overwrite cfg.isreflect if given.
                        each letter can be one of the following:
                        '_': undefined, fallback to cfg.isreflect
                        'r': like cfg.isreflect=1, Fresnel reflection BC
@@ -154,7 +161,7 @@ the verbose command line options in MCX.
  
                        in addition, cfg.bc can contain up to 12 characters,
                        with the 7-12 characters indicating bounding box
-                       facets -x,-y,-z,+x,+y,+z are used as a detector. The 
+                       facets -x,-y,-z,+x,+y,+z are used as a detector. The
                        acceptable characters for digits 7-12 include
                        '0': this face is not used to detector photons
                        '1': this face is used to capture photons (if output detphoton)
@@ -169,10 +176,37 @@ the verbose command line options in MCX.
                        Example: 
        cfg.shapes:     a JSON string for additional shapes in the grid
                        Example: 
+       cfg.invcdf:     user-specified scattering phase function. To use this, one must define
+                       a vector with monotonically increasing value between -1 and 1
+                       defining the discretized inverse function of the cummulative density function (CDF)
+                       of u=cos(theta), i.e. inv(CDF(u))=inv(CDF(cos(theta))), where theta [0-pi] is the
+                       zenith angle of the scattering event, and u=cos(theta) is between -1 and 1.
+                       Please note that the defined inv(CDF) is relative to u, not to theta. This is because
+                       it is relatively easy to compute as P(u) is the primary form of phase function
+                       see 
+       cfg.angleinvcdf: user-specified launch angle distribution. To use this, one must define
+                       a vector with monotonically increasing value between 0 and 1
+                       defining the discretized inverse function of the
+                       cummulative density function (CDF) of (theta/pi),
+                       i.e. inv(CDF(theta/pi)), where theta in the range of
+                       [0-pi] is the zenith angle of the launch angle relative to cfg.srcdir.
+ 
+                       when source focal-length, cfg.srcdir(4), is set to 0
+                       (default), the angleinvcdf is randomly sampled with
+                       linear interpolation, i.e. every sample uses two
+                       elements to interpolate the desired launch angle;
+                       this is suited when the distribution is continuous.
+ 
+                       when cfg.srcdir(4) is set to 1, the angleinvcdf
+                       vector is randomly sampled without interpolation
+                       (i.e. only return the theta/pi values specified
+                       inside this array); this is best suited for discrete
+                       angular distribution.
+                       see 
        cfg.gscatter:   after a photon completes the specified number of
                        scattering events, mcx then ignores anisotropy g
                        and only performs isotropic scattering for speed [1e9]
-       cfg.detphotons: detected photon data for replay. In the replay mode (cfg.seed 
+       cfg.detphotons: detected photon data for replay. In the replay mode (cfg.seed
                        is set as the 4th output of the baseline simulation), cfg.detphotons
                        should be set to the 2nd output (detphoton) of the baseline simulation
                        or detphoton.data subfield (as a 2D array). cfg.detphotons can use
@@ -188,7 +222,7 @@ the verbose command line options in MCX.
                        mus prop(i,2); 2) if prop(i,3) < 1, polprop(i,3) will be
                        adjusted to achieve the target mus' prop(i,2)*(1-prop(i,3))
  
- == GPU settings ==
+  == GPU settings ==
        cfg.autopilot:  1-automatically set threads and blocks, [0]-use nthread/nblocksize
        cfg.nblocksize: how many CUDA thread blocks to be used [64]
        cfg.nthread:    the total CUDA thread number [2048]
@@ -198,14 +232,14 @@ the verbose command line options in MCX.
                        of 1s and 0s, it enables multiple GPUs. For example, '1101'
                        allows to use the 1st, 2nd and 4th GPUs together.
                        Example: 
-       cfg.workload    an array denoting the relative loads of each selected GPU. 
+       cfg.workload    an array denoting the relative loads of each selected GPU.
                        for example, [50,20,30] allocates 50%, 20% and 30% photons to the
-                       3 selected GPUs, respectively; [10,10] evenly divides the load 
-                       between 2 active GPUs. A simple load balancing strategy is to 
+                       3 selected GPUs, respectively; [10,10] evenly divides the load
+                       between 2 active GPUs. A simple load balancing strategy is to
                        use the GPU core counts as the weight.
        cfg.isgpuinfo:  1-print GPU info, [0]-do not print
  
- == Source-detector parameters ==
+  == Source-detector parameters ==
        cfg.detpos:     an N by 4 array, each row specifying a detector: [x,y,z,radius]
        cfg.maxdetphoton:   maximum number of photons saved by the detectors [1000000]
        cfg.srctype:    source type, the parameters of the src are specified by cfg.srcparam{1,2}
@@ -217,16 +251,16 @@ the verbose command line options in MCX.
                        'hyperboloid' [*] - a one-sheeted hyperboloid gaussian beam, srcparam1(1) specifies the waist
                                  radius (in voxels), srcparam1(2) specifies distance between launch plane and focus,
                                  srcparam1(3) specifies rayleigh range
-                       'planar' [*] - a 3D quadrilateral uniform planar source, with three corners specified 
+                       'planar' [*] - a 3D quadrilateral uniform planar source, with three corners specified
                                  by srcpos, srcpos+srcparam1(1:3) and srcpos+srcparam2(1:3)
                        'pattern' [*] - a 3D quadrilateral pattern illumination, same as above, except
                                  srcparam1(4) and srcparam2(4) specify the pattern array x/y dimensions,
-                                 and srcpattern is a floating-point pattern array, with values between [0-1]. 
-                                 if cfg.srcnum>1, srcpattern must be a floating-point array with 
+                                 and srcpattern is a floating-point pattern array, with values between [0-1].
+                                 if cfg.srcnum>1, srcpattern must be a floating-point array with
                                  a dimension of [srcnum srcparam1(4) srcparam2(4)]
                                  Example: 
                        'pattern3d' [*] - a 3D illumination pattern. srcparam1{x,y,z} defines the dimensions,
-                                 and srcpattern is a floating-point pattern array, with values between [0-1]. 
+                                 and srcpattern is a floating-point pattern array, with values between [0-1].
                        'fourier' [*] - spatial frequency domain source, similar to 'planar', except
                                  the integer parts of srcparam1(4) and srcparam2(4) represent
                                  the x/y frequencies; the fraction part of srcparam1(4) multiplies
@@ -235,7 +269,7 @@ the verbose command line options in MCX.
                                      S=0.5*[1+M*cos(2*pi*(fx*x+fy*y)+phi0)], (0<=x,y,M<=1)
                        'arcsine' - similar to isotropic, except the zenith angle is uniform
                                  distribution, rather than a sine distribution.
-                       'disk' [*] - a uniform disk source pointing along srcdir; the radius is 
+                       'disk' [*] - a uniform disk source pointing along srcdir; the radius is
                                 set by srcparam1(1) (in grid unit); if srcparam1(2) is set to a non-zero
                                 value, this source defines a ring (annulus) shaped source, with
                                 srcparam1(2) denoting the inner circle's radius, here srcparam1(1)>=srcparam1(2)
@@ -243,7 +277,7 @@ the verbose command line options in MCX.
                                 of the ring is srcparam1(1) (in grid unit) and the inner radius is srcparam1(2);
                                 srcparam1(3) and srcparam1(4) can optionally set the lower and upper angular
                                 bound (in positive rad) of a ring sector if at least one of those is positive.
-                       'fourierx' [*] - a general Fourier source, the parameters are 
+                       'fourierx' [*] - a general Fourier source, the parameters are
                                 srcparam1: [v1x,v1y,v1z,|v2|], srcparam2: [kx,ky,phi0,M]
                                 normalized vectors satisfy: srcdir cross v1=v2
                                 the phase shift is phi0*2*pi
@@ -251,15 +285,18 @@ the verbose command line options in MCX.
                                 srcparam1: [v1x,v1y,v1z,|v2|], srcparam2: [kx,ky,phix,phiy]
                                 the phase shift is phi{x,y}*2*pi
                        'zgaussian' - an angular gaussian beam, srcparam1(1) specifies the variance in the zenith angle
-                       'line' - a line source, emitting from the line segment between 
-                                cfg.srcpos and cfg.srcpos+cfg.srcparam(1:3), radiating 
+                       'line' - a line source, emitting from the line segment between
+                                cfg.srcpos and cfg.srcpos+cfg.srcparam(1:3), radiating
                                 uniformly in the perpendicular direction
-                       'slit' [*] - a colimated slit beam emitting from the line segment between 
-                                cfg.srcpos and cfg.srcpos+cfg.srcparam(1:3), with the initial  
-                                dir specified by cfg.srcdir
+                       'slit' [*] - a colimated slit beam emitting from the line segment between
+                                cfg.srcpos and cfg.srcpos+cfg.srcparam(1:3), with the initial
+                                dir specified by cfg.srcdir; when user defines positive values for srcparam2.x or .y,
+                                the slit source is broadened in a Guassian profile controlled by
+                                srcparam2.x: width of Gaussian broadening in the direction perpendicular to both slit and srcdir
+                                srcparam2.y: width of Gaussian broadening in the direction of the slit line: cfg.srcparam(1:3)
                        'pencilarray' - a rectangular array of pencil beams. The srcparam1 and srcparam2
                                 are defined similarly to 'fourier', except that srcparam1(4) and srcparam2(4)
-                                are both integers, denoting the element counts in the x/y dimensions, respectively. 
+                                are both integers, denoting the element counts in the x/y dimensions, respectively.
                                 For exp., srcparam1=[10 0 0 4] and srcparam2[0 20 0 5] represent a 4x5 pencil beam array
                                 spanning 10 grids in the x-axis and 20 grids in the y-axis (5-voxel spacing)
                        source types marked with [*] can be focused using the
@@ -270,6 +307,9 @@ the verbose command line options in MCX.
                        simultaneously simulated; only works for 'pattern'
                        source, see cfg.srctype='pattern' for details
                        Example 
+       cfg.srcid:      when multiple sources are defined, if srcid is -1, each source is separately
+                       simulated; if set to 0, all source solution are summed; if set to a positive
+                       number starting from 1, only the specified source is simulated; default to 0
        cfg.omega: source modulation frequency (rad/s) for RF replay, 2*pi*f
        cfg.srciquv: 1x4 vector [I,Q,U,V], Stokes vector of the incident light
                     I: total light intensity (I >= 0)
@@ -281,14 +321,14 @@ the verbose command line options in MCX.
                     light (-1 <= Q <= 1)
        cfg.lambda: source light wavelength (nm) for polarized MC
        cfg.issrcfrom0: 1-first voxel is [0 0 0], [0]- first voxel is [1 1 1]
-       cfg.replaydet:  only works when cfg.outputtype is 'jacobian', 'wl', 'nscat', or 'wp' and cfg.seed is an array
+       cfg.replaydet:  only works when cfg.outputtype is 'jacobian', 'wl', 'nscat', 'wp' or 'rf' and cfg.seed is an array
                        -1 replay all detectors and save in separate volumes (output has 5 dimensions)
                         0 replay all detectors and sum all Jacobians into one volume
                         a positive number: the index of the detector to replay and obtain Jacobians
-       cfg.voidtime:   for wide-field sources, [1]-start timer at launch, or 0-when entering 
+       cfg.voidtime:   for wide-field sources, [1]-start timer at launch, or 0-when entering
                        the first non-zero voxel
  
- == Output control ==
+  == Output control ==
        cfg.savedetflag: ['dp'] - a string (case insensitive) controlling the output detected photon data fields
                            1 d  output detector ID (1)
                            2 s  output partial scat. even counts (#media)
@@ -305,21 +345,21 @@ the verbose command line options in MCX.
        cfg.ismomentum: 1 to save photon momentum transfer,[0] not to save.
                        save as adding 'M' to cfg.savedetflag string
        cfg.issaveref:  [0]-save diffuse reflectance/transmittance in the non-zero voxels
-                       next to a boundary voxel. The reflectance data are stored as 
+                       next to a boundary voxel. The reflectance data are stored as
                        negative values; must pad zeros next to boundaries
                        Example: see the demo script at the bottom
        cfg.issave2pt:  [1]-save volumetric output in the first output fluence.data; user can disable this output
                        by explicitly setting cfg.issave2pt=0, this way, even the first output fluence presents
-                       in mcxlab call, volume data will not be saved, this can speed up simulation when only 
+                       in mcxlab call, volume data will not be saved, this can speed up simulation when only
                        detphoton is needed
        cfg.issavedet:  if the 2nd output is requested, this will be set to 1; in such case, user can force
                        setting it to 3 to enable early termination of simulation if the detected photon
                        buffer (length controlled by cfg.maxdetphoton) is filled; if the 2nd output is not
                        present, this will be set to 0 regardless user input.
        cfg.outputtype: 'flux' - fluence-rate, (default value)
-                       'fluence' - fluence integrated over each time gate, 
+                       'fluence' - fluence integrated over each time gate,
                        'energy' - energy deposit per voxel
-                       'jacobian' or 'wl' - mua Jacobian (replay mode), 
+                       'jacobian' or 'wl' - mua Jacobian (replay mode),
                        'nscat' or 'wp' - weighted scattering counts for computing Jacobian for mus (replay mode)
                        'wm' - weighted momentum transfer for a source/detector pair (replay mode)
                        'rf' frequency-domain (FD/RF) mua Jacobian (replay mode),
@@ -328,13 +368,20 @@ the verbose command line options in MCX.
                        and  
        cfg.session:    a string for output file names (only used when no return variables)
  
- == Debug ==
+  == Debug ==
        cfg.debuglevel:  debug flag string (case insensitive), one or a combination of ['R','M','P','T'], no space
                      'R':  debug RNG, output fluence.data is filled with 0-1 random numbers
                      'M':  return photon trajectory data as the 5th output
                      'P':  show progress bar
                      'T':  save photon trajectory data only, as the 1st output, disable flux/detp/seeds outputs
-       cfg.maxjumpdebug: [10000000|int] when trajectory is requested in the output, 
+       cfg.flog: [2]  log printing control; if set to a string, it defines a file path
+                      at which location the log will be printed in append mode; on Linux and Mac OS,
+                      one can use special paths such as /dev/null; if set to an integer,
+                      2 (default): stderr
+                      1: stdout
+                      0: stdout but suppress printing MCX banner
+       cfg.istrajstokes [0]: if set to 1, traj.iquv output contains the Stokes IQUV vector along trajectories
+       cfg.maxjumpdebug: [10000000|int] when trajectory is requested in the output,
                       use this parameter to set the maximum position stored. By default,
                       only the first 1e6 positions are stored.
  
@@ -342,18 +389,18 @@ the verbose command line options in MCX.
  
   Output:
        fluence: a struct array, with a length equals to that of cfg.
-             For each element of fluence, 
+             For each element of fluence,
              fluence(i).data is a 4D array with
-                  dimensions specified by [size(vol) total-time-gates]. 
-                  The content of the array is the normalized fluence at 
+                  dimensions specified by [size(vol) total-time-gates].
+                  The content of the array is the normalized fluence at
                   each voxel of each time-gate.
  
                   when cfg.debuglevel contains 'T', fluence(i).data stores trajectory
                   output, see below
              fluence(i).dref is a 4D array with the same dimension as fluence(i).data
-                  if cfg.issaveref is set to 1, containing only non-zero values in the 
+                  if cfg.issaveref is set to 1, containing only non-zero values in the
                   layer of voxels immediately next to the non-zero voxels in cfg.vol,
-                  storing the normalized total diffuse reflectance (summation of the weights 
+                  storing the normalized total diffuse reflectance (summation of the weights
                   of all escaped photon to the background regardless of their direction);
                   it is an empty array [] when if cfg.issaveref is 0.
              fluence(i).stat is a structure storing additional information, including
@@ -367,10 +414,11 @@ the verbose command line options in MCX.
        detphoton: (optional) a struct array, with a length equals to that of cfg.
              Starting from v2018, the detphoton contains the below subfields:
                detphoton.detid: the ID(>0) of the detector that captures the photon
+               detphoton.srcid: the ID(>0) of the source in a multi-source simulation
                detphoton.nscat: cummulative scattering event counts in each medium
                detphoton.ppath: cummulative path lengths in each medium (partial pathlength)
                     one need to multiply cfg.unitinmm with ppath to convert it to mm.
-               detphoton.mom: cummulative cos_theta for momentum transfer in each medium  
+               detphoton.mom: cummulative cos_theta for momentum transfer in each medium
                detphoton.p or .v: exit position and direction, when cfg.issaveexit=1
                detphoton.w0: photon initial weight at launch time
                detphoton.s: exit Stokes parameters for polarized photon
@@ -384,11 +432,12 @@ the verbose command line options in MCX.
              a byte array (uint8) for each detected photon. The column number
              of seed equals that of detphoton.
        trajectory: (optional), if given, mcxlab returns the trajectory data for
-             each simulated photon. The output has 6 rows, the meanings are 
+             each simulated photon. The output has 6 rows, the meanings are
                 id:  1:    index of the photon packet
                 pos: 2-4:  x/y/z/ of each trajectory position
                      5:    current photon packet weight
-                     6:    reserved
+              srcid: 6:    source ID (>0) of the photon
+              iquv:  7-10: Stokes IQUV vector (>0) of the photon
              By default, mcxlab only records the first 1e7 positions along all
              simulated photons; change cfg.maxjumpdebug to define a different limit.
  
diff --git a/mcxlab/mcxlab.m b/mcxlab/mcxlab.m
index 826579df..b8aaeed4 100644
--- a/mcxlab/mcxlab.m
+++ b/mcxlab/mcxlab.m
@@ -3,7 +3,7 @@
 % ====================================================================
 %      MCXLAB - Monte Carlo eXtreme (MCX) for MATLAB/GNU Octave
 % --------------------------------------------------------------------
-% Copyright (c) 2011-2024 Qianqian Fang 
+% Copyright (c) 2011-2025 Qianqian Fang 
 %                      URL: https://mcx.space
 % ====================================================================
 %
diff --git a/mcxstudio/README.txt b/mcxstudio/README.txt
index b9a90ae0..8f7b4e49 100644
--- a/mcxstudio/README.txt
+++ b/mcxstudio/README.txt
@@ -4,7 +4,7 @@
 
 Author:  Qianqian Fang 
 License: GNU General Public License version 3 (GPLv3)
-Version: 1.6.pre (v2024.6)
+Version: 1.6 (v2025)
 Website: https://mcx.space
 
 ---------------------------------------------------------------------
diff --git a/pmcx/README.md b/pmcx/README.md
index 5e243b47..6fa0c30f 100644
--- a/pmcx/README.md
+++ b/pmcx/README.md
@@ -2,7 +2,7 @@
 
 # PMCX - Python bindings for Monte Carlo eXtreme photon transport simulator
 
-- Copyright: (C) Matin Raayai Ardakani (2022-2023) , Qianqian Fang (2019-2024) , Fan-Yu Yen (2023-2024) 
+- Copyright: (C) Matin Raayai Ardakani (2022-2023) , Qianqian Fang (2019-2025) , Fan-Yu Yen (2023-2024) 
 - License: GNU Public License V3 or later
 - Version: 0.3.6
 - URL: https://pypi.org/project/pmcx/
diff --git a/src/mcx.c b/src/mcx.c
index 049ede5e..ba54bad7 100644
--- a/src/mcx.c
+++ b/src/mcx.c
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_bench.c b/src/mcx_bench.c
index cccfe393..83f6b96e 100644
--- a/src/mcx_bench.c
+++ b/src/mcx_bench.c
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_bench.h b/src/mcx_bench.h
index 88c8714b..e47b58fb 100644
--- a/src/mcx_bench.h
+++ b/src/mcx_bench.h
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_const.h b/src/mcx_const.h
index 6dec87b8..d353babf 100644
--- a/src/mcx_const.h
+++ b/src/mcx_const.h
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
@@ -35,7 +35,7 @@
 #ifndef _MCEXTREME_CONSTANT_H
 #define _MCEXTREME_CONSTANT_H
 
-#define MCX_VERSION        "v2024.6"
+#define MCX_VERSION        "v2025"
 #define MCX_VERSION_MAJOR  2
 #define MCX_VERSION_MINOR  6
 
diff --git a/src/mcx_core.cu b/src/mcx_core.cu
index e3e075f7..c3f1e9ba 100644
--- a/src/mcx_core.cu
+++ b/src/mcx_core.cu
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_core.h b/src/mcx_core.h
index dabf356a..2704f53b 100644
--- a/src/mcx_core.h
+++ b/src/mcx_core.h
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_ieee754.h b/src/mcx_ieee754.h
index e2c00376..04541cf9 100644
--- a/src/mcx_ieee754.h
+++ b/src/mcx_ieee754.h
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_mie.cpp b/src/mcx_mie.cpp
index 9d5fa5d8..4a48fef9 100644
--- a/src/mcx_mie.cpp
+++ b/src/mcx_mie.cpp
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_mie.h b/src/mcx_mie.h
index f72e2945..e717ea24 100644
--- a/src/mcx_mie.h
+++ b/src/mcx_mie.h
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_neurojson.cpp b/src/mcx_neurojson.cpp
index 888a377d..31eb662b 100644
--- a/src/mcx_neurojson.cpp
+++ b/src/mcx_neurojson.cpp
@@ -1,29 +1,26 @@
 /***************************************************************************//**
-**  \mainpage Mesh-based Monte Carlo (MMC) - a 3D photon simulator
+**  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2010-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
-**  \section sref Reference:
-**  \li \c (\b Fang2010) Qianqian Fang, 
-**          "Mesh-based Monte Carlo Method Using Fast Ray-Tracing
-**          in Plucker Coordinates," Biomed. Opt. Express, 1(1) 165-175 (2010).
-**  \li \c (\b Fang2012) Qianqian Fang and David R. Kaeli,
-**           
-**          "Accelerating mesh-based Monte Carlo method on modern CPU architectures,"
-**          Biomed. Opt. Express 3(12), 3223-3230 (2012)
-**  \li \c (\b Yao2016) Ruoyang Yao, Xavier Intes, and Qianqian Fang,
-**          
-**          "Generalized mesh-based Monte Carlo for wide-field illumination and detection
-**           via mesh retessellation," Biomed. Optics Express, 7(1), 171-184 (2016)
-**  \li \c (\b Fang2019) Qianqian Fang and Shijie Yan,
-**          
-**          "Graphics processing unit-accelerated mesh-based Monte Carlo photon transport
-**           simulations," J. of Biomedical Optics, 24(11), 115002 (2019)
-**  \li \c (\b Yuan2021) Yaoshen Yuan, Shijie Yan, and Qianqian Fang,
-**          
-**          "Light transport modeling in highly complex tissues using the implicit
-**           mesh-based Monte Carlo algorithm," Biomed. Optics Express, 12(1) 147-161 (2021)
+**  \section sref Reference
+**  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
+**          
+**          "Monte Carlo Simulation of Photon Migration in 3D Turbid Media Accelerated
+**          by Graphics Processing Units," Optics Express, 17(22) 20178-20190 (2009).
+**  \li \c (\b Yu2018) Leiming Yu, Fanny Nina-Paravecino, David Kaeli, and Qianqian Fang,
+**          "Scalable and massively parallel Monte Carlo photon transport
+**           simulations for heterogeneous computing platforms," J. Biomed. Optics,
+**           23(1), 010504, 2018. https://doi.org/10.1117/1.JBO.23.1.010504
+**  \li \c (\b Yan2020) Shijie Yan and Qianqian Fang* (2020), "Hybrid mesh and voxel
+**          based Monte Carlo algorithm for accurate and efficient photon transport
+**          modeling in complex bio-tissues," Biomed. Opt. Express, 11(11)
+**          pp. 6262-6270. https://doi.org/10.1364/BOE.409468
+**
+**  \section sformat Formatting
+**          Please always run "make pretty" inside the \c src folder before each commit.
+**          The above command requires \c astyle to perform automatic formatting.
 **
 **  \section slicense License
 **          GPL v3, see LICENSE.txt for details
@@ -44,9 +41,10 @@
 int runcommand(char* cmd, char* param, char** output) {
     int len = ALLOC_CHUNK, pos = 0;
     char buffer[256] = {'\0'}, fullcmd[ALLOC_CHUNK] = {'\0'};
+    FILE* pipe = NULL;
 
     snprintf(fullcmd, ALLOC_CHUNK, "%s%s", cmd, param);
-    FILE* pipe = popen(fullcmd, "r");
+    pipe = strlen(fullcmd) ? popen(fullcmd, "r") : stdin;
 
     if (!pipe) {
         return -1;
diff --git a/src/mcx_neurojson.h b/src/mcx_neurojson.h
index caf74967..f3a10ebf 100644
--- a/src/mcx_neurojson.h
+++ b/src/mcx_neurojson.h
@@ -1,29 +1,26 @@
 /***************************************************************************//**
-**  \mainpage Mesh-based Monte Carlo (MMC) - a 3D photon simulator
+**  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2010-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
-**  \section sref Reference:
-**  \li \c (\b Fang2010) Qianqian Fang, 
-**          "Mesh-based Monte Carlo Method Using Fast Ray-Tracing
-**          in Plucker Coordinates," Biomed. Opt. Express, 1(1) 165-175 (2010).
-**  \li \c (\b Fang2012) Qianqian Fang and David R. Kaeli,
-**           
-**          "Accelerating mesh-based Monte Carlo method on modern CPU architectures,"
-**          Biomed. Opt. Express 3(12), 3223-3230 (2012)
-**  \li \c (\b Yao2016) Ruoyang Yao, Xavier Intes, and Qianqian Fang,
-**          
-**          "Generalized mesh-based Monte Carlo for wide-field illumination and detection
-**           via mesh retessellation," Biomed. Optics Express, 7(1), 171-184 (2016)
-**  \li \c (\b Fang2019) Qianqian Fang and Shijie Yan,
-**          
-**          "Graphics processing unit-accelerated mesh-based Monte Carlo photon transport
-**           simulations," J. of Biomedical Optics, 24(11), 115002 (2019)
-**  \li \c (\b Yuan2021) Yaoshen Yuan, Shijie Yan, and Qianqian Fang,
-**          
-**          "Light transport modeling in highly complex tissues using the implicit
-**           mesh-based Monte Carlo algorithm," Biomed. Optics Express, 12(1) 147-161 (2021)
+**  \section sref Reference
+**  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
+**          
+**          "Monte Carlo Simulation of Photon Migration in 3D Turbid Media Accelerated
+**          by Graphics Processing Units," Optics Express, 17(22) 20178-20190 (2009).
+**  \li \c (\b Yu2018) Leiming Yu, Fanny Nina-Paravecino, David Kaeli, and Qianqian Fang,
+**          "Scalable and massively parallel Monte Carlo photon transport
+**           simulations for heterogeneous computing platforms," J. Biomed. Optics,
+**           23(1), 010504, 2018. https://doi.org/10.1117/1.JBO.23.1.010504
+**  \li \c (\b Yan2020) Shijie Yan and Qianqian Fang* (2020), "Hybrid mesh and voxel
+**          based Monte Carlo algorithm for accurate and efficient photon transport
+**          modeling in complex bio-tissues," Biomed. Opt. Express, 11(11)
+**          pp. 6262-6270. https://doi.org/10.1364/BOE.409468
+**
+**  \section sformat Formatting
+**          Please always run "make pretty" inside the \c src folder before each commit.
+**          The above command requires \c astyle to perform automatic formatting.
 **
 **  \section slicense License
 **          GPL v3, see LICENSE.txt for details
diff --git a/src/mcx_rand_posix.cu b/src/mcx_rand_posix.cu
index b940a71f..59801ae3 100644
--- a/src/mcx_rand_posix.cu
+++ b/src/mcx_rand_posix.cu
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_rand_xoroshiro128p.cu b/src/mcx_rand_xoroshiro128p.cu
index 65dc862e..8106af4a 100644
--- a/src/mcx_rand_xoroshiro128p.cu
+++ b/src/mcx_rand_xoroshiro128p.cu
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_rand_xorshift128p.cu b/src/mcx_rand_xorshift128p.cu
index a1b86f78..0f52e696 100644
--- a/src/mcx_rand_xorshift128p.cu
+++ b/src/mcx_rand_xorshift128p.cu
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_shapes.c b/src/mcx_shapes.c
index 5f331edc..6c84c607 100644
--- a/src/mcx_shapes.c
+++ b/src/mcx_shapes.c
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_shapes.h b/src/mcx_shapes.h
index 7b01e817..84e3594c 100644
--- a/src/mcx_shapes.h
+++ b/src/mcx_shapes.h
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_tictoc.c b/src/mcx_tictoc.c
index 4be64220..03229fa1 100644
--- a/src/mcx_tictoc.c
+++ b/src/mcx_tictoc.c
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_tictoc.h b/src/mcx_tictoc.h
index e43288e1..e70e7615 100644
--- a/src/mcx_tictoc.h
+++ b/src/mcx_tictoc.h
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcx_utils.c b/src/mcx_utils.c
index c6f26ada..ad999392 100644
--- a/src/mcx_utils.c
+++ b/src/mcx_utils.c
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
@@ -3500,6 +3500,8 @@ void mcx_loadvolume(char* filename, Config* cfg, int isbuf) {
         for (i = 0; i < datalen; i++) {
             cfg->vol[i] = val[i];
         }
+    } else if (cfg->mediabyte == 4) {
+        memcpy(cfg->vol, inputvol, (datalen << 2));
     } else if (cfg->mediabyte == MEDIA_MUA_FLOAT) {
         union {
             float f;
@@ -4729,8 +4731,8 @@ int mcx_remap(char* opt) {
  */
 
 void mcx_parsecmd(int argc, char* argv[], Config* cfg) {
-    int i = 1, isinteractive = 1, issavelog = 0, len;
-    char filename[MAX_PATH_LENGTH] = {0}, *jsoninput = NULL;
+    int i = 1, isinteractive = 1, len;
+    char filename[MAX_PATH_LENGTH] = {0}, *jsoninput = NULL, issavelog = -1;
     char logfile[MAX_PATH_LENGTH] = {0};
     float np = 0.f;
 
@@ -4778,6 +4780,10 @@ void mcx_parsecmd(int argc, char* argv[], Config* cfg) {
                     if (i < argc - 1 && argv[i + 1][0] == '{') {
                         jsoninput = argv[i + 1];
                         i++;
+                    } else if (i == argc - 1 || argv[i + 1][0] == '-') {
+                        runcommand("", "", &jsoninput);
+                        isinteractive = 2;
+                        i += (i < argc - 1);
                     } else {
                         i = mcx_readarg(argc, argv, i, filename, "string");
                     }
@@ -4868,7 +4874,7 @@ void mcx_parsecmd(int argc, char* argv[], Config* cfg) {
                     break;
 
                 case 'l':
-                    issavelog = 1;
+                    i = mcx_readarg(argc, argv, i, &issavelog, "char");
                     break;
 
                 case 'L':
@@ -5171,8 +5177,12 @@ void mcx_parsecmd(int argc, char* argv[], Config* cfg) {
         i++;
     }
 
-    if (issavelog && cfg->session[0]) {
-        sprintf(logfile, "%s.log", cfg->session);
+    if (issavelog == 0) {
+        cfg->printnum = -1;
+    }
+
+    if (issavelog > 0) {
+        sprintf(logfile, "%s.log", (strlen(cfg->session) ? cfg->session : "unnamed"));
         cfg->flog = fopen(logfile, "wt");
 
         if (cfg->flog == NULL) {
@@ -5455,8 +5465,8 @@ void mcx_printheader(Config* cfg) {
         MCX_FPRINTF(cfg->flog, S_MAGENTA"\
 ###############################################################################\n\
 #                      Monte Carlo eXtreme (MCX) -- CUDA                      #\n\
-#          Copyright (c) 2009-2024 Qianqian Fang           #\n\
-#" S_BLUE "                https://mcx.space/  &  https://neurojson.io/                 " S_MAGENTA "#\n\
+#          Copyright (c) 2009-2025 Qianqian Fang           #\n\
+#" S_BLUE "                https://mcx.space/  &  https://neurojson.io                  " S_MAGENTA "#\n\
 #                                                                             #\n\
 # Computational Optics & Translational Imaging (COTI) Lab- " S_BLUE "http://fanglab.org " S_MAGENTA "#\n\
 #   Department of Bioengineering, Northeastern University, Boston, MA, USA    #\n\
@@ -5466,10 +5476,10 @@ void mcx_printheader(Config* cfg) {
 #  Open-source codes and reusable scientific data are essential for research, #\n\
 # MCX proudly developed human-readable JSON-based data formats for easy reuse.#\n\
 #                                                                             #\n\
-#Please visit our free scientific data sharing portal at " S_BLUE "https://neurojson.io/" S_MAGENTA "#\n\
+#Please visit our free scientific data sharing portal at " S_BLUE "https://neurojson.io " S_MAGENTA "#\n\
 # and consider sharing your public datasets in standardized JSON/JData format #\n\
 ###############################################################################\n\
-$Rev::      $" S_GREEN MCX_VERSION S_MAGENTA " $Date::                       $ by $Author::             $\n\
+$Rev::       $ " S_GREEN MCX_VERSION S_MAGENTA  " $Date::                       $ by $Author::             $\n\
 ###############################################################################\n" S_RESET);
     }
 }
@@ -5488,9 +5498,10 @@ usage: %s   ...\n\
 where possible parameters include (the first value in [*|*] is the default)\n\
 \n"S_BOLD S_CYAN"\
 == Required option ==\n" S_RESET"\
- -f config     (--input)       read an input file in .json or .inp format\n\
-                               if the string starts with '{', it is parsed as\n\
-                               an inline JSON input file\n\
+ -f config     (--input)       read an input file in the .json format,if config\n\
+                               string starts with '{',it is parsed as an inline\n\
+                               JSON input file; if -f is followed by nothing or\n\
+                               a single '-', it reads input from stdin via pipe\n\
       or\n\
  -Q/--bench [cube60, skinvessel,...] run a buint-in benchmark specified by name\n\
                                run -Q without parameter to get a list\n\
@@ -5683,17 +5694,25 @@ where possible parameters include (the first value in [*|*] is the default)\n\
                                stored (default: 1e7)\n\
 \n"S_BOLD S_CYAN"\
 == Example ==\n" S_RESET"\
-example: (list built-in benchmarks)\n"S_MAGENTA"\
-       %s --bench\n" S_RESET"\
-or (list supported GPUs on the system)\n"S_MAGENTA"\
+example: (list built-in benchmarks: -Q/--net)\n"S_MAGENTA"\
+       %s -Q\n" S_RESET"\
+or (list supported GPUs on the system: -L/--listgpu)\n"S_MAGENTA"\
        %s -L\n" S_RESET"\
 or (use multiple devices - 1st,2nd and 4th GPUs - together with equal load)\n"S_MAGENTA"\
-       %s --bench cube60b -n 1e7 -G 1101 -W 10,10,10\n" S_RESET"\
+       %s -Q cube60b -n 1e7 -G 1101 -W 10,10,10\n" S_RESET"\
 or (use inline domain definition)\n"S_MAGENTA"\
        %s -f input.json -P '{\"Shapes\":[{\"ZLayers\":[[1,10,1],[11,30,2],[31,60,3]]}]}'\n" S_RESET"\
 or (use inline json setting modifier)\n"S_MAGENTA"\
        %s -f input.json -j '{\"Optode\":{\"Source\":{\"Type\":\"isotropic\"}}}'\n" S_RESET"\
 or (dump simulation in a single json file)\n"S_MAGENTA"\
-       %s --bench cube60planar --dumpjson" S_RESET"\n",
-           exename, exename, exename, exename, exename, exename, exename);
+       %s -Q cube60planar --dumpjson\n" S_RESET"\
+or (use -N/--net to browse community-contributed mcx simulations at https://neurojson.io)\n"S_MAGENTA"\
+       %s -N\n" S_RESET"\
+or (run user-shared mcx simulations, see full list at https://neurojson.org/db/mcx)\n"S_MAGENTA"\
+       %s -N aircube60\n" S_RESET"\
+or (use -f - to read piped input file modified by shell text processing utilities)\n"S_MAGENTA"\
+       %s -Q cube60 --dumpjson | sed -e 's/pencil/cone/g' | %s -f -\n" S_RESET"\
+or (download/modify simulations from NeuroJSON.io and run with mcx -f)\n"S_MAGENTA"\
+       curl -s -X GET https://neurojson.io:7777/mcx/aircube60 | jq '.Forward.Dt = 1e-9' | %s -f" S_RESET"\n",
+           exename, exename, exename, exename, exename, exename, exename, exename, exename, exename, exename, exename);
 }
diff --git a/src/mcx_utils.h b/src/mcx_utils.h
index fbebac8a..98faa9b5 100644
--- a/src/mcx_utils.h
+++ b/src/mcx_utils.h
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/src/mcxlab.cpp b/src/mcxlab.cpp
index df58c211..aa725c1b 100644
--- a/src/mcxlab.cpp
+++ b/src/mcxlab.cpp
@@ -2,7 +2,7 @@
 **  \mainpage Monte Carlo eXtreme - GPU accelerated Monte Carlo Photon Migration
 **
 **  \author Qianqian Fang 
-**  \copyright Qianqian Fang, 2009-2024
+**  \copyright Qianqian Fang, 2009-2025
 **
 **  \section sref Reference
 **  \li \c (\b Fang2009) Qianqian Fang and David A. Boas,
diff --git a/winget/coti.mcxstudio.installer.yaml b/winget/coti.mcxstudio.installer.yaml
index 125f8917..22a2ffad 100644
--- a/winget/coti.mcxstudio.installer.yaml
+++ b/winget/coti.mcxstudio.installer.yaml
@@ -2,13 +2,13 @@
 # yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.1.0.schema.json
 
 PackageIdentifier: coti.mcxstudio
-PackageVersion: v2024.2
+PackageVersion: v2025
 MinimumOSVersion: 10.0.0.0
 InstallerType: inno
 Scope: machine
 Installers:
 - Architecture: x64
-  InstallerUrl: https://mcx.space/nightly/release/v2024.2/MCXStudio-v2024.2-installer.exe
+  InstallerUrl: https://mcx.space/nightly/release/v2025/MCXStudio-v2025-installer.exe
   InstallerSha256: ce5fa53bb753e8719fd4de3af0da9245c96c3c63a712b405ccde1540d5948551
 ManifestType: installer
 ManifestVersion: 1.1.0