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

Change issavedet Flag to Be Parsed as an Int in PMCX #237

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/pmcx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ void parse_config(const py::dict& user_cfg, Config& mcx_config) {

// Output arguments parsing
GET_SCALAR_FIELD(user_cfg, mcx_config, issave2pt, py::bool_);
GET_SCALAR_FIELD(user_cfg, mcx_config, issavedet, py::bool_);
GET_SCALAR_FIELD(user_cfg, mcx_config, issavedet, py::int_);
GET_SCALAR_FIELD(user_cfg, mcx_config, issaveseed, py::bool_);

// Flush the std::cout and std::cerr
Expand Down Expand Up @@ -1110,7 +1110,7 @@ py::dict pmcx_interface(const py::dict& user_cfg) {
mcx_config.exportfield = (float*) calloc(field_len, sizeof(float));
}

if (mcx_config.issavedet == 1) {
if (mcx_config.issavedet >= 1) {
mcx_config.exportdetected = (float*) malloc(hostdetreclen * mcx_config.maxdetphoton * sizeof(float));
}

Expand Down Expand Up @@ -1200,7 +1200,7 @@ py::dict pmcx_interface(const py::dict& user_cfg) {
}
}

if (mcx_config.issavedet == 1) {
if (mcx_config.issavedet >= 1) {
field_dim[0] = hostdetreclen;
field_dim[1] = mcx_config.detectedcount;
field_dim[2] = 0;
Expand Down
Loading