Skip to content

Commit

Permalink
update apib11
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmuller committed Feb 26, 2024
1 parent 539b1c9 commit 5713c20
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions MMVII/MMVII-TestDir/Input/Saisies-MMV1/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
To re-generate MMVII data from V1 files:

MMVII V1OriConv Ori-Ground_mm3d/ toto

11 changes: 6 additions & 5 deletions MMVII/apib11/py_MMVII_MeasuresIm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ void pyb_init_MeasuresIm(py::module_ &m) {
.def(py::init<const cPt3dr &,const std::string &,tREAL4>(),DOC(MMVII_cMes1GCP,cMes1GCP))
.def_readwrite("pt", &cMes1GCP::mPt,DOC(MMVII_cMes1GCP,mPt))
.def_readwrite("namePt", &cMes1GCP::mNamePt,DOC(MMVII_cMes1GCP,mNamePt))
.def_property("sXX",[](const cMes1GCP& m){return m.mSigma2[m.IndXX];},[](cMes1GCP& m, tREAL8 sXX){ m.mSigma2[m.IndXX] = sXX;},"Sigma2 of x coordinate")
.def_property("sYY",[](const cMes1GCP& m){return m.mSigma2[m.IndYY];},[](cMes1GCP& m, tREAL8 sYY){ m.mSigma2[m.IndYY] = sYY;},"Sigma2 of y coordinate")
.def_property("sZZ",[](const cMes1GCP& m){return m.mSigma2[m.IndZZ];},[](cMes1GCP& m, tREAL8 sZZ){ m.mSigma2[m.IndZZ] = sZZ;},"Sigma2 of z coordinate")
.def_property("sXX",[](const cMes1GCP& m){return m.mOptSigma2->at(m.IndXX);},[](cMes1GCP& m, tREAL8 sXX){ m.mOptSigma2->at(m.IndXX) = sXX;},"Sigma2 of x coordinate")
.def_property("sYY",[](const cMes1GCP& m){return m.mOptSigma2->at(m.IndYY);},[](cMes1GCP& m, tREAL8 sYY){ m.mOptSigma2->at(m.IndYY) = sYY;},"Sigma2 of y coordinate")
.def_property("sZZ",[](const cMes1GCP& m){return m.mOptSigma2->at(m.IndZZ);},[](cMes1GCP& m, tREAL8 sZZ){ m.mOptSigma2->at(m.IndZZ) = sZZ;},"Sigma2 of z coordinate")
.def("__repr__",
[](const cMes1GCP &m) {
std::ostringstream ss;
ss.precision(8);
ss << "Mes1GCP " << m.mNamePt << " " << m.mPt << ", sigma2 (XX,YY,ZZ): ("
<< m.mSigma2[m.IndXX] << ", " << m.mSigma2[m.IndYY] << ", " << m.mSigma2[m.IndZZ] << ")";
ss << "Mes1GCP " << m.mNamePt << " " << m.mPt;
if (m.mOptSigma2.has_value())
ss << ", sigma2 (XX,YY,ZZ): ("<< m.mOptSigma2->at(m.IndXX) << ", " << m.mOptSigma2->at(m.IndYY) << ", " << m.mOptSigma2->at(m.IndZZ) << ")";
return ss.str();
})
;
Expand Down

0 comments on commit 5713c20

Please sign in to comment.