10 #include "../../libMagAOX/libMagAOX.hpp"
11 #include "../../magaox_git_version.h"
48 #define USEUSERSET (2)
473 config.add(
"shmimMonitor.shmimName",
"",
"shmimMonitor.shmimName", argType::Required,
"shmimMonitor",
"shmimName",
false,
"string",
"The name of the ImageStreamIO shared memory image. Will be used as /tmp/<shmimName>.im.shm. Default is camwfs_avg");
475 config.add(
"fit.threshold",
"",
"fit.threshold", argType::Required,
"fit",
"threshold",
false,
"float",
"The pupil finding threshold. 0 < threshold < 1");
476 config.add(
"fit.threshShmimName",
"",
"fit.threshShmimName", argType::Required,
"fit",
"threshShmimName",
false,
"float",
"The name of the image stream for the thresholded images. Default is camwfs_thresh.");
477 config.add(
"fit.edgeShmimName",
"",
"fit.edgeShmimName", argType::Required,
"fit",
"edgeShmimName",
false,
"float",
"The name of the image stream for the edge images. Default is camwfs_edge.");
479 config.add(
"fit.numPupils",
"",
"fit.numPupils", argType::Required,
"fit",
"numPupils",
false,
"int",
"The number of pupils. Default is 4. 3 is also supported.");
480 config.add(
"fit.pupMedIndex",
"",
"fit.pupMedIndex", argType::Required,
"fit",
"pupMedIndex",
false,
"float",
"The index of the pupil median in a sorted quadrant.");
482 config.add(
"cal.setx1",
"",
"cal.setx1", argType::Required,
"cal",
"setx1",
false,
"float",
"The x set point for quad 1 (LL).");
483 config.add(
"cal.sety1",
"",
"cal.sety1", argType::Required,
"cal",
"sety1",
false,
"float",
"The y set point for quad 1 (LL).");
484 config.add(
"cal.setD1",
"",
"cal.setD1", argType::Required,
"cal",
"setD1",
false,
"float",
"The D set point for quad 1 (LL).");
486 config.add(
"cal.setx2",
"",
"cal.setx2", argType::Required,
"cal",
"setx2",
false,
"float",
"The x set point for quad 2 (LL).");
487 config.add(
"cal.sety2",
"",
"cal.sety2", argType::Required,
"cal",
"sety2",
false,
"float",
"The y set point for quad 2 (LL).");
488 config.add(
"cal.setD2",
"",
"cal.setD2", argType::Required,
"cal",
"setD2",
false,
"float",
"The D set point for quad 2 (LL).");
490 config.add(
"cal.setx3",
"",
"cal.setx3", argType::Required,
"cal",
"setx3",
false,
"float",
"The x set point for quad 3 (LL).");
491 config.add(
"cal.sety3",
"",
"cal.sety3", argType::Required,
"cal",
"sety3",
false,
"float",
"The y set point for quad 3 (LL).");
492 config.add(
"cal.setD3",
"",
"cal.setD3", argType::Required,
"cal",
"setD3",
false,
"float",
"The D set point for quad 3 (LL).");
494 config.add(
"cal.setx4",
"",
"cal.setx4", argType::Required,
"cal",
"setx4",
false,
"float",
"The x set point for quad 4 (LL).");
495 config.add(
"cal.sety4",
"",
"cal.sety4", argType::Required,
"cal",
"sety4",
false,
"float",
"The y set point for quad 4 (LL).");
496 config.add(
"cal.setD4",
"",
"cal.setD4", argType::Required,
"cal",
"setD4",
false,
"float",
"The D set point for quad 4 (LL).");
515 _config(
m_fitter.m_pupMedIndex,
"fit.pupMedIndex");
558 log<software_critical>({__FILE__, __LINE__, errno,0,
"Initializing S.M. semaphore"});
572 createStandardIndiNumber<float>(
m_indiP_thresh,
"threshold", 0, 1 ,0,
"%0.2f",
"Threshold");
581 log<software_error>({__FILE__,__LINE__});
591 indi::addNumberElement<float>(
m_indiP_quad1,
"x", 0, 59, 0,
"%0.2f",
"center x");
592 indi::addNumberElement<float>(
m_indiP_quad1,
"dx", 0, 59, 0,
"%0.2f",
"delta-x");
593 indi::addNumberElement<float>(
m_indiP_quad1,
"y", 0, 59, 0,
"%0.2f",
"center x");
594 indi::addNumberElement<float>(
m_indiP_quad1,
"dy", 0, 59, 0,
"%0.2f",
"delta-y");
595 indi::addNumberElement<float>(
m_indiP_quad1,
"D", 0, 59, 0,
"%0.2f",
"diameter");
596 indi::addNumberElement<float>(
m_indiP_quad1,
"dD", 0, 59, 0,
"%0.2f",
"delta-D");
597 indi::addNumberElement<float>(
m_indiP_quad1,
"med", 0, std::numeric_limits<uint16_t>::max(), 0,
"%0.1f",
"flux");
598 indi::addNumberElement<float>(
m_indiP_quad1,
"bg", 0, std::numeric_limits<uint16_t>::max(), 0,
"%0.1f",
"background");
599 indi::addNumberElement<float>(
m_indiP_quad1,
"set-x", 0, 59, 0,
"%0.2f",
"set pt. center x");
601 indi::addNumberElement<float>(
m_indiP_quad1,
"set-y", 0, 59, 0,
"%0.2f",
"set pt. center x");
603 indi::addNumberElement<float>(
m_indiP_quad1,
"set-D", 0, 59, 0,
"%0.2f",
"set pt. diameter");
609 indi::addNumberElement<float>(
m_indiP_quad2,
"x", 0, 59, 0,
"%0.2f",
"center x");
610 indi::addNumberElement<float>(
m_indiP_quad2,
"dx", 0, 59, 0,
"%0.2f",
"delta-x");
611 indi::addNumberElement<float>(
m_indiP_quad2,
"y", 0, 59, 0,
"%0.2f",
"center y");
612 indi::addNumberElement<float>(
m_indiP_quad2,
"dy", 0, 59, 0,
"%0.2f",
"delta-y");
613 indi::addNumberElement<float>(
m_indiP_quad2,
"D", 0, 59, 0,
"%0.2f",
"diameter");
614 indi::addNumberElement<float>(
m_indiP_quad2,
"dD", 0, 59, 0,
"%0.2f",
"delta-D");
615 indi::addNumberElement<float>(
m_indiP_quad2,
"med", 0, std::numeric_limits<uint16_t>::max(), 0,
"%0.1f",
"flux");
616 indi::addNumberElement<float>(
m_indiP_quad2,
"bg", 0, std::numeric_limits<uint16_t>::max(), 0,
"%0.1f",
"background");
617 indi::addNumberElement<float>(
m_indiP_quad2,
"set-x", 0, 59, 0,
"%0.2f",
"set pt. center x");
619 indi::addNumberElement<float>(
m_indiP_quad2,
"set-y", 0, 59, 0,
"%0.2f",
"set pt. center x");
621 indi::addNumberElement<float>(
m_indiP_quad2,
"set-D", 0, 59, 0,
"%0.2f",
"set pt. diameter");
626 indi::addNumberElement<float>(
m_indiP_quad3,
"x", 0, 59, 0,
"%0.2f",
"center x");
627 indi::addNumberElement<float>(
m_indiP_quad3,
"dx", 0, 59, 0,
"%0.2f",
"delta-x");
628 indi::addNumberElement<float>(
m_indiP_quad3,
"y", 0, 59, 0,
"%0.2f",
"center y");
629 indi::addNumberElement<float>(
m_indiP_quad3,
"dy", 0, 59, 0,
"%0.2f",
"delta-y");
630 indi::addNumberElement<float>(
m_indiP_quad3,
"D", 0, 59, 0,
"%0.2f",
"diameter");
631 indi::addNumberElement<float>(
m_indiP_quad3,
"dD", 0, 59, 0,
"%0.2f",
"delta-D");
632 indi::addNumberElement<float>(
m_indiP_quad3,
"med", 0, std::numeric_limits<uint16_t>::max(), 0,
"%0.1f",
"flux");
633 indi::addNumberElement<float>(
m_indiP_quad3,
"bg", 0, std::numeric_limits<uint16_t>::max(), 0,
"%0.1f",
"background");
634 indi::addNumberElement<float>(
m_indiP_quad3,
"set-x", 0, 59, 0,
"%0.2f",
"set pt. center x");
636 indi::addNumberElement<float>(
m_indiP_quad3,
"set-y", 0, 59, 0,
"%0.2f",
"set pt. center x");
638 indi::addNumberElement<float>(
m_indiP_quad3,
"set-D", 0, 59, 0,
"%0.2f",
"set pt. diameter");
645 indi::addNumberElement<float>(
m_indiP_quad4,
"x", 0, 59, 0,
"%0.2f",
"center x");
646 indi::addNumberElement<float>(
m_indiP_quad4,
"dx", 0, 59, 0,
"%0.2f",
"delta-x");
647 indi::addNumberElement<float>(
m_indiP_quad4,
"y", 0, 59, 0,
"%0.2f",
"center y");
648 indi::addNumberElement<float>(
m_indiP_quad4,
"dy", 0, 59, 0,
"%0.2f",
"delta-y");
649 indi::addNumberElement<float>(
m_indiP_quad4,
"D", 0, 59, 0,
"%0.2f",
"diameter");
650 indi::addNumberElement<float>(
m_indiP_quad4,
"dD", 0, 59, 0,
"%0.2f",
"delta-D");
651 indi::addNumberElement<float>(
m_indiP_quad4,
"med", 0, std::numeric_limits<uint16_t>::max(), 0,
"%0.1f",
"flux");
652 indi::addNumberElement<float>(
m_indiP_quad4,
"bg", 0, std::numeric_limits<uint16_t>::max(), 0,
"%0.1f",
"background");
653 indi::addNumberElement<float>(
m_indiP_quad4,
"set-x", 0, 59, 0,
"%0.2f",
"set pt. center x");
655 indi::addNumberElement<float>(
m_indiP_quad4,
"set-y", 0, 59, 0,
"%0.2f",
"set pt. center x");
657 indi::addNumberElement<float>(
m_indiP_quad4,
"set-D", 0, 59, 0,
"%0.2f",
"set pt. diameter");
663 indi::addNumberElement<float>(
m_indiP_avg,
"x", 0, 59, 0,
"%0.2f",
"center x");
664 indi::addNumberElement<float>(
m_indiP_avg,
"dx", 0, 59, 0,
"%0.2f",
"delta-x");
665 indi::addNumberElement<float>(
m_indiP_avg,
"y", 0, 59, 0,
"%0.2f",
"center y");
666 indi::addNumberElement<float>(
m_indiP_avg,
"dy", 0, 59, 0,
"%0.2f",
"delta-y");
667 indi::addNumberElement<float>(
m_indiP_avg,
"D", 0, 59, 0,
"%0.2f",
"diameter");
668 indi::addNumberElement<float>(
m_indiP_avg,
"dD", 0, 59, 0,
"%0.2f",
"delta-D");
675 log<software_error>({__FILE__,__LINE__});
683 log<software_error>({__FILE__,__LINE__});
709 log<software_error>({__FILE__,__LINE__});
769 log<software_error>({__FILE__, __LINE__});
789 static_cast<void>(dummy);
802 mx::improc::eigenImage<float> refim, refedge;
804 if(
m_fitter.fit(refim, refedge) < 0)
806 return log<
software_error, -1>({__FILE__, __LINE__,
"error from fitter for reference"});
825 log<text_log>(
"Fit to reference image: ");
826 log<text_log>(
"Quad 1 set points: " + std::to_string(
m_setx1) +
" " + std::to_string(
m_sety1) +
" " + std::to_string(
m_setD1));
827 log<text_log>(
"Quad 2 set points: " + std::to_string(
m_setx2) +
" " + std::to_string(
m_sety2) +
" " + std::to_string(
m_setD2));
828 log<text_log>(
"Quad 3 set points: " + std::to_string(
m_setx3) +
" " + std::to_string(
m_sety3) +
" " + std::to_string(
m_setD3));
829 log<text_log>(
"Quad 4 set points: " + std::to_string(
m_setx4) +
" " + std::to_string(
m_sety4) +
" " + std::to_string(
m_setD4));
861 log<text_log>(
"Using user set-points");
884 log<text_log>(
"Set default set-points");
905 ImageStreamIO_createIm_gpu(&
m_threshShmim ,
m_threshShmimName.c_str(), 3, imsize,
shmimMonitorT::m_dataType, -1, 1, IMAGE_NB_SEMAPHORE, 0, CIRCULAR_BUFFER | ZAXIS_TEMPORAL,0);
908 ImageStreamIO_createIm_gpu(&
m_edgeShmim ,
m_edgeShmimName.c_str(), 3, imsize,
shmimMonitorT::m_dataType, -1, 1, IMAGE_NB_SEMAPHORE, 0, CIRCULAR_BUFFER | ZAXIS_TEMPORAL,0);
923 static_cast<void>(dummy);
927 m_fitIm.data()[nn] = ((
float*)curr_src) [nn];
1031 log<software_critical>({__FILE__, __LINE__, errno, 0,
"Error posting to semaphore"});
1145 std::cerr <<
"****************************************************************\n";
1220 std::cerr <<
"****************************************************************\n";
1248 clock_gettime(CLOCK_REALTIME, &
m_threshShmim.md->writetime);
1272 static_cast<void>(dummy);
1291 static_cast<void>(dummy);
1296 m_refIm.data()[nn] = ((
float*)curr_src) [nn];
1332 if(clock_gettime(CLOCK_REALTIME, &ts) < 0)
1334 log<software_critical>({__FILE__,__LINE__,errno,0,
"clock_gettime"});
1376 if(
ipRecv.getName() != m_indiP_thresh.getName())
1378 log<software_error>({__FILE__,__LINE__,
"wrong INDI property received."});
1384 if( indiTargetUpdate( m_indiP_thresh, target,
ipRecv,
true) < 0)
1386 log<software_error>({__FILE__,__LINE__});
1390 m_threshold = target;
1392 if(m_setPointSource ==
USEREFIM) shmimMonitorT::m_restart =
true;
1400 if(
ipRecv.getName() != m_indiP_averaging.getName())
1402 log<software_error>({__FILE__,__LINE__,
"wrong INDI property received."});
1406 if(
ipRecv[
"toggle"].getSwitchState() == pcf::IndiElement::On)
1410 m_avgx1sq_accum = 0;
1412 m_avgy1sq_accum = 0;
1414 m_avgD1sq_accum = 0;
1415 m_avgmed1_accum = 0;
1416 m_avgmed1sq_accum = 0;
1419 m_avgx2sq_accum = 0;
1421 m_avgy2sq_accum = 0;
1423 m_avgD2sq_accum = 0;
1424 m_avgmed2_accum = 0;
1425 m_avgmed2sq_accum = 0;
1428 m_avgx3sq_accum = 0;
1430 m_avgy3sq_accum = 0;
1432 m_avgD3sq_accum = 0;
1433 m_avgmed3_accum = 0;
1434 m_avgmed3sq_accum = 0;
1437 m_avgx4sq_accum = 0;
1439 m_avgy4sq_accum = 0;
1441 m_avgD4sq_accum = 0;
1442 m_avgmed4_accum = 0;
1443 m_avgmed4sq_accum = 0;
1445 m_avgxAll_accum = 0;
1446 m_avgxAllsq_accum = 0;
1447 m_avgyAll_accum = 0;
1448 m_avgyAllsq_accum = 0;
1449 m_avgDAll_accum = 0;
1450 m_avgDAllsq_accum = 0;
1451 m_avgmedAll_accum = 0;
1452 m_avgmedAllsq_accum = 0;
1459 log<text_log>(
"began averaging");
1462 else if(
ipRecv[
"toggle"].getSwitchState() == pcf::IndiElement::Off)
1464 m_averaging =
false;
1467 log<text_log>(
"stopped averaging");
1475 if(
ipRecv.getName() != m_indiP_reload.getName())
1477 log<software_error>({__FILE__,__LINE__,
"wrong INDI property received."});
1481 if(
ipRecv[
"request"].getSwitchState() == pcf::IndiElement::On)
1483 log<text_log>(
"reloading");
1484 shmimMonitorT::m_restart = 1;
1492 if(
ipRecv.getName() != m_indiP_update.getName())
1494 log<software_error>({__FILE__,__LINE__,
"wrong INDI property received."});
1498 if(
ipRecv[
"request"].getSwitchState() == pcf::IndiElement::On)
1500 std::lock_guard<std::mutex> guard(m_indiMutex);
1502 m_setx1 = m_indiP_quad1[
"x"].get<
float>();
1503 m_sety1 = m_indiP_quad1[
"y"].get<
float>();
1504 m_setD1 = m_indiP_quad1[
"D"].get<
float>();
1506 m_setx2 = m_indiP_quad2[
"x"].get<
float>();
1507 m_sety2 = m_indiP_quad2[
"y"].get<
float>();
1508 m_setD2 = m_indiP_quad2[
"D"].get<
float>();
1510 m_setx3 = m_indiP_quad3[
"x"].get<
float>();
1511 m_sety3 = m_indiP_quad3[
"y"].get<
float>();
1512 m_setD3 = m_indiP_quad3[
"D"].get<
float>();
1514 log<text_log>(
"Recorded current set-points: ");
1515 log<text_log>(
"Quad 1 set points: " + std::to_string(m_setx1) +
" " + std::to_string(m_sety1) +
" " + std::to_string(m_setD1));
1516 log<text_log>(
"Quad 2 set points: " + std::to_string(m_setx2) +
" " + std::to_string(m_sety2) +
" " + std::to_string(m_setD2));
1517 log<text_log>(
"Quad 3 set points: " + std::to_string(m_setx3) +
" " + std::to_string(m_sety3) +
" " + std::to_string(m_setD3));
1519 if(m_numPupils == 4)
1521 m_setx4 = m_indiP_quad4[
"x"].get<
float>();
1522 m_sety4 = m_indiP_quad4[
"y"].get<
float>();
1523 m_setD4 = m_indiP_quad4[
"D"].get<
float>();
1524 log<text_log>(
"Quad 4 set points: " + std::to_string(m_setx4) +
" " + std::to_string(m_sety4) +
" " + std::to_string(m_setD4));
1527 if(m_setPointSource ==
USEUSERSET) shmimMonitorT::m_restart =
true;
1535 if(
ipRecv.getName() != m_indiP_refmode.getName())
1537 log<software_error>({__FILE__,__LINE__,
"wrong INDI property received."});
1541 if(
ipRecv.find(
"default"))
1543 if(
ipRecv[
"default"].getSwitchState() == pcf::IndiElement::On)
1549 shmimMonitorT::m_restart =
true;
1556 if(
ipRecv[
"refim"].getSwitchState() == pcf::IndiElement::On)
1562 shmimMonitorT::m_restart =
true;
1569 if(
ipRecv[
"user"].getSwitchState() == pcf::IndiElement::On)
1575 shmimMonitorT::m_restart =
true;
#define IMAGESTRUCT_FLOAT
The base-class for MagAO-X applications.
void updateIfChanged(pcf::IndiProperty &p, const std::string &el, const T &newVal, pcf::IndiProperty::PropertyStateType ipState=pcf::IndiProperty::Ok)
Update an INDI property element value if it has changed.
int createStandardIndiRequestSw(pcf::IndiProperty &prop, const std::string &name, const std::string &label="", const std::string &group="")
Create a standard R/W INDI switch with a single request element.
stateCodes::stateCodeT state()
Get the current state code.
int registerIndiPropertyNew(pcf::IndiProperty &prop, int(*)(void *, const pcf::IndiProperty &))
Register an INDI property which is exposed for others to request a New Property for.
int createStandardIndiToggleSw(pcf::IndiProperty &prop, const std::string &name, const std::string &label="", const std::string &group="")
Create a standard R/W INDI switch with a single toggle element.
indiDriver< MagAOXApp > * m_indiDriver
The INDI driver wrapper. Constructed and initialized by execute, which starts and stops communication...
void updateSwitchIfChanged(pcf::IndiProperty &p, const std::string &el, const pcf::IndiElement::SwitchStateType &newVal, pcf::IndiProperty::PropertyStateType ipState=pcf::IndiProperty::Ok)
Update an INDI switch element value if it has changed.
static int log(const typename logT::messageT &msg, logPrioT level=logPrio::LOG_DEFAULT)
Make a log entry.
int createROIndiNumber(pcf::IndiProperty &prop, const std::string &propName, const std::string &propLabel="", const std::string &propGroup="")
Create a ReadOnly INDI Number property.
int registerIndiPropertyReadOnly(pcf::IndiProperty &prop)
Register an INDI property which is read only.
std::mutex m_indiMutex
Mutex for locking INDI communications.
int createStandardIndiSelectionSw(pcf::IndiProperty &prop, const std::string &name, const std::vector< std::string > &elements, const std::vector< std::string > &elementLabels, const std::string &label="", const std::string &group="")
Create a standard R/W INDI selection (one of many) switch with vector of elements and element labels.
timespec m_currImageTimestamp
The timestamp of the current image.
uint32_t m_width
The width of the image, once deinterlaced etc.
int appShutdown()
Shuts down the framegrabber thread.
int recordFGTimings(bool force=false)
int loadConfig(mx::app::appConfigurator &config)
load the configuration system results
int updateINDI()
Update the INDI properties for this device controller.
uint8_t m_dataType
The ImageStreamIO type code.
int appLogic()
Checks the framegrabber thread.
int appStartup()
Startup function.
uint32_t m_height
The height of the image, once deinterlaced etc.
int setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
int appStartup()
Startup function.
uint32_t m_width
The width of the images in the stream.
int setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
int updateINDI()
Update the INDI properties for this device controller.
int appLogic()
Checks the shmimMonitor thread.
uint32_t m_height
The height of the images in the stream.
std::string m_shmimName
The name of the shared memory image, is used in /tmp/<shmimName>.im.shm. Derived classes should set a...
int appShutdown()
Shuts down the shmimMonitor thread.
uint8_t m_dataType
The ImageStreamIO type code.
bool m_restart
Flag indicating tha the shared memory should be reinitialized.
int loadConfig(mx::app::appConfigurator &config)
load the configuration system results
bool m_getExistingFirst
If set to true by derivedT, any existing image will be grabbed and sent to processImage before waitin...
The MagAO-X Pyramid Pupil Fitter.
virtual int appShutdown()
Shutdown the app.
~pupilFit() noexcept
D'tor, declared and defined for noexcept.
pcf::IndiProperty m_indiP_quad1
pcf::IndiProperty m_indiP_numPupils
pcf::IndiProperty m_indiP_quad2
mx::improc::eigenImage< float > m_fitIm
INDI_NEWCALLBACK_DECL(pupilFit, m_indiP_refmode)
int m_numPupils
The number of pupils. Default is 4. 3 is also supported.
friend class pupilFit_test
pcf::IndiProperty m_indiP_refmode
INDI_NEWCALLBACK_DECL(pupilFit, m_indiP_update)
std::string m_edgeShmimName
The name of the image stream for the edge images. Default is camwfs_edge.
mx::improc::eigenImage< float > m_refIm
int processImage(void *curr_src, const dev::shmimT &)
INDI_NEWCALLBACK_DECL(pupilFit, m_indiP_thresh)
dev::shmimMonitor< pupilFit, refShmimT > refShmimMonitorT
dev::shmimMonitor< pupilFit > shmimMonitorT
virtual int appLogic()
Implementation of the FSM for pupilFit.
int loadImageIntoStream(void *dest)
Implementation of the framegrabber loadImageIntoStream interface.
bool m_edgeShmimConnected
static constexpr bool c_frameGrabber_flippable
app:dev config to tell framegrabber these images can not be flipped
float realT
Floating point type in which to do all calculations.
double m_avgmedAllsq_accum
int startAcquisition()
Implementation of the framegrabber startAcquisition interface.
pcf::IndiProperty m_indiP_quad3
virtual int appStartup()
Startup function.
pcf::IndiProperty m_indiP_averaging
INDI_NEWCALLBACK_DECL(pupilFit, m_indiP_reload)
virtual void loadConfig()
dev::frameGrabber< pupilFit > frameGrabberT
pcf::IndiProperty m_indiP_avg
pupilFitter< realT > m_fitter
int loadConfigImpl(mx::app::appConfigurator &_config)
Implementation of loadConfig logic, separated for testing.
pcf::IndiProperty m_indiP_thresh
pcf::IndiProperty m_indiP_reload
pcf::IndiProperty m_indiP_quad4
dev::telemeter< pupilFit > telemeterT
int acquireAndCheckValid()
Implementation of the framegrabber acquireAndCheckValid interface.
float fps()
Implementation of the framegrabber fps interface.
int reconfig()
Implementation of the framegrabber reconfig interface.
std::string m_threshShmimName
The name of the image stream for the thresholded images. Default is camwfs_thresh.
bool m_threshShmimConnected
pcf::IndiProperty m_indiP_update
bool m_refUpdated
Flag set if the online reference update is used.
int allocate(const dev::shmimT &)
INDI_NEWCALLBACK_DECL(pupilFit, m_indiP_averaging)
sem_t m_smSemaphore
Semaphore used to synchronize the fg thread and the sm thread.
virtual void setupConfig()
int recordTelem(const telem_fgtimings *)
int configureAcquisition()
Implementation of the framegrabber configureAcquisition interface.
mx::improc::eigenImage< float > m_edgeIm
#define INDI_NEWCALLBACK(prop)
Get the name of the static callback wrapper for a new property.
@ OPERATING
The device is operating, other than homing.
void updateSwitchIfChanged(pcf::IndiProperty &p, const std::string &el, const pcf::IndiElement::SwitchStateType &newVal, indiDriverT *indiDriver, pcf::IndiProperty::PropertyStateType newState=pcf::IndiProperty::Ok)
Update the value of the INDI element, but only if it has changed.
const pcf::IndiProperty & ipRecv
INDI_NEWCALLBACK_DEFN(acesxeCtrl, m_indiP_windspeed)(const pcf
std::unique_lock< std::mutex > lock(m_indiMutex)
constexpr static logPrioT LOG_ERROR
An error has occured which the software will attempt to correct.
constexpr static logPrioT LOG_NOTICE
A normal but significant condition.
The MagAO-X Pyramid Pupil Fitter class header.
A device base class which saves telemetry.
int appShutdown()
Perform telemeter application shutdown.
int loadConfig(appConfigurator &config)
Load the device section from an application configurator.
int appLogic()
Perform telemeter application logic.
int setupConfig(appConfigurator &config)
Setup an application configurator for the device section.
int appStartup()
Starts the telemetry log thread.
int checkRecordTimes(const telT &tel, telTs... tels)
Check the time of the last record for each telemetry type and make an entry if needed.
Struct to perform centration and measure diameter of Pyramid pupils.
static std::string indiPrefix()
static std::string configSection()
Log entry recording framegrabber timings.