Skip to content

Commit

Permalink
Merge pull request #210 from pariterre/dev
Browse files Browse the repository at this point in the history
Do not add the ANALOG:SCALE if USED is empty (comply with Shogun)
  • Loading branch information
pariterre authored Jun 28, 2021
2 parents d9b20a2 + af159be commit 5c47224
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,10 @@ ezc3d::ParametersNS::Parameters::prepareCopyForWriting(
// Ensure that the right analog scale is in the file
ezc3d::ParametersNS::GroupNS::Parameter analogScaleFactorParam;
std::vector<double> analogScaleFactor;
if (params.group("ANALOG").parameter("SCALE").valuesAsDouble().size() > 0) {
if (params.group("ANALOG").parameter("USED").valuesAsInt()[0] == 0){
analogScaleFactorParam.name("SCALE");
}
else if (params.group("ANALOG").parameter("SCALE").valuesAsDouble().size() > 0) {
analogScaleFactorParam = params.group("ANALOG").parameter("SCALE");
analogScaleFactor = params.group("ANALOG").parameter("SCALE").valuesAsDouble();
}
Expand Down

0 comments on commit 5c47224

Please sign in to comment.