diff --git a/expui/BiorthBasis.cc b/expui/BiorthBasis.cc index 163dd5cbe..9c6d21a30 100644 --- a/expui/BiorthBasis.cc +++ b/expui/BiorthBasis.cc @@ -275,9 +275,19 @@ namespace BasisClasses if (conf["M0_ONLY"]) M0_only = conf["M0_ONLY"].as(); if (conf["pcavar"]) pcavar = conf["pcavar"].as(); if (conf["subsamp"]) sampT = conf["subsamp"].as(); + if (conf["samplesz"]) sampT = conf["samplesz"].as(); 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 << ">: " @@ -1522,6 +1532,7 @@ namespace BasisClasses if (conf["pyproj" ]) pyproj = conf["pyproj" ].as(); if (conf["pcavar"] ) pcavar = conf["pcavar" ].as(); if (conf["subsamp"] ) sampT = conf["subsamp" ].as(); + if (conf["samplesz" ]) sampT = conf["samplesz" ].as(); // Sanity sampT = std::max(1, sampT); @@ -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 <" @@ -2482,8 +2502,18 @@ namespace BasisClasses if (conf["M0_ONLY"]) M0_only = conf["M0_ONLY"].as(); if (conf["pcavar"]) pcavar = conf["pcavar"].as(); if (conf["subsamp"]) sampT = conf["subsamp"].as(); + if (conf["samplesz"]) sampT = conf["samplesz"].as(); 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 <" @@ -4362,8 +4392,9 @@ namespace BasisClasses "verbose", "check", "method", - "pcavar," + "pcavar", "subsamp", + "samplesz", "nint", "totalCovar", "fullCovar" @@ -4422,20 +4453,30 @@ namespace BasisClasses // Assign values from YAML // try { - if (conf["nminx"]) nminx = conf["nminx" ].as(); - if (conf["nminy"]) nminy = conf["nminy" ].as(); - if (conf["nminz"]) nminz = conf["nminz" ].as(); + if (conf["nminx"]) nminx = conf["nminx" ].as(); + if (conf["nminy"]) nminy = conf["nminy" ].as(); + if (conf["nminz"]) nminz = conf["nminz" ].as(); - if (conf["nmaxx"]) nmaxx = conf["nmaxx" ].as(); - if (conf["nmaxy"]) nmaxy = conf["nmaxy" ].as(); - if (conf["nmaxz"]) nmaxz = conf["nmaxz" ].as(); + if (conf["nmaxx"]) nmaxx = conf["nmaxx" ].as(); + if (conf["nmaxy"]) nmaxy = conf["nmaxy" ].as(); + if (conf["nmaxz"]) nmaxz = conf["nmaxz" ].as(); - if (conf["knots"]) knots = conf["knots" ].as(); + if (conf["knots"]) knots = conf["knots" ].as(); + + if (conf["check"]) check = conf["check" ].as(); + + if (conf["pcavar"]) pcavar = conf["pcavar" ].as(); + if (conf["subsamp"]) sampT = conf["subsamp" ].as(); + if (conf["samplesz"]) sampT = conf["samplesz"].as(); - if (conf["check"]) check = conf["check" ].as(); + 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(); - if (conf["subsamp"]) sampT = conf["subsamp"].as(); } catch (YAML::Exception & error) { if (myid==0) std::cout << "Error parsing parameter stanza for <" diff --git a/pyEXP/BasisWrappers.cc b/pyEXP/BasisWrappers.cc index 2493e1215..cd4f650cb 100644 --- a/pyEXP/BasisWrappers.cc +++ b/pyEXP/BasisWrappers.cc @@ -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 @@ -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: