Skip to content
Merged
69 changes: 55 additions & 14 deletions expui/BiorthBasis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,19 @@ namespace BasisClasses
if (conf["M0_ONLY"]) M0_only = conf["M0_ONLY"].as<bool>();
if (conf["pcavar"]) pcavar = conf["pcavar"].as<bool>();
if (conf["subsamp"]) sampT = conf["subsamp"].as<int>();
if (conf["samplesz"]) sampT = conf["samplesz"].as<int>();

sampT = std::max(1, sampT); // Sanity
}

// Deprecation warning
if (conf["subsamp"]) {
if (myid==0)
std::cout << "---- Spherical: parameter 'subsamp' is deprecated. "
<< "It works, but will be removed in version >= 7.11. "
<< "Please use 'samplesz' instead."
<< std::endl;
}
}
catch (YAML::Exception & error) {
if (myid==0) std::cout << "Error parsing parameter stanza for <"
<< name << ">: "
Expand Down Expand Up @@ -1522,6 +1532,7 @@ namespace BasisClasses
if (conf["pyproj" ]) pyproj = conf["pyproj" ].as<std::string>();
if (conf["pcavar"] ) pcavar = conf["pcavar" ].as<bool>();
if (conf["subsamp"] ) sampT = conf["subsamp" ].as<int>();
if (conf["samplesz" ]) sampT = conf["samplesz" ].as<int>();

// Sanity
sampT = std::max(1, sampT);
Expand All @@ -1537,14 +1548,23 @@ namespace BasisClasses
// Deprecation warning
if (conf["eof_file"]) {
if (myid==0)
std::cout << "Cylinder: parameter 'eof_file' is deprecated. "
<< "and will be removed in a future release. Please "
std::cout << "Cylindrical: parameter 'eof_file' is deprecated. "
<< "and will be removed in version >= 7.11. Please "
<< "use 'cachename' instead."
<< std::endl;

conf["cachename"] = conf["eof_file"];
}

// Deprecation warning
if (conf["subsamp"]) {
if (myid==0)
std::cout << "---- Cylindrical: parameter 'subsamp' is deprecated. "
<< "It works, but will be removed in version >= 7.11. "
<< "Please use 'samplesz' instead."
<< std::endl;
}

}
catch (YAML::Exception & error) {
if (myid==0) std::cout << "Error parsing 'force' for Component <"
Expand Down Expand Up @@ -2482,8 +2502,18 @@ namespace BasisClasses
if (conf["M0_ONLY"]) M0_only = conf["M0_ONLY"].as<bool>();
if (conf["pcavar"]) pcavar = conf["pcavar"].as<bool>();
if (conf["subsamp"]) sampT = conf["subsamp"].as<int>();
if (conf["samplesz"]) sampT = conf["samplesz"].as<int>();

sampT = std::max(1, sampT); // Sanity

if (conf["subsamp"]) {
if (myid==0)
std::cout << "---- FlatDisk: parameter 'subsamp' is deprecated. "
<< "It works, but will be removed in version >= 7.11. "
<< "Please use 'samplesz' instead."
<< std::endl;
}

}
catch (YAML::Exception & error) {
if (myid==0) std::cout << "Error parsing parameter stanza for <"
Expand Down Expand Up @@ -4362,8 +4392,9 @@ namespace BasisClasses
"verbose",
"check",
"method",
"pcavar,"
"pcavar",
"subsamp",
"samplesz",
"nint",
"totalCovar",
"fullCovar"
Expand Down Expand Up @@ -4422,20 +4453,30 @@ namespace BasisClasses
// Assign values from YAML
//
try {
if (conf["nminx"]) nminx = conf["nminx" ].as<int>();
if (conf["nminy"]) nminy = conf["nminy" ].as<int>();
if (conf["nminz"]) nminz = conf["nminz" ].as<int>();
if (conf["nminx"]) nminx = conf["nminx" ].as<int>();
if (conf["nminy"]) nminy = conf["nminy" ].as<int>();
if (conf["nminz"]) nminz = conf["nminz" ].as<int>();

if (conf["nmaxx"]) nmaxx = conf["nmaxx" ].as<int>();
if (conf["nmaxy"]) nmaxy = conf["nmaxy" ].as<int>();
if (conf["nmaxz"]) nmaxz = conf["nmaxz" ].as<int>();
if (conf["nmaxx"]) nmaxx = conf["nmaxx" ].as<int>();
if (conf["nmaxy"]) nmaxy = conf["nmaxy" ].as<int>();
if (conf["nmaxz"]) nmaxz = conf["nmaxz" ].as<int>();

if (conf["knots"]) knots = conf["knots" ].as<int>();
if (conf["knots"]) knots = conf["knots" ].as<int>();

if (conf["check"]) check = conf["check" ].as<bool>();

if (conf["pcavar"]) pcavar = conf["pcavar" ].as<bool>();
if (conf["subsamp"]) sampT = conf["subsamp" ].as<int>();
if (conf["samplesz"]) sampT = conf["samplesz"].as<int>();
Comment thread
The9Cat marked this conversation as resolved.

if (conf["check"]) check = conf["check" ].as<bool>();
if (conf["subsamp"]) {
if (myid==0)
std::cout << "---- Cube: parameter 'subsamp' is deprecated. "
<< "It works, but will be removed in version >= 7.11. "
<< "Please use 'samplesz' instead."
<< std::endl;
}

if (conf["pcavar"]) pcavar = conf["pcavar" ].as<bool>();
if (conf["subsamp"]) sampT = conf["subsamp"].as<int>();
}
catch (YAML::Exception & error) {
if (myid==0) std::cout << "Error parsing parameter stanza for <"
Expand Down
8 changes: 4 additions & 4 deletions pyEXP/BasisWrappers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ void BasisFactoryClasses(py::module &m)
support for computing the coefficieint covariance from subsamples of
particles. This is implemented by the enableCoefCovariance() method
for each of these supported bases. The force configuration must
contain the parameters 'pcavar' (boolean) and 'subsamp' (integer) keys.
contain the parameters 'pcavar' (boolean) and 'samplesz' (integer) keys.
The 'pcavar' parameter turns on the covariance computation. The
'subsamp' parameter sets the number of partions or subsamples for each
'samplesz' parameter sets the number of partitions or subsamples for each
coefficient creation. There are two additional control parameters that
may be optionally specified with the enableCoefCovariance() call. The
'total' parameters enables computing the total covariance matrices only
Expand Down Expand Up @@ -176,11 +176,11 @@ void BasisFactoryClasses(py::module &m)
counts, the sample masses, the coefficient means and the coefficient
covariance matrices. The first two elements are vectors of length
equal to the number of subsamples. The third element is a 4D array
with dimensions (subsamp, Nlm, nmax) where subsamp is the number of
with dimensions (samplesz, Nlm, nmax) where samplesz is the number of
subsamples, Nlm, is the number of harmonics (e.g. l, m values or m
values for the spherical and cylindrical bases), and nmax is the number
of coefficients. The fourth element is a 4D array with dimensions
(subsamp, Nlm, nmax, namx) containing the covariance matrices for each
(samplesz, Nlm, nmax, namx) containing the covariance matrices for each
subsample in the last two dimensions.

Typical usage might be:
Expand Down
Loading