Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pmcx volume loading differs from mcx #185

Closed
lkeegan opened this issue Sep 26, 2023 · 1 comment
Closed

pmcx volume loading differs from mcx #185

lkeegan opened this issue Sep 26, 2023 · 1 comment

Comments

@lkeegan
Copy link
Contributor

lkeegan commented Sep 26, 2023

When I ran the same simulation with pmcx and mcx I got different ouputs.

I traced the difference to a difference in the volume loading:

mcx applies a units factor when loading a MEDIA_AS_F2H volume:

mcx/src/mcx_utils.c

Lines 3237 to 3238 in d6c1f55

f2h.f[0] = val[i << 1] * cfg->unitinmm;
f2h.f[1] = val[(i << 1) + 1] * cfg->unitinmm;

while pmcx does not apply this factor:

mcx/src/pmcx.cpp

Lines 307 to 308 in d6c1f55

f2h.f[0] = val[i << 1];
f2h.f[1] = val[(i << 1) + 1];

When I added this factor to pmcx then the simulation outputs were the same.

@fangq
Copy link
Owner

fangq commented Sep 27, 2023

both mcxlab and pmcx should be fixed. please update your pmcx to 0.2.4 to test.

lkeegan added a commit to lkeegan/mcx that referenced this issue Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants