8 #ifndef __aoPaths_hpp__
9 #define __aoPaths_hpp__
11 #include "../sys/environment.hpp"
13 #include "../ioutils/fileUtils.hpp"
46 std::string
root(
const std::string & basisName,
bool create =
false)
51 path +=
"/basis/" + basisName;
60 std::string modes(
const std::string & basisName,
bool create =
false)
62 std::string path =
root(basisName, create) +
"/modes.fits";
67 std::string spectrum(
const std::string & basisName,
bool create =
false)
69 std::string path =
root(basisName, create) +
"/spectrum.fits";
88 std::string root(
const std::string & dmName,
bool create =
false)
92 path +=
"/dm/" + dmName;
111 std::string path = root(dmName, create) +
"/inf.fits";
125 std::string path = root(dmName, create) +
"/actPos.fits";
139 std::string path = root(dmName, create) +
"/pinv.fits";
151 std::string
mirrorModes(
const std::string & dmName,
bool create =
false)
153 std::string path = basis::modes(dmName, create);
167 std::string path = root(dmName, create) +
"/singularValues.dat";
180 std::string
basisRoot(
const std::string & dmName,
const std::string & basisName,
bool create =
false)
182 std::string path = root(dmName, create) +
"/basis/" + basisName;
200 std::string
M2c(
const std::string & dmName,
const std::string & basisName,
bool create =
false)
202 std::string path =
basisRoot(dmName, basisName, create);
249 std::string
projectedModes(
const std::string & dmName,
const std::string & basisName,
bool create =
false)
252 std::string path =
basisRoot(dmName, basisName, create);
259 path +=
"/projectedModes.fits";
304 std::string root(
const std::string & pupilName,
bool create =
false)
309 path +=
"/pupil/" + pupilName;
328 std::string
pupilFile(
const std::string & pupilName,
bool create =
false)
330 std::string path = root(pupilName, create) +
"/pupil.fits";
349 std::string root(
const std::string & sysName,
bool create =
false)
353 path +=
"/system/" + sysName;
373 std::string root(
const std::string & sysName,
bool create =
false)
389 std::string
sysResp(
const std::string & sysName,
390 const std::string & dmName,
391 const std::string & wfsName,
392 const std::string & pupilName,
393 const std::string & basisName,
396 std::string path = root(sysName, create);
398 path +=
"/" + dmName +
"/" + wfsName +
"/" + pupilName +
"/" + basisName;
410 std::string
rMat(
const std::string & sysName,
411 const std::string & dmName,
412 const std::string & wfsName,
413 const std::string & pupilName,
414 const std::string & basisName,
415 const std::string &
id,
419 std::string path =
sysResp(sysName, dmName, wfsName, pupilName, basisName, create);
431 std::string
rImages(
const std::string & sysName,
432 const std::string & dmName,
433 const std::string & wfsName,
434 const std::string & pupilName,
435 const std::string & basisName,
436 const std::string &
id,
440 std::string path =
sysResp(sysName, dmName, wfsName, pupilName, basisName, create);
452 std::string
iMat(
const std::string & sysName,
453 const std::string & dmName,
454 const std::string & wfsName,
455 const std::string & pupilName,
456 const std::string & basisName,
457 const std::string &
id,
461 std::string path =
sysResp(sysName, dmName, wfsName, pupilName, basisName, create);
474 std::string
U(
const std::string & sysName,
475 const std::string & dmName,
476 const std::string & wfsName,
477 const std::string & pupilName,
478 const std::string & basisName,
479 const std::string &
id,
483 std::string path =
sysResp(sysName, dmName, wfsName, pupilName, basisName, create);
496 std::string
S(
const std::string & sysName,
497 const std::string & dmName,
498 const std::string & wfsName,
499 const std::string & pupilName,
500 const std::string & basisName,
501 const std::string &
id,
505 std::string path =
sysResp(sysName, dmName, wfsName, pupilName, basisName, create);
518 std::string
VT(
const std::string & sysName,
519 const std::string & dmName,
520 const std::string & wfsName,
521 const std::string & pupilName,
522 const std::string & basisName,
523 const std::string &
id,
527 std::string path =
sysResp(sysName, dmName, wfsName, pupilName, basisName, create);
539 std::string siGains(
const std::string & sysName,
540 const std::string & dmName,
541 const std::string & wfsName,
542 const std::string & pupilName,
543 const std::string & basisName,
548 std::string path = root(sysName, create);
549 path +=
"/" + dmName +
"/" + wfsName +
"/" + pupilName +
"/" + basisName +
"/gains/si";
556 path +=
"/optg_" + std::to_string(mag) +
"mag.fits";
561 std::string lpGains(
const std::string & sysName,
562 const std::string & dmName,
563 const std::string & wfsName,
564 const std::string & pupilName,
565 const std::string & basisName,
571 std::string path = root(sysName, create);
572 path +=
"/" + dmName +
"/" + wfsName +
"/" + pupilName +
"/" + basisName +
"/gains/lp";
579 path +=
"/optg_" + std::to_string(mag) +
"mag_lpNc_" + std::to_string(lpNc) +
".fits";
584 std::string lpCoeff(
const std::string & sysName,
585 const std::string & dmName,
586 const std::string & wfsName,
587 const std::string & pupilName,
588 const std::string & basisName,
594 std::string path = root(sysName, create);
595 path +=
"/" + dmName +
"/" + wfsName +
"/" + pupilName +
"/" + basisName +
"/gains/lp";
602 path +=
"/lpc_" + std::to_string(mag) +
"mag_lpNc_" + std::to_string(lpNc) +
".fits";
std::string M2c(const std::string &dmName, const std::string &basisName, bool create=false)
The path for the modes-to-commands (M2c) matrix for a deformable mirror (DM) and a basis set.
std::string U(const std::string &sysName, const std::string &dmName, const std::string &wfsName, const std::string &pupilName, const std::string &basisName, const std::string &id, bool create=false)
Path for the system response interaction matrix.
std::string root(const std::string &sysName, bool create=false)
The root path for system files.
std::string pupilFile(const std::string &pupilName, bool create=false)
The path for the pupil FITS file.
std::string rImages(const std::string &sysName, const std::string &dmName, const std::string &wfsName, const std::string &pupilName, const std::string &basisName, const std::string &id, bool create=false)
Path for the system response calibration.
std::string mirrorModes(const std::string &dmName, bool create=false)
The path for the deformable mirror (DM) influence function based mirror modes.
std::string basisRoot(const std::string &dmName, const std::string &basisName, bool create=false)
The root path for the deformable mirror (DM) basis related files.
std::string rMat(const std::string &sysName, const std::string &dmName, const std::string &wfsName, const std::string &pupilName, const std::string &basisName, const std::string &id, bool create=false)
Path for the system response calibration.
std::string S(const std::string &sysName, const std::string &dmName, const std::string &wfsName, const std::string &pupilName, const std::string &basisName, const std::string &id, bool create=false)
Path for the system response interaction matrix.
std::string projectedModes(const std::string &dmName, const std::string &basisName, bool create=false)
The path for the projected modes for a deformable mirror (DM) and a basis set.
std::string sysResp(const std::string &sysName, const std::string &dmName, const std::string &wfsName, const std::string &pupilName, const std::string &basisName, bool create=false)
Path for the system response calibration.
std::string pseudoInverse(const std::string &dmName, bool create=false)
The path for the deformable mirror (DM) influence function pseudo-inverse.
std::string actuatorPositions(const std::string &dmName, bool create=false)
The path for the deformable mirror (DM) actuator positions.
std::string iMat(const std::string &sysName, const std::string &dmName, const std::string &wfsName, const std::string &pupilName, const std::string &basisName, const std::string &id, bool create=false)
Path for the system response interaction matrix.
std::string VT(const std::string &sysName, const std::string &dmName, const std::string &wfsName, const std::string &pupilName, const std::string &basisName, const std::string &id, bool create=false)
Path for the system response interaction matrix.
std::string singularValues(const std::string &dmName, bool create=false)
The path for the deformable mirror (DM) influence function pseudo-inverse singular values.
std::string influenceFunctions(const std::string &dmName, bool create=false)
The path for the deformable mirror (DM) influence functions.
int createDirectories(const std::string &path)
Create a directory or directories.
std::string root(const std::string &basisName, bool create=false)
The root path for basis files.
std::string getEnv(const std::string &estr)
Return the value of an environment variable.