From b41c9154375aa8edab226d6ceb0be9cb104199de Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Thu, 6 Jun 2024 22:48:37 -0400 Subject: [PATCH] [bug] fix skewed nscat distribution, fix #222 --- src/mcx_core.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcx_core.cu b/src/mcx_core.cu index 7c5d94b7..6c3e1dd7 100644 --- a/src/mcx_core.cu +++ b/src/mcx_core.cu @@ -1085,7 +1085,7 @@ __device__ inline int launchnewphoton(MCXpos* p, MCXdir* v, Stokes* s, MCXtime* /** * First, let's terminate the current photon and perform detection calculations */ - if (fabsf(p->w) > 0.f) { + if (fabsf(p->w) >= 0.f) { ppath[gcfg->partialdata] += p->w; //< sum all the remaining energy if (gcfg->debuglevel & (MCX_DEBUG_MOVE | MCX_DEBUG_MOVE_ONLY)) {