@@ -57,14 +57,20 @@ const AxesGroup = () => {
57
57
} ;
58
58
59
59
const AstrometryFitStack = ( ) => {
60
- const keywords = useKeywords ( [ 'cherno.astrometry_fit' , 'cherno.guide_rms' ] ) ;
60
+ const keywords = useKeywords ( [
61
+ 'cherno.astrometry_fit' ,
62
+ 'cherno.guide_rms' ,
63
+ 'cherno.acquisition_valid'
64
+ ] ) ;
61
65
62
66
const [ fwhm , setFwhm ] = React . useState ( '-' ) ;
63
67
const [ fwhmColor , setFwhmColor ] = React . useState < any > ( 'default' ) ;
64
68
65
69
const [ rms , setRms ] = React . useState ( '-' ) ;
66
70
const [ rmsColor , setRmsColor ] = React . useState < any > ( 'default' ) ;
67
71
72
+ const [ acquired , setAcquired ] = React . useState < boolean | undefined > ( undefined ) ;
73
+
68
74
React . useEffect ( ( ) => {
69
75
const astrometry_fit = keywords [ 'cherno.astrometry_fit' ] ;
70
76
if ( astrometry_fit ) {
@@ -101,12 +107,21 @@ const AstrometryFitStack = () => {
101
107
}
102
108
}
103
109
}
110
+
111
+ if ( keywords [ 'cherno.acquisition_valid' ] ) {
112
+ setAcquired ( keywords [ 'cherno.acquisition_valid' ] . values [ 0 ] ) ;
113
+ }
104
114
} , [ keywords ] ) ;
105
115
106
116
return (
107
117
< Stack pl = { 3 } spacing = { 1 } direction = 'row' alignItems = { 'center' } justifyContent = { 'center' } >
108
118
< Chip label = { `RMS ${ rms } \u00b5m` } color = { rmsColor } />
109
119
< Chip label = { `FWHM ${ fwhm } ` } color = { fwhmColor } />
120
+ < Chip
121
+ sx = { { display : acquired !== undefined ? undefined : 'none' } }
122
+ label = { acquired === true ? 'Acquired' : 'Acquisition failed' }
123
+ color = { acquired === true ? 'success' : 'error' }
124
+ />
110
125
</ Stack >
111
126
) ;
112
127
} ;
0 commit comments