10#include <mx/improc/imageFilters.hpp>
11#include <mx/improc/imageXCorrFFT.hpp>
12using namespace mx::improc;
14#include <mx/math/fit/fitGaussian.hpp>
16#include "../../libMagAOX/libMagAOX.hpp"
17#include "../../magaox_git_version.h"
92 mx::improc::imageXCorrFFT<eigenImage<float>>
m_xcorr;
249 mx::improc::milkImage<float>
mdm;
254 catch(
const std::exception&
e)
292 static_cast<void>(
dummy);
306 static_cast<void>(
dummy);
310 mx::improc::milkImage<float>
mdm;
315 catch(
const std::exception&
e)
322 mx::improc::eigenImage<float>
refIm;
370 std::cerr <<
"dmPokeXCorr::analyzeSensor: " <<
xs <<
" " <<
ys <<
"\n";
The base-class for MagAO-X applications.
std::string m_configName
The name of the configuration file (minus .conf).
stateCodes::stateCodeT state()
Get the current state code.
int m_shutdown
Flag to signal it's time to shutdown. When not 0, the main loop exits.
static int log(const typename logT::messageT &msg, logPrioT level=logPrio::LOG_DEFAULT)
Make a log entry.
A base class to coordinate poking a deformable mirror's actuators and synchronizedreads of a camera i...
int updateMeasurement(float deltaX, float deltaY)
std::vector< int > m_poke_y
mx::improc::milkImage< float > m_pokeImage
int allocate(const wfsShmimT &)
int basicRunSensor()
Run the basic +/- poke sensor steps.
int processImage(void *curr_src, const wfsShmimT &)
std::vector< int > m_poke_x
uint32_t m_depth
The depth of the circular buffer in the stream.
uint32_t m_width
The width of the images in the stream.
uint32_t m_height
The height of the images in the stream.
The MagAO-X DM to PWFS alignment Application.
dev::dmPokeWFS< dmPokeXCorr > dmPokeWFST
int processImage(void *curr_src, const zrespShmimT &dummy)
mx::improc::milkImage< float > m_refIm
mx::improc::imageXCorrFFT< eigenImage< float > > m_xcorr
int runSensor(bool firstRun)
Run the sensor steps.
int loadConfigImpl(mx::app::appConfigurator &_config)
Implementation of loadConfig logic, separated for testing.
shmimMonitorT & shmimMonitor()
virtual int appShutdown()
Shutdown the app.
darkShmimMonitorT & darkShmimMonitor()
virtual void loadConfig()
virtual void setupConfig()
int allocate(const zrespShmimT &dummy)
int analyzeSensor()
Analyze the poke image.
virtual int appLogic()
Implementation of the FSM for dmPokeXCorr.
virtual int appStartup()
Startup function.
dmPokeXCorr()
Default c'tor.
friend class dmPokeXCorr_test
#define DMPOKEWFS_APP_SHUTDOWN
Call dmPokeWFS::appShutdown with error checking.
#define DMPOKEWFS_APP_STARTUP
Call dmPokeWFS::appStartup with error checking.
#define DMPOKEWFS_SETUP_CONFIG(cfig)
Call dmPokeWFS::setupConfig with error checking.
#define DMPOKEWFS_LOAD_CONFIG(cfig)
Call dmPokeWFS::loadConfig with error checking.
#define DMPOKEWFS_APP_LOGIC
Call dmPokeWFS::appLogic with error checking.
@ READY
The device is ready for operation, but is not operating.
#define SHMIMMONITORT_APP_STARTUP(SHMIMMONITORT)
Call shmimMonitorT::appStartup with error checking for a typedef-ed shmimMonitor.
#define SHMIMMONITORT_UPDATE_INDI(SHMIMMONITORT)
Call shmimMonitorT::updateINDI with error checking for a typedef-ed shmimMonitor.
#define SHMIMMONITORT_SETUP_CONFIG(SHMIMMONITORT, cfig)
Call shmimMonitorT::setupConfig with error checking for a typedef-ed shmimMonitor.
#define SHMIMMONITORT_APP_LOGIC(SHMIMMONITORT)
Call shmimMonitorT::appLogic with error checking for a typedef-ed shmimMonitor.
#define SHMIMMONITORT_APP_SHUTDOWN(SHMIMMONITORT)
Call shmimMonitorT::appShutodwn with error checking for a typedef-ed shmimMonitor.
#define SHMIMMONITORT_LOAD_CONFIG(SHMIMMONITORT, cfig)
Call shmimMonitorT::loadConfig with error checking for a typedef-ed shmimMonitor.
A device base class which saves telemetry.
int checkRecordTimes(const telT &tel, telTs... tels)
Check the time of the last record for each telemetry type and make an entry if needed.
static std::string configSection()
static std::string indiPrefix()
Log entry recording DM poke centering results.
#define TELEMETER_APP_LOGIC
Call telemeter::appLogic with error checking.
#define TELEMETER_LOAD_CONFIG(cfig)
Call telemeter::loadConfig with error checking.
#define TELEMETER_APP_STARTUP
Call telemeter::appStartup with error checking.
#define TELEMETER_SETUP_CONFIG(cfig)
Call telemeter::setupConfig with error checking.
#define TELEMETER_APP_SHUTDOWN
Call telemeter::appShutdown with error checking.