API
psfFit.hpp
Go to the documentation of this file.
1 /** \file psfFit.hpp
2  * \brief The MagAO-X PSF Fitter application header
3  *
4  * \ingroup psfFit_files
5  */
6 
7 #ifndef psfFit_hpp
8 #define psfFit_hpp
9 
10 #include "../../libMagAOX/libMagAOX.hpp" //Note this is included on command line to trigger pch
11 #include "../../magaox_git_version.h"
12 
13 #include <mx/math/fit/fitGaussian.hpp>
14 #include <mx/improc/imageFilters.hpp>
15 
16 /** \defgroup psfFit
17  * \brief The MagAO-X PSF fitter.
18  *
19  * <a href="../handbook/operating/software/apps/psfFit.html">Application Documentation</a>
20  *
21  * \ingroup apps
22  *
23  */
24 
25 /** \defgroup psfFit_files
26  * \ingroup psfFit
27  */
28 
29 namespace MagAOX
30 {
31 namespace app
32 {
33 
34 struct darkShmimT
35 {
36  static std::string configSection()
37  {
38  return "darkShmim";
39  };
40 
41  static std::string indiPrefix()
42  {
43  return "dark";
44  };
45 };
46 
47 
48 /// The MagAO-X PSF Fitter
49 /**
50  * \ingroup psfFit
51  */
52 class psfFit : public MagAOXApp<true>, public dev::shmimMonitor<psfFit>, public dev::shmimMonitor<psfFit,darkShmimT>,
53  public dev::frameGrabber<psfFit>, public dev::telemeter<psfFit>
54 {
55  //Give the test harness access.
56  friend class psfFit_test;
57 
58  friend class dev::shmimMonitor<psfFit>;
59  friend class dev::shmimMonitor<psfFit,darkShmimT>;
60  friend class dev::frameGrabber<psfFit>;
61 
62  friend class dev::telemeter<psfFit>;
63 
64 public:
65  //The base shmimMonitor type
67 
69 
70  //The base frameGrabber type
72 
73  //The base telemeter type
75 
76  ///Floating point type in which to do all calculations.
77  typedef float realT;
78 
79  /** \name app::dev Configurations
80  *@{
81  */
82 
83  static constexpr bool c_frameGrabber_flippable = false; ///< app:dev config to tell framegrabber these images can not be flipped
84 
85  ///@}
86 
87 protected:
88 
89  /** \name Configurable Parameters
90  *@{
91  */
92 
93  std::string m_fpsSource; ///< Device name for getting fps if time-based averaging is used. This device should have *.fps.current.
94 
95  uint16_t m_fitCircBuffMaxLength {3600}; ///< Maximum length of the latency measurement circular buffers
96  float m_fitCircBuffMaxTime {5}; ///< Maximum time of the latency meaurement circular buffers
97 
98  float m_fwhmGuess {2};
99  ///@}
100 
101  mx::improc::eigenImage<float> m_image;
102  mx::improc::eigenImage<float> m_sm;
103 
104  mx::improc::eigenImage<float> m_dark;
105 
106  bool m_updated {false};
107  float m_x {0};
108  float m_y {0};
109 
110  float m_dx {0};
111  float m_dy {0};
112 
113  float m_fps {0};
114 
115  mx::sigproc::circularBufferIndex<float, cbIndexT> m_xcb;
116  mx::sigproc::circularBufferIndex<float, cbIndexT> m_ycb;
117 
118  std::vector<float> m_xcbD;
119  std::vector<float> m_ycbD;
120 
121  float m_mnx {0};
122  float m_rmsx {0};
123  float m_mny {0};
124  float m_rmsy {0};
125 
126  //Working memory for poke fitting
127  mx::math::fit::fitGaussian2Dsym<float> m_gfit;
128 
129 public:
130  /// Default c'tor.
131  psfFit();
132 
133  /// D'tor, declared and defined for noexcept.
134  ~psfFit() noexcept;
135 
136  virtual void setupConfig();
137 
138  /// Implementation of loadConfig logic, separated for testing.
139  /** This is called by loadConfig().
140  */
141  int loadConfigImpl( mx::app::appConfigurator & _config /**< [in] an application configuration from which to load values*/);
142 
143  virtual void loadConfig();
144 
145  /// Startup function
146  /**
147  *
148  */
149  virtual int appStartup();
150 
151  /// Implementation of the FSM for psfFit.
152  /**
153  * \returns 0 on no critical error
154  * \returns -1 on an error requiring shutdown
155  */
156  virtual int appLogic();
157 
158  /// Shutdown the app.
159  /**
160  *
161  */
162  virtual int appShutdown();
163 
164  // shmimMonitor interface:
165  int allocate( const dev::shmimT &);
166 
167  int processImage( void* curr_src,
168  const dev::shmimT &
169  );
170 
171  // shmimMonitor interface for referenc:
172  int allocate( const darkShmimT &);
173 
174  int processImage( void* curr_src,
175  const darkShmimT &
176  );
177 
178 protected:
179 
180  std::mutex m_imageMutex;
181 
182  sem_t m_smSemaphore {0}; ///< Semaphore used to synchronize the fg thread and the sm thread.
183 
184 public:
185 
186  /** \name dev::frameGrabber interface
187  *
188  * @{
189  */
190 
191  /// Implementation of the framegrabber configureAcquisition interface
192  /**
193  * \returns 0 on success
194  * \returns -1 on error
195  */
196  int configureAcquisition();
197 
198  /// Implementation of the framegrabber fps interface
199  /**
200  * \todo this needs to infer the stream fps and return it
201  */
202  float fps()
203  {
204  return m_fps;
205  }
206 
207  /// Implementation of the framegrabber startAcquisition interface
208  /**
209  * \returns 0 on success
210  * \returns -1 on error
211  */
212  int startAcquisition();
213 
214  /// Implementation of the framegrabber acquireAndCheckValid interface
215  /**
216  * \returns 0 on success
217  * \returns -1 on error
218  */
219  int acquireAndCheckValid();
220 
221  /// Implementation of the framegrabber loadImageIntoStream interface
222  /**
223  * \returns 0 on success
224  * \returns -1 on error
225  */
226  int loadImageIntoStream( void * dest /**< [in] */);
227 
228  /// Implementation of the framegrabber reconfig interface
229  /**
230  * \returns 0 on success
231  * \returns -1 on error
232  */
233  int reconfig();
234 
235  ///@}
236 
237 protected:
238 
239  /** \name INDI
240  * @{
241  */
242 
243  pcf::IndiProperty m_indiP_dx;
244 
246 
247  pcf::IndiProperty m_indiP_dy;
248 
250 
251  pcf::IndiProperty m_indiP_fpsSource;
253 
254  ///@}
255 
256  /** \name Telemeter Interface
257  *
258  * @{
259  */
260  int checkRecordTimes();
261 
262  int recordTelem( const telem_fgtimings * );
263 
264  ///@}
265 };
266 
267 inline
268 psfFit::psfFit() : MagAOXApp(MAGAOX_CURRENT_SHA1, MAGAOX_REPO_MODIFIED)
269 {
271  return;
272 }
273 
274 inline
275 psfFit::~psfFit() noexcept
276 {
277 
278 }
279 
280 inline
282 {
286  telemeterT::setupConfig(config);
287 
288  config.add("fitter.fpsSource", "", "fitter.fpsSource", argType::Required, "fitter", "fpsSource", false, "string", "Device name for getting fps if time-based averaging is used. This device should have *.fps.current.");
289 
290 }
291 
292 
293 inline
294 int psfFit::loadConfigImpl( mx::app::appConfigurator & _config )
295 {
296  shmimMonitorT::loadConfig(_config);
298 
299  frameGrabberT::loadConfig(_config);
300  telemeterT::loadConfig(_config);
301 
302  _config(m_fpsSource, "fitter.fpsSource");
303 
304 
305 
306  return 0;
307 }
308 
309 inline
311 {
312  loadConfigImpl(config);
313 }
314 
315 inline
317 {
318  if(shmimMonitorT::appStartup() < 0)
319  {
320  return log<software_error,-1>({__FILE__, __LINE__});
321  }
322 
324  {
325  return log<software_error,-1>({__FILE__, __LINE__});
326  }
327 
328  if(sem_init(&m_smSemaphore, 0,0) < 0)
329  {
330  log<software_critical>({__FILE__, __LINE__, errno,0, "Initializing S.M. semaphore"});
331  return -1;
332  }
333 
334  if(frameGrabberT::appStartup() < 0)
335  {
336  return log<software_error,-1>({__FILE__, __LINE__});
337  }
338 
339  if(telemeterT::appStartup() < 0)
340  {
341  return log<software_error,-1>({__FILE__, __LINE__});
342  }
343 
344  if(m_fpsSource != "")
345  {
346  REG_INDI_SETPROP(m_indiP_fpsSource, m_fpsSource, std::string("fps"));
347  }
348 
349  CREATE_REG_INDI_NEW_NUMBERF(m_indiP_dx, "dx", -100, 100, 1e-2, "%0.02f", "", "");
350  m_indiP_dx["current"].setValue(m_dx);
351  m_indiP_dx["target"].setValue(m_dx);
352 
353  CREATE_REG_INDI_NEW_NUMBERF(m_indiP_dy, "dy", -100, 100, 1e-2, "%0.02f", "", "");
354  m_indiP_dy["current"].setValue(m_dy);
355  m_indiP_dy["target"].setValue(m_dy);
356 
357 
359 
360  return 0;
361 }
362 
363 inline
365 {
366  if( shmimMonitorT::appLogic() < 0)
367  {
368  return log<software_error,-1>({__FILE__,__LINE__});
369  }
370 
371  if( darkShmimMonitorT::appLogic() < 0)
372  {
373  return log<software_error,-1>({__FILE__,__LINE__});
374  }
375 
376  if( frameGrabberT::appLogic() < 0)
377  {
378  return log<software_error,-1>({__FILE__,__LINE__});
379  }
380 
381  if( telemeterT::appLogic() < 0)
382  {
383  return log<software_error,-1>({__FILE__,__LINE__});
384  }
385 
386 
387  if( state() == stateCodes::OPERATING && m_xcb.size() > 0 )
388  {
389  if(m_xcb.size() >= m_xcb.maxEntries())
390  {
391  cbIndexT refEntry = m_xcb.earliest();
392 
393  m_xcbD.resize(m_xcb.maxEntries()-1);
394  m_ycbD.resize(m_xcb.maxEntries()-1);
395 
396  for(size_t n=0; n <= m_atimesD.size(); ++n)
397  {
398  m_xcbD[n] = m_xcb.at(refEntry,n);
399  m_ycbD[n] = m_ycb.at(refEntry,n);
400  }
401 
402  m_mnx = mx::math::vectorMean(m_xcbD);
403  m_rmsx = sqrt(mx::math::vectorVariance(m_xcbD, m_mnx));
404 
405  m_mny = mx::math::vectorMean(m_ycbD);
406  m_rmsy = sqrt(mx::math::vectorVariance(m_ycbD, m_mny));
407 
408  }
409  else
410  {
411  m_mnx = 0;
412  m_rmsx = 0;
413  m_mny = 0;
414  m_rmsy = 0;
415  }
416  }
417  else
418  {
419  m_mnx = 0;
420  m_rmsx = 0;
421  m_mny = 0;
422  m_rmsy = 0;
423  }
424 
425 
428 
429  if(frameGrabberT::updateINDI() < 0)
430  {
431  log<software_error>({__FILE__, __LINE__});
432  }
433 
434  updateIfChanged(m_indiP_dx, "current", m_dx);
435  updateIfChanged(m_indiP_dy, "current", m_dy);
436 
437  return 0;
438 }
439 
440 inline
442 {
447 
448  return 0;
449 }
450 
451 inline
452 int psfFit::allocate(const dev::shmimT & dummy)
453 {
454  static_cast<void>(dummy);
455 
456  std::lock_guard<std::mutex> guard(m_imageMutex);
457 
459  m_image.setZero();
460 
461  m_sm.resize(m_image.rows(), m_image.cols());
462 
463  if(m_fitCircBuffMaxLength == 0 || m_fitCircBuffMaxTime == 0 || m_fps <= 0)
464  {
465  m_xcb.maxEntries(0);
466  m_ycb.maxEntries(0);
467  }
468  else
469  {
470  //Set up the fit circ. buffs
473  if(cbSz < 3) cbSz = 3; //Make variance meaningful
474  m_xcb.maxEntries(cbSz);
475  m_ycb.maxEntries(cbSz);
476  }
477 
478  m_updated = false;
479  return 0;
480 }
481 
482 inline
483 int psfFit::processImage( void* curr_src,
484  const dev::shmimT & dummy
485  )
486 {
487  static_cast<void>(dummy);
488 
489  std::unique_lock<std::mutex> lock(m_imageMutex);
490 
491  if(m_dark.rows() == m_image.rows() && m_dark.cols() == m_image.cols())
492  {
493  for(unsigned nn=0; nn < shmimMonitorT::m_width*shmimMonitorT::m_height; ++nn)
494  {
495  m_image.data()[nn] = ((uint16_t*)curr_src) [nn] - m_dark.data()[nn];
496  }
497  }
498  else
499  {
500  for(unsigned nn=0; nn < shmimMonitorT::m_width*shmimMonitorT::m_height; ++nn)
501  {
502  m_image.data()[nn] = ((uint16_t*)curr_src) [nn];
503  }
504  }
505 
506  lock.unlock();
507 
508  // fit
509  //std::cerr << m_image.sum() << "\n";
510 
511  //float max;
512  //int x=0;
513  //int y=0;
514 
515  //max = m_image.maxCoeff(&x, &y);
516 
517  //mx::improc::medianSmooth(m_sm, x, y, max, m_image, 3);
518 
519  mx::improc::imageCenterOfLight(m_x, m_y, m_image);
520 
521 
522  /*if(fabs(m_x-x) > 2 || fabs(m_y-y) > 2)
523  {
524  std::cerr << "skip frame\n";
525  return 0;
526  }*/
527 /*
528  m_gfit.set_itmax(1000);
529  m_gfit.setArray(m_image.data(), m_image.rows(), m_image.cols());
530  m_gfit.setGuess(0, max, x, y, mx::math::func::sigma2fwhm(m_fwhmGuess));
531  m_gfit.fit();
532 
533  m_x = m_gfit.x0();
534  m_y = m_gfit.y0();
535 */
536 
537 
538  m_updated = true;
539 
540  //signal framegrabber
541  //Now tell the f.g. to get going
542  if(sem_post(&m_smSemaphore) < 0)
543  {
544  log<software_critical>({__FILE__, __LINE__, errno, 0, "Error posting to semaphore"});
545  return -1;
546  }
547 
548  //Update the latency circ. buffs
549  if(m_xcb.maxEntries() > 0)
550  {
551  m_xcb.nextEntry(m_x);
552  m_ycb.nextEntry(m_y);
553  }
554 
555  return 0;
556 }
557 
558 inline
559 int psfFit::allocate(const darkShmimT & dummy)
560 {
561  static_cast<void>(dummy);
562 
563  std::lock_guard<std::mutex> guard(m_imageMutex);
564 
566  {
567  return log<software_error,-1>({__FILE__, __LINE__, "dark is not float"});
568  }
569 
571  m_dark.setZero();
572 
573  return 0;
574 }
575 
576 inline
577 int psfFit::processImage( void* curr_src,
578  const darkShmimT & dummy
579  )
580 {
581  static_cast<void>(dummy);
582 
583  std::unique_lock<std::mutex> lock(m_imageMutex);
584 
585  for(unsigned nn=0; nn < darkShmimMonitorT::m_width*darkShmimMonitorT::m_height; ++nn)
586  {
587  m_dark.data()[nn] += ((float*)curr_src) [nn];
588  }
589 
590  lock.unlock();
591 
592  log<text_log>("dark updated", logPrio::LOG_INFO);
593 
594  return 0;
595 }
596 
597 inline
599 {
600 
603  frameGrabberT::m_dataType = _DATATYPE_FLOAT;
604 
605  return 0;
606 }
607 
608 inline
610 {
611  return 0;
612 }
613 
614 inline
616 {
617  timespec ts;
618 
619  if(clock_gettime(CLOCK_REALTIME, &ts) < 0)
620  {
621  log<software_critical>({__FILE__,__LINE__,errno, 0, "clock_gettime"});
622  return -1;
623  }
624 
625  ts.tv_sec += 1;
626 
627  if(sem_timedwait(&m_smSemaphore, &ts) == 0)
628  {
629  if( m_updated )
630  {
631  clock_gettime(CLOCK_REALTIME, &m_currImageTimestamp);
632  return 0;
633  }
634  else
635  {
636  return 1;
637  }
638  }
639  else
640  {
641  return 1;
642  }
643 
644 
645 }
646 
647 inline
649 {
650  ((float *) dest)[0] = m_x - m_dx;
651  ((float *) dest)[1] = m_y - m_dy;
652 
653  m_updated = false;
654 
655  return 0;
656 }
657 
658 inline
660 {
661  return 0;
662 }
663 
664 INDI_NEWCALLBACK_DEFN(psfFit, m_indiP_dx)(const pcf::IndiProperty & ipRecv)
665 {
666  if(ipRecv.getName() != m_indiP_dx.getName())
667  {
668  log<software_error>({__FILE__,__LINE__, "wrong INDI property received."});
669  return -1;
670  }
671 
672  float target;
673 
674  if( indiTargetUpdate( m_indiP_dx, target, ipRecv, true) < 0)
675  {
676  log<software_error>({__FILE__,__LINE__});
677  return -1;
678  }
679 
680  m_dx = target;
681 
682  log<text_log>("set dx = " + std::to_string(m_dx), logPrio::LOG_NOTICE);
683  return 0;
684 }
685 
686 INDI_NEWCALLBACK_DEFN(psfFit, m_indiP_dy)(const pcf::IndiProperty & ipRecv)
687 {
688  if(ipRecv.getName() != m_indiP_dy.getName())
689  {
690  log<software_error>({__FILE__,__LINE__, "wrong INDI property received."});
691  return -1;
692  }
693 
694  float target;
695 
696  if( indiTargetUpdate( m_indiP_dy, target, ipRecv, true) < 0)
697  {
698  log<software_error>({__FILE__,__LINE__});
699  return -1;
700  }
701 
702  m_dy = target;
703 
704  log<text_log>("set dy = " + std::to_string(m_dy), logPrio::LOG_NOTICE);
705  return 0;
706 }
707 
708 INDI_SETCALLBACK_DEFN( psfFit, m_indiP_fpsSource )(const pcf::IndiProperty &ipRecv)
709 {
710  if( ipRecv.getName() != m_indiP_fpsSource.getName())
711  {
712  log<software_error>({__FILE__, __LINE__, "Invalid INDI property."});
713  return -1;
714  }
715 
716  if( ipRecv.find("current") != true ) //this isn't valie
717  {
718  return 0;
719  }
720 
721  std::lock_guard<std::mutex> guard(m_indiMutex);
722 
723  realT fps = ipRecv["current"].get<float>();
724 
725  if(fps != m_fps)
726  {
727  m_fps = fps;
728  shmimMonitorT::m_restart = true;
729  }
730 
731  return 0;
732 }
733 
734 inline
736 {
738 }
739 
740 inline
742 {
743  return recordFGTimings(true);
744 }
745 
746 
747 
748 } //namespace app
749 } //namespace MagAOX
750 
751 #endif //psfFit_hpp
#define IMAGESTRUCT_FLOAT
Definition: ImageStruct.hpp:22
The base-class for MagAO-X applications.
Definition: MagAOXApp.hpp:75
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.
Definition: MagAOXApp.hpp:2877
stateCodes::stateCodeT state()
Get the current state code.
Definition: MagAOXApp.hpp:2082
static int log(const typename logT::messageT &msg, logPrioT level=logPrio::LOG_DEFAULT)
Make a log entry.
Definition: MagAOXApp.hpp:1590
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.
void loadConfig(mx::app::appConfigurator &config)
load the configuration system results
void setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
int updateINDI()
Update the INDI properties for this device controller.
uint8_t m_dataType
The ImageStreamIO type code.
int appLogic()
Checks the framegrabber thread.
uint32_t m_height
The height of the image, once deinterlaced etc.
uint32_t m_width
The width of the images in the stream.
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.
int appShutdown()
Shuts down the shmimMonitor thread.
uint8_t m_dataType
The ImageStreamIO type code.
void setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
bool m_getExistingFirst
If set to true by derivedT, any existing image will be grabbed and sent to processImage before waitin...
void loadConfig(mx::app::appConfigurator &config)
load the configuration system results
The MagAO-X PSF Fitter.
Definition: psfFit.hpp:54
virtual int appLogic()
Implementation of the FSM for psfFit.
Definition: psfFit.hpp:364
int checkRecordTimes()
Definition: psfFit.hpp:735
psfFit()
Default c'tor.
Definition: psfFit.hpp:268
int loadImageIntoStream(void *dest)
Implementation of the framegrabber loadImageIntoStream interface.
Definition: psfFit.hpp:648
int reconfig()
Implementation of the framegrabber reconfig interface.
Definition: psfFit.hpp:659
int loadConfigImpl(mx::app::appConfigurator &_config)
Implementation of loadConfig logic, separated for testing.
Definition: psfFit.hpp:294
float realT
Floating point type in which to do all calculations.
Definition: psfFit.hpp:77
static constexpr bool c_frameGrabber_flippable
app:dev config to tell framegrabber these images can not be flipped
Definition: psfFit.hpp:83
INDI_NEWCALLBACK_DECL(psfFit, m_indiP_dy)
uint16_t m_fitCircBuffMaxLength
Maximum length of the latency measurement circular buffers.
Definition: psfFit.hpp:95
INDI_NEWCALLBACK_DECL(psfFit, m_indiP_dx)
float fps()
Implementation of the framegrabber fps interface.
Definition: psfFit.hpp:202
pcf::IndiProperty m_indiP_dx
Definition: psfFit.hpp:243
std::vector< float > m_ycbD
Definition: psfFit.hpp:119
sem_t m_smSemaphore
Semaphore used to synchronize the fg thread and the sm thread.
Definition: psfFit.hpp:182
dev::telemeter< psfFit > telemeterT
Definition: psfFit.hpp:74
mx::sigproc::circularBufferIndex< float, cbIndexT > m_xcb
Definition: psfFit.hpp:115
virtual void loadConfig()
Definition: psfFit.hpp:310
pcf::IndiProperty m_indiP_dy
Definition: psfFit.hpp:247
~psfFit() noexcept
D'tor, declared and defined for noexcept.
Definition: psfFit.hpp:275
int acquireAndCheckValid()
Implementation of the framegrabber acquireAndCheckValid interface.
Definition: psfFit.hpp:615
dev::frameGrabber< psfFit > frameGrabberT
Definition: psfFit.hpp:71
int recordTelem(const telem_fgtimings *)
Definition: psfFit.hpp:741
std::mutex m_imageMutex
Definition: psfFit.hpp:180
int allocate(const dev::shmimT &)
Definition: psfFit.hpp:452
float m_fitCircBuffMaxTime
Maximum time of the latency meaurement circular buffers.
Definition: psfFit.hpp:96
mx::improc::eigenImage< float > m_dark
Definition: psfFit.hpp:104
pcf::IndiProperty m_indiP_fpsSource
Definition: psfFit.hpp:251
virtual void setupConfig()
Definition: psfFit.hpp:281
mx::math::fit::fitGaussian2Dsym< float > m_gfit
Definition: psfFit.hpp:127
virtual int appShutdown()
Shutdown the app.
Definition: psfFit.hpp:441
mx::improc::eigenImage< float > m_sm
Definition: psfFit.hpp:102
dev::shmimMonitor< psfFit, darkShmimT > darkShmimMonitorT
Definition: psfFit.hpp:68
std::vector< float > m_xcbD
Definition: psfFit.hpp:118
mx::sigproc::circularBufferIndex< float, cbIndexT > m_ycb
Definition: psfFit.hpp:116
INDI_SETCALLBACK_DECL(psfFit, m_indiP_fpsSource)
virtual int appStartup()
Startup function.
Definition: psfFit.hpp:316
int configureAcquisition()
Implementation of the framegrabber configureAcquisition interface.
Definition: psfFit.hpp:598
std::string m_fpsSource
Device name for getting fps if time-based averaging is used. This device should have *....
Definition: psfFit.hpp:93
int processImage(void *curr_src, const dev::shmimT &)
Definition: psfFit.hpp:483
mx::improc::eigenImage< float > m_image
Definition: psfFit.hpp:101
dev::shmimMonitor< psfFit > shmimMonitorT
Definition: psfFit.hpp:66
friend class psfFit_test
Definition: psfFit.hpp:56
int startAcquisition()
Implementation of the framegrabber startAcquisition interface.
Definition: psfFit.hpp:609
#define CREATE_REG_INDI_NEW_NUMBERF(prop, name, min, max, step, format, label, group)
Create and register a NEW INDI property as a standard number as float, using the standard callback na...
Definition: indiMacros.hpp:285
#define REG_INDI_SETPROP(prop, devName, propName)
Register a SET INDI property with the class, using the standard callback name.
Definition: indiMacros.hpp:264
@ OPERATING
The device is operating, other than homing.
Definition: stateCodes.hpp:50
const pcf::IndiProperty & ipRecv
INDI_NEWCALLBACK_DEFN(acesxeCtrl, m_indiP_windspeed)(const pcf
Definition: acesxeCtrl.hpp:687
INDI_SETCALLBACK_DEFN(MagAOXApp< _useINDI >, m_indiP_powerChannel)(const pcf
Definition: MagAOXApp.hpp:3195
Definition: dm.hpp:24
constexpr static logPrioT LOG_INFO
Informational. The info log level is the lowest level recorded during normal operations.
Definition: logPriority.hpp:49
constexpr static logPrioT LOG_NOTICE
A normal but significant condition.
Definition: logPriority.hpp:46
static std::string configSection()
Definition: psfFit.hpp:36
static std::string indiPrefix()
Definition: psfFit.hpp:41
A device which saves telemetry.
Definition: telemeter.hpp:52
int appShutdown()
Perform telemeter application shutdown.
Definition: telemeter.hpp:259
int loadConfig(appConfigurator &config)
Load the device section from an application configurator.
Definition: telemeter.hpp:208
int appLogic()
Perform telemeter application logic.
Definition: telemeter.hpp:253
int setupConfig(appConfigurator &config)
Setup an application configurator for the device section.
Definition: telemeter.hpp:195
int appStartup()
Starts the telemetry log thread.
Definition: telemeter.hpp:226
int checkRecordTimes(const telT &tel, telTs... tels)
Check the time of the last record for each telemetry type and make an entry if needed.
Definition: telemeter.hpp:266
Software ERR log entry.
Log entry recording framegrabber timings.