= Change Log =

== MCX v2018 (Dark Matter - 1.0 Final), FangQ <q.fang (a) neu.edu> ==

 2018-01-31 [589ce45] support 3D pattern with type 'pattern3d'
 2018-01-29 [1b9493b]*add mcxpreview to preview the simulation domain settings
 2018-01-28 [5f748de] fix crash when saving diffuse reflectance
 2018-01-26 [6b55b4b] fix bug to properly scale Jacobian output with voxel size
 2018-01-24 [de1b62f] mcxstudio - render disk and planar source types
 2018-01-24 [f587194] mcxstudio - add mcxrender window to preview domain shapes
 2018-01-24 [b113840] mcxstudio - support displaying source and detectors
 2018-01-16 [6b34910]*mcxstudio - add shape visualization utility
 2018-01-13 [f6fd6a0]*rename mcxlab.mex to mcx.mex, use mcxlab.m to do pre and post processing
 2018-01-11 [ae8bd9a]*fix bug related to absorption fraction changed after fixing 1st scattering handling in #4b33a6f
 2017-12-31 [7e6e081]*add doxygen-format comments for thorough documtation of the source code
 2017-12-28 [57ccb84] allow saving large data files using 64bit size_t for buffer length
 2017-12-02 [b98d728] matlab fails to clear mex variable memory, force setting to NULL
 2017-11-29 [3e25d2d] revert to the old way of finding detector id, new approach gives partially detected optodes
 2017-11-22 [2267ad7] need to round half coordinates before calling nextafter
 2017-11-18 [14bb584]*half precision ray tracer support
 2017-10-30 [9958e32] simplify htime update in hitgrid
 2017-10-26 [4b33a6f] fix 2 bugs: condition for initial scattering, and v.nscat due to focal length input
 2017-10-05 [7703420] port mmc commit 07b33f3 to mcx to compile with matlab 2017
 2017-10-05 [c7895a6] change dir vector to transmission direction before terminating a photon
 2017-10-04 [ac6fa0e] print a message before exit when det mask is dumped
 2017-08-20 [56edc0d] mcxstudio - update app bundle icon
 2017-08-20 [dff89ab]*mcxstudio - mac osx app bundle for mcxstudio
 2017-08-10 [2fe8029]*apply mirror boundary condition when background n is less than 1
 2017-08-07 [53b13e5] mcxstudio - use matlab even in the desktop mode
 2017-08-04 [1bb1b26] avoid calling directory instead of executable under linux
 2017-08-03 [4779504] avoid output window no show on low-res displays
 2017-08-03 [85ee081] avoid output window no show
 2017-08-03 [485ca67] plot using matlab on windows
 2017-08-01 [275ff8c] mcxstudio - search mcx_core.cl dynamically
 2017-07-30 [2371eab] mcxstudio - tested with mcxcl
 2017-07-30 [eac9717] avoid windows compilation warnings from VS
 2017-07-30 [bd61e4f] mcxstudio - update database when config changes,add link to tutorials,accept enter in windows
 2017-07-30 [658906d] mcxstudio - display total frame count in mcxplotvol
 2017-07-27 [08014e3] mcxstudio - support multiple time gates in mcxplotvol
 2017-07-26 [85d6fa1] mcxstudio use mc2 as default output
 2017-07-26 [6d25ddb] mcxstudio - download output files using pscp and scp, help context to online documentation
 2017-07-25 [2ed5363] mcxstudio - add context help file for mcxstudio, support matlab for plotting
 2017-07-25 [0decc1c] dump mask independent of photon detection
 2017-07-25 [3929c80] fix volume mask saving bug
 2017-07-25 [44dcfb3] mcxstudio - add plotting functions for mcx
 2017-07-25 [7cb2015] mcxstudio - add help database and viewer, save user input history
 2017-07-24 [9819eda] mcxstudio - add plotting feature using octave
 2017-07-22 [71bbc40] make mkpath windows friendly
 2017-07-21 [60c971b] mcxstudio command line quotation,remote execution, user input
 2017-07-21 [0503732] recursively create output folder if does not exist
 2017-07-20 [6e839ef] handle progress bar for matlab 2014b or newer as the return value is now object
 2017-07-20 [eed619f] fix matlab2017a crash when using multiple GPUs
 2017-07-20 [b4a37d2] avoid windows compilation error due to mkdir and stat
 2017-07-16 [8d1d9cd] mcxstudio - add remote exec tab,correct save data dialog,define current session icons,renaming conflict check,oneditdone to update
 2017-07-15 [0fae21a] avoid static TLS error in matlab by linking with libiomp5 instead of libgomp, like mmc commit [10c8a27]
 2017-07-15 [d4f2ae1] fix mcxlab for octave crash due to an octave bug #48678
 2017-07-14 [a97e9c5] mcxstudio - fix remote cmd changing bug
 2017-07-14 [7752896] mcxstudio - add middle docking site
 2017-07-14 [2845d7e]*make true remote execution possible by passing json input via -f
 2017-07-14 [2012c0a] Merge branch 'master' of https://github.com/fangq/mcx
 2017-07-14 [35cfcec] mcxstudio - windows browse work folder,search remote command path,robust cmd output capture
 2017-07-14 [3081762] mcxstudio - support inline json input with -f, create root folder if --root is given
 2017-07-13 [21ef382] mcxstudio - lock GPU
 2017-07-13 [e71659d] mcxstudio - make output window dockable, lock GPU list when use ssh
 2017-07-11 [c08a29a] fix mcxstudio GPU name crop bug, fix window drag problem, make media/detector editor autoaddrow
 2017-07-09 [c672643]*use int to represent det and media index; increase max media + max det from 128+1024 to 4000, close #21
 2017-07-08 [bf9aa22]*mcx now supports 2D simulations, just set one dimension to a thickness of 1
 2017-07-05 [dd1026c] mcxstudio - fix source editor bug
 2017-07-05 [d1186aa]*successfully built RPM

== MCX v2017.7 (Dark Matter - 1.0-RC2), FangQ <q.fang (a) neu.edu> ==

 2017-07-05 [6144ee4] fix windows progress bar issue
 2017-07-05 [1319828] windows registry fix, fix memory leak, associate .mcxp, use messagedlg, fix VerifyInput bug
 2017-07-04 [71fa54a]*add RPM and DEB packaging scripts, add root-level makefile
 2017-07-03 [3406ea8] fix memory leak caused by the shape JSON editor, mmc compatible, progress bar fixed
 2017-07-02 [       ] automatically build mcxstudio and include the binary in the mcx nightly build
 2017-06-30 [ff5e25f] fix shape editor deletion handling, collapsible groupbox, allow remote execution
 2017-06-30 [139b50d]*unified GUI for mcx, mmc and mcxcl, ligher source designer
 2017-06-29 [1d0f883] initialize tty info to avoid uninitialized values
 2017-06-28 [950f96b]*much improved mcxstudio: simulation designer,volume designer,more options,copy and paste sessions
 2017-06-26 [9606e95] save mc2 file under rootpath if --root is defined
 2017-06-25 [1b7271d] shape editor, json input editor for advanced options, form scaling for high DPI displays
 2017-06-21 [325aa35] update of the GUI, more robust mcx execution, colored output, simulation designer
 2017-06-20 [faad1a1] user specified scattering events to disable anisotropy g
 2017-06-06 [5f42259] fix a bug when using verbose only flags
 2017-05-29 [adddbc5] support pencil beam array
 2017-05-28 [4ef73e1] use environment variable CUDA_PATH on windows
 2017-05-28 [cc22461] add registry key fix for windows
 2017-05-27 [cfe280b] fix matlab crash when using multiple GPUs
 2017-04-10 [b5170e4] fix windows compilation bug for Pascal cards


== MCX v2017.3 (Dark Matter - 1.0-RC1), FangQ <q.fang (a) neu.edu> ==

 2017-01-16 [d5a2cbe] prevent progress bar from stalling
 2017-01-02 [0a28d4e] fix compilation error on windows
 2016-12-21 [63e5e23] fix voxel [0 0 0] is always zero bug, regression since v2016.4
 2016-12-21 [1848321] refresh matlab window when running mcx
 2016-12-21 [8715a40]*fix progress bar in matlab when set debuglevel=P
 2016-12-21 [b53d8ac] avoid hanging in mcxlab when mus=0
 2016-12-11 [c93be5b] fix nan error when scattering coeff is 0
 2016-11-11 [024542c] fix replay bug due to f->ndone initial value as -1
 2016-11-05 [758b8b5]*enable autobuild in both windows and linux
 2016-11-05 [dac3cd0] autobuild for windows
 2016-10-20 [1f5d0ef] fix Jacobian output normalization
 2016-10-13 [84462a3] correct WP replay scaling factor
 2016-10-13 [16ab1c9] normalize scattering count based on total replay weight
 2016-10-12 [df62a0d] removing divergence inside hitgrid, thanks to njuffa
 2016-10-09 [5905e0b]*record diffuse reflectance on the air voxels outside of domain boundaries, close #6
 2016-10-09 [39038bf]*save detected photon position and direction using -x 1, close #16
 2016-10-08 [e8b21b8]*port diverging and converging widefield source beams from MMC to MCX, close #27
 2016-10-05 [ceb6009] fixing mcxlab crash when detps is not given in the replay mode
 2016-10-04 [ead4794] fix Gaussian beam waist radius scaling issue, close #25
 2016-10-03 [42866fa] fix two regressions for replay, returning scattering count in replay
 2016-09-14 [9d70a56] fix memory out-of-bound bug in replay
 2016-09-11 [a6792e7] fix usleep warning
 2016-09-09 [6393a45] save scattering event count in replay
 2016-08-25 [78acd39]*compiling mcx on windows
 2016-08-24 [f19e3d4] update core count for GP104
 2016-08-22 [1c21212] fix core count in Pascal
 2016-08-18 [55e917c] use c++ template to avoid branching in launchnewphoton - by Gustavo Maia and Fanny Paravecino
 2016-08-11 [5da5466] remove -code flags to create arch independent binaries, it also produces faster binaries with cuda 7.5
 2016-07-24 [dbbc4c6]*support Russian roulette
 2016-07-22 [542223d]*compiling mcxlab mex file for Pascal
 2016-07-22 [88441c6] support Pascal
 2016-07-02 [9b5ee49]*elegantly terminate mcxlab when an exception is raised
 2016-07-02 [382aab1] ignore user specified nonexistent devices in workload calculations - bug reported by Nicholas Dana
 2016-07-02 [2b98d3e]*add progress bar when user specify -D P
 2016-06-05 [6a6fe13]*update makefile for autobuild, correct mcxlab RNG seed length
 2016-06-02 [83481ff] add replay demo script
 2016-06-02 [2aed76d] fix replay seed bug for mcxlab
 2016-05-16 [701beec] make mcx gpu contest compatible with octave
 2016-05-16*[a4cb1e1] add debug option to save photon trajectory data
 2016-04-26 [590c596] fix workload and gpuid bug when handeling 0 mask
 2016-04-23 [4c37c0d] test gpu contest script in matlab 2014
 2016-04-22 [bc56e86] make static target on Linux and Mac
 2016-04-22 [f5342f0] update Linux static target command, make total photon number accurate
 2016-04-22*[690406c] fix multi-GPU hanging problem for real, wrap all CUDA calls with error testing, return workload in mcxlab


== MCX v2016.4 (Dark Matter - 1.0-beta), FangQ <q.fang (a) neu.edu> ==

 2016-04-21 [release] finalize and release v2016.04
 2016-04-21*[2b1f22a] add Visual Studio 2013 Nsight project for easy compilation on windows
 2016-04-19 [3b69a1a] fix thread hanging bug when running on multiple GPUs
 2016-04-15*[e71f4c7] kick-off "MCX GPU Contest" for user-contributed hardware benchmarking
 2016-04-06 [c52b470] fix photon detection bug, fix json file crash, fix workload distribution bug, fix hitgrid inf handeling, fix energytot bug
 2016-04-05*[e94087f] add benchmark folder, announce "MCX Speed Challenge"
 2016-03-28 [76f9c5a] reduce memory dependency, yielded a 42% increase in mcx speed for the quicktest benchmark
 2016-03-26*[b14ccf1] simplify RNG interface, two new RNGs: POSIX erand48 and xorshift128+, retiring MT RNG
 2016-02-28 [29ea426] speed up ray tracer with customized nextafterf function and reciprocal of c
 2015-11-09 [1491f4e] Determining block size in autopilot mode using max block per SMX, by Fanny Nina Paravecino
 2015-11-08 [48dfb33] fix refractive index mismatch transmission bug
 2015-09-28*[73dd850] add uniform line source and slit source, suggested by Yu Chen
 2015-09-12 [9da817e] fix bug for wide field sources
 2015-09-11*[c7f9625] make precise ray-tracing default to improve accuracy
 2015-09-11 [a1e781a] update affiliation, Qianqian now moved to Northeastern
 2015-07-12 [3898b14] add nsight project files
 2015-07-27 [cd8f134] use proper epsilon for float roundoff tests
 2015-06-25 [6815577] fix address alignment error for CUDA 6 or higher
 2015-06-25*[60238c4] multiple GPU support!
 2015-06-25*[60238c4] set atomic as default, single binary now contains all features
 2015-06-15 [97cd3e9] return gpu info for better interfacing with matlab
 2015-06-10*[7487e4d] support saving photon seeds and replay
 2015-06-10 [3c8a116] accept endianness input
 2015-05-01 [funding] NIH/NIGMS R01 funding support starts

== MCX 0.9.7-2 (Dark Matter - alpha update 2), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2014-09-23 [r325] fix submillimeter voxel scaling bug in the binary mode; fix total simulated photon count
 2014-07-11 [r324] a patch submitted by David Gasperino for rigirously modeling a collimated Gaussian beam
 2014-07-11 [r323] high priority bug fixes submitted by Kim Shultz: transmission angle and oddphoton handling
 2014-01-19 [r322] saving detected photon seed for fast replay and pMC analysis

== MCX 0.9.7-1 (Dark Matter - alpha update 1), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2013-10-22 [r320] fix isotropic scattering bug at g=0, a critical bug fix

== MCX 0.9.7 (Dark Matter - alpha), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2013-09-16 [r306] MCXLAB srctype demo script
 2013-09-15*[r305-308] wide-field source support, including 9 source types
 2013-09-11 [r305] random number generator performance optimization
 2013-08-29 [r304] loadmch supports the seed data from the latest MMC simulations
 2013-02-11 [r300-302] fix double correction for unitinmm

== MCX 0.8.0 (Charm Quarks - final), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2012-08-24 [r297] merge all variants into a single binary for Fermi cards (make fermi)
 2012-08-21 [r296] fix Bug/0005, incorrect returned field and normalization for multiple gate groups (reported by Vivian Pera)
 2012-08-21 [r295] fix Bug/0004. incorrect detected photon buffer pointer in MCXLAB with respin>1 (Vivian Pera)
 2012-08-08 [r291-294] fix Bug/0001, forward scattering bias with automatic reseeding of the RNG (Matt Adams,Okito Yamashita)
 2012-08-08 [r290] backport features from MMCLAB: exception handling and print inside matlab
 2012-07-25 [r287] fix Bug/0002-2, conflict between savedet and share memory cache (Okito Yamashita)
 2012-07-21 [r286] change default MAX_DETECTORS from 256 t0 1024
 2012-07-13 [r282] fix Bug/0002. use srcfrom0 flag to set crop0 and crop1 in mcx_cached (Okito Yamashita)
 2012-07-06 [r280] calculate exact exit point when savedet is true (suggested by Audrey Steever)
 2012-07-04 [r276] fix MP core count bug (patch by Suresh Paidi)

== MCX 0.7.9 (Charm Quarks - beta), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2012-01-10 fix a regression introduced in 0.5.3 for accurate exit positions
 2012-01-08 support 3D shape input and and run-time rasterization
 2012-01-07 port JSON-formatted input file support from MMC to MCX

== MCX 0.5.3 (Black Hole - update 3), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2012-01-07 fix a minor bug which fails using -1 with -E
 2011-12-21 fix an issue causing forward scattering bias (reported by David Giraud)

== MCX 0.5.2 (Black Hole - update 2), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2011-09-21 fix a regression in MCXLAB related to detectors, use exact exit position for radius test
 2011-09-20 add verbose warnings for launch-time-out error and non-surface detectors
 2011-09-19 users can specify srcfrom0 (origin setting) from the input file
 2011-09-19 fix a bug in detector-to-volume mapping, effects all non-integer inputs

== MCX 0.5.1 (Black Hole - update 1), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2011-05-03 use the expected absorption for normalization to reduce non-atomic impact
 2011-04-26 fix a serious shared-mem buffer length bug (can cause crash)
 2011-04-26 MCXLAB now accepts crop0/crop1 fields to specify shared-mem region
 2011-03-25 new GPU-ocelot compilation flag

== MCX 0.5.0 (Black Hole), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2011-03-18 update documents, get ready to release 0.5.0
 2011-03-18 gracefully handle exceptions in MCXLAB
 2011-03-17 add validation scripts for MCXLAB/MCX, fix a bug for saving flux
 2011-03-16 add MCXLAB example scripts
 2011-03-15 extensive debugging with the --unitinmm flag
 2011-03-09 MCXLAB now returns flux and detected photon in Matlab and Octave
 2011-03-03 add -E to seed RNG from command line
 2010-12-28 use negative -R to enable cachebox defined in the input file, fix time wraping
 2010-08-08 debug make mex option for Linux
 2010-08-09 first import of MCXLAB - MCX for Matlab and Octave
 2010-08-08 debug and test --unitinmm flag
 2010-08-05 initial support for reflection at internal boundaries
 2010-08-05 estimate maxgate when using the autopilot mode
 2010-08-02 fix a bug when saving multiple blocks of mch

== MCX 0.4.9 (Black Hole-beta), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2010-08-01 update documentation and release v0.5 beta (aka 0.4.9)
 2010-08-01 fix a critical bug for pre-Fermi cards,validated MCX on CC11,13,20
 2010-07-31 enable -n for photon number, disable -m, report simulation speed
 2010-07-30 fix a bug when reading medium index with detector mask
 2010-07-29 use atomic with shared memory cache to improve accuracy near the source
 2010-07-28 add example for validation of MCX in heterogeneous media
 2010-07-28 use RNG for transmission/reflection test
 2010-07-28 use column major as the internal array format
 2010-07-27 support saving detected photons, but got 25% slower
 2010-07-15 users can use -u to specify voxel edge length in mm
 2010-07-12 fix a bug for indexing error in large volumes
 2010-07-09 fix a bug when appending data for multiple time gate groups
 2010-06-26 use constant memory to pass kernel param, more error info
 2010-06-26 use meaningful struct in the kernel to improve readability
 2010-05-14 allow to select which GPU to use with the -G option
 2010-02-04 fix a minor NaN bug detected by GPU Ocelot
 2010-01-26 add GPU Ocelot makefile for multicore CPU

== MCX 0.2 (Aurora), FangQ <fangq (a) nmr.mgh.harvard.edu> ==

 2009-12-19 polish documentation, add svn keywords and tagged 0.2 final
 2009-12-10 MCX Studio GUI is tested on Linux, Windows, Mac OS X
 2009-12-03 add README.txt file for each example folder
 2009-12-02 complete "bubble" mode to reduce impact from non-atomic write
 2009-10-24 use cuda event timer, use VC compiler for Windows
 2009-10-21 paper published online, added windows support
 2009-10-20 set license to GPLv3, first public release (v0.2 beta)
 2009-10-19 fixed double-precision warning for CUDA 2.3
 2009-10-06 more GUI developments
 2009-09-25 fixed memory leakage, supported verbose options
 2009-09-24 major code clean-up, added GPUDEBUG macro
 2009-07-31 tested on GTX295 with CUDA 2.3
 2009-07-15 used atomicFloatAdd for atomic memory write
 2009-07-13 fixed half-grid shift bug in the validation script
 2009-07-08 reflection for a maximum of 3 interfaces
 2009-06-26 tested non-atomic write racing condition
 2009-05-19 added mcx studio: a GUI for mcx
 2009-05-07 query GPU info
 2009-05-05 added options to print to a log file
 2009-04-30 code clean up and paper submission, tag 0.1.9 (Aurora alpha)
 2009-04-26 new and more robust boundary reflection code
 2009-04-24 build-in fluence normalization (unitary solution)
 2009-04-20 added examples and validation scripts, supported respins
 2009-04-07 energy conservation for normalization of the solution
 2009-04-03 time gating support
 2009-04-01 split the main function to units, add utils. and config file
 2009-03-02 added logistic-map based random number generator
 2009-02-27 early support of boundary reflection
 2009-02-24 MT rand now working fine
 2009-02-21 added MT random number generator initial version
 2009-02-20 translated to Brook+
 2009-02-15 translated to CUDA
 2009-02-14 initial version written in BrookGPU
