Difference between revisions of "CDM GUI manual"

From my_wiki
Jump to: navigation, search
m
m (GUI not responding)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page contains instructions for the CDM GUI. In case of questions contact Darko Zaric.
+
This page contains instructions for the Camera Displacement Monitor (CDM) GUI. In case of questions contact Darko Zaric.
  
==GUI interface==
+
=GUI interface=
 +
You can find the screenshot of the CDM GUI and the general CDM FSM states and methods.<br>
 +
When you use the GUI only the buttons with allowed FSM transition states will be working and the rest of the will be grayed out. <br>
 +
In the example image below only Connect method is available in the current state.
  
 
{| align='center'
 
{| align='center'
Line 9: Line 12:
  
  
==Description of GUI parts==
+
=Standard use (for shifters)=
=Monitoring=  
+
# During startup check the state of the system. It should be at Safe(0) if there were no tests during the day.
 +
# Check the Hood temperature and humidity. If the humidity is above 80% don't use the CDM as that is the upper operating limit for the relative humidity. If the humidity is below 80% then click '''Connect''' to connect to the CDM camera and transition to Ready(1) state. Hood temperature/humidity and camera temperature status are updated every 10 seconds. If the humidity rises above 80% or the camera temperature status is not Normal during the night then Disconnect the CDM.
 +
# After you Connect you will see the current camera setting in the Configuration part of the GUI. For the nominal CDM the settings should be:
 +
#:* Pixel clock = 216
 +
#:* Exposure = 50
 +
#:* FPS = 10
 +
#:* Gain = 0
 +
#:* Pixel format: IS_CM_MONO8
 +
#:These settings should already be set. If not input the values in the Configuration boxes and call the '''Configure''' method.
 +
#:If you need to take bending model images you will need to change these settings. Pixel clock should be the same (216), Pixel format should be IS_CM_SENSOR_RAW16. For the rest of the setting check the bending model images instructions.
 +
#:If you want to check CDM camera images during the day then reduce the exposure time and set gain to 0.
 +
# Following the instructions in the Commisioning Manual the LEDs and OARL should be on. Then you can start the CDM nominal mode with '''StartCDM''' button. You should see that the timestamp in the image is updating every second. You should also see a circle fitted to the LEDs. In the monitoring window you should see that the Circle and OARL values are updating every second. If LED or OARL are set to -1, then they were not detected. In that case check in the image that you see LEDs and OARL, you can use Image Enhancement button to help you.
 +
# If you are done with the observations and the OARL/LEDs are off, then you can stop image taking with '''StopCDM'''.
 +
# At the end of the night '''Disconnect''' the camera.
 +
 
 +
 
 +
=GUI subsections=
 +
Description of the GUI parts and their datapoints, commands etc.
 +
 
 +
==Monitoring==  
 
Contains monitoring datapoint values. They are read-only.
 
Contains monitoring datapoint values. They are read-only.
  
Hood temperature: Displays temperature inside the hood.
+
* '''Hood temperature''': Displays temperature inside the hood.
Hood humidity: Displays humidity inside the hood. It should be below 80% to operate CDM.
+
* '''Hood humidity''': Displays humidity inside the hood. It should be below 80% to operate CDM.
Camera temperature status: If the CDM camera is connected it will display it's temperature status. It should be Normal. If it displays Warning or Critical, disconnect the CDM camera and contact Darko.
+
* '''Camera temperature status''': If the CDM camera is connected it will display it's temperature status. It should be Normal. If it displays Warning or Critical, disconnect the CDM camera and contact Darko.
Status: This part displays information about the system status. This part is still unfinished, so it mostly displays No status.
+
* '''Status''': This part displays information about the system status. This part is still unfinished, so it mostly displays No status.
FSM state: Display the current Finite State Machine state the CDM is in.  
+
* '''FSM state''': Display the current Finite State Machine state the CDM is in.  
FSM transition: Displays if the system is in transition from one FSM state to another. If it is 1 then it is in transition and won't be able to receive FSM commands. If 0, then you can provide the available FSM commands.
+
* '''FSM transition''': Displays if the system is in transition from one FSM state to another. If it is 1 then it is in transition and won't be able to receive FSM commands. If 0, then you can provide the available FSM commands.
Circle x: Current circle center in horizontal direction, units in arcsec.
+
* '''Circle x''': Current circle center in horizontal direction, units in arcsec.
OARL 1 x: Current OARL 1 center in horizontal direction, units in arcsec.
+
* '''OARL 1 x''': Current OARL 1 center in horizontal direction, units in arcsec.
OARL 2 x: Current OARL 2 center in horizontal direction, units in arcsec.
+
* '''OARL 2 x''': Current OARL 2 center in horizontal direction, units in arcsec.
  
=Configuration=  
+
==Configuration==
 
Contains configuration datapoint values. You can read the current values and input new values to be provided to the Configure commands.
 
Contains configuration datapoint values. You can read the current values and input new values to be provided to the Configure commands.
  
Pixel clock:  It determines the speed at which the sensor cells can be read out. Default value 216, usually you don't need to change this.
+
* '''Pixel clock''':  It determines the speed at which the sensor cells can be read out. Default value 216, usually you don't need to change this.
Exposure time: Exposure time for each image. Available range of values 1-999 ms.
+
* '''Exposure time''': Exposure time for each image. Available range of values 0.1-999 ms.
FPS: Frames per second. Range of values: 1-10 Hz.
+
* '''FPS''': Frames per second. Range of values: 1-10 Hz.
Gain: Range of values: 0-100.
+
* '''Gain''': Range of values: 0-100.
Pixel format: You can select 8bit (IS_CM_MONO8) or 16bit (IS_CM_SENSOR_RAW16).
+
* '''Pixel format''': You can select 8bit (IS_CM_MONO8) or 16bit (IS_CM_SENSOR_RAW16).
Comment: If you set any string here it will be added to the header of the saved images. Once set it will be the same for each subsequent image.
+
* '''Comment''': If you set any string here it will be added to the header of the saved images. Once set it will be the same for each subsequent image.
  
=Commands=
+
==Commands==
 +
This part contains FSM commands.
 +
* '''Connect''': When the system starts it is in Safe(0) state. In that state the CDM camera is not connected. With the Connect command you connect to the CDM camera and the system is in Ready(1) state.
 +
* '''Disconnect''': Transitions the system from the Ready(1) state to Safe(0) state. This disconnects the camera.
 +
* '''Configure''': Uses the input parameters from Configuration section (Pixel Clock, Exposure, FPS, Gain and Pixel Format) to set these parameters. Can only be called in Ready(1) and Tpoint(3) state. When this is called the datapoint in the Configuration part will be updated. Note that the pixel clock, exporesure and FPS settings depend on each other and internally the system calculates the final settings based on the input setting. The input settings may not match the final setting, so please check them after calling the Configure method. For example if you input FPS=10 and exposure=1000ms that cannot be true at the same time so the system will calculate the final setting. Similar thing is done to prevent input values lower than minimal and higher than maximal.
 +
* '''GetImage''': Captures 1 image and saves it do disk as a FITS format. Callable in Ready(1) state.
 +
* '''GoToTpoint''': Changes state from Ready(1) to Tpoint(3).
 +
* '''GetToReady''': Changes state from Tpoin(3) to Ready(1).
 +
* '''StartStream''': Display the live image from the camera using the current camera settings. No images are saved to disk. No calculations are performed on the images. Use this to check the current camera view.
 +
* '''StopStream''': Stops the camera stream.
 +
* '''StartCDM''': Starts the CDM image taking with the current configuration settings. The images are usually taken with 10 Hz. Images are not saved to disk, they are analyzed automatically. When the LEDs are on you should see a circle that fits the LEDs. Also a timestamp is displayed on the top of the image.
 +
* '''StopCDM''': Stop the CDM mode.
 +
* '''Acknowledge''': If in undefined state, this will transition the system in Safe(0) state. Still to be tested completely.
  
Connect: When the system starts it is in Safe(0) state. In that state the CDM camera is not connected. With the Connect command you connect to the CDM camera and the system is in Ready(1) state.
+
==Image Taking commands==
Disconnect: Transitions the system from the Ready(1) state to Safe(0) state. This disconnects the camera.
 
Configure: Uses the input parameters from Configuration section (Pixel Clock, Exposure, FPS, Gain and Pixel Format) to set these parameters. Can only be called in Ready(1) and Tpoint(3) state.
 
GetImage: Captures 1 image and saves it do disk as a FITS format. Callable in Ready(1) state.
 
GoToTpoint: Changes state from Ready(1) to Tpoint(3).
 
GetToReady: Changes state from Tpoin(3) to Ready(1).
 
StartStream: Display the live image from the camera using the current camera settings. No images are saved to disk. No calculations are performed on the images. Use this to check the current camera view.
 
StopStream: Stops the camera stream.
 
StartCDM: Starts the CDM image taking with the current configuration settings. The images are usually taken with 10 Hz. Images are not saved to disk, they are analyzed automatically. When the LEDs are on you should see a circle that fits the LEDs. Also a timestamp is displayed on the top of the image.
 
StopCDM: Stop the CDM mode.
 
Acknowledge: If in undefined state, this will transition the system in Safe(0) state. Still to be tested completely.
 
 
 
=Image Taking commands=
 
 
While in Tpoint(3) mode you can use these commands.
 
While in Tpoint(3) mode you can use these commands.
  
Get Multiple Images: They will be taken one by one and saved to disk. You need to input in "N images to take" box how many images to take.
+
* '''Get Multiple Images''': They will be taken one by one and saved to disk. You need to input in "N images to take" box how many images to take.
Get Multiple Images Stacked: CDM will take multiple images and stack them. The final output will be one image that will be saved to disk. You need to input in "N images to integrate" box how many images to be stacked.
+
* '''Get Multiple Images Stacked''': CDM will take multiple images and stack them. The final output will be one image that will be saved to disk. You need to input in "N images to integrate" box how many images to be stacked.
Stop Getting Images: This will stop the ongoing Get Multiple Images and Get Multiple Images Stacked commands. Use this if you want to prematurely end the aforementioned commands. The images will still be succesfully processed, although less than specified in the related input boxes.
+
* '''Stop Getting Images''': This will stop the ongoing Get Multiple Images and Get Multiple Images Stacked commands. Use this if you want to prematurely end the aforementioned commands. The images will still be succesfully processed, although less than specified in the related input boxes.
  
=GUI lower part=
+
==Rest of the GUI==
 +
This part describes to bottom part of the GUI.
 
   
 
   
Image: This displays the last taken image from various image taking commands.  
+
* '''Image''': This displays the last taken image from various image taking commands.  
Image Path: If the image was saved to disk you can find the full path of the last images heree.
+
* '''Image Path''': If the image was saved to disk you can find the full path of the last images heree.
Image Enhancement: If the image is too dark, you can enhance it with this button.
+
* '''Image Enhancement''': If the image is too dark, you can enhance it with this button.
Zoom: You can zoom in/out of the image.
+
* '''Zoom''': You can zoom in/out of the image.
 +
 
 +
 
 +
=Troubleshooting=
 +
==GUI not responding==
 +
 
 +
1) If the ImageEnhancement (LogScale) checkbox at the bottom of the GUI is turned on in can cause a delay in the image processing.
 +
Currently the GUI takes some time to process the image so it is displayed in LogScale. And that time can be more than the time between the incoming images. So if you are taking images continuously the GUI cannot keep up with the image processing and it will be delayed w.r.t. real time because an image queue will form.
 +
You will notice that the time displayed in the images will be behind the actual time. Also you will not be able to call any method until all the images are processed.
 +
If this happens just unclick the ImageEnhancement checkbox and the images will quickly catch up and you will be able to control the GUI.
 +
 
 +
2) Try to restart the GUI. If the values in the GUI are still not updating and the commands are not working then maybe the CDM MOS server is not working and/or needs to be restarted. In principle the CDM MOS server is always running. Via cronjob it checks if it's running and starts itself every minute in needed.
 +
In case of issue you can force restart the CDM MOS by logging to the lst1@operator3 machine and going to the /home/lst1/CDM_Scripts folder and running Kill_CDM.sh. The CDM will start again in a minute.
 +
 
 +
<!-- ==The values in the saved images are not correct==
 +
If the Safety Collector was restarted then the CDM MOS server needs to be restarted to reestablish connection. Otherwise the datapoints (like Az, Zd, LED, OARL etc.) from the Safety Collector won't be correct and the saved CDM images will have the wrong header.
 +
-->

Latest revision as of 08:37, 1 October 2021

This page contains instructions for the Camera Displacement Monitor (CDM) GUI. In case of questions contact Darko Zaric.

GUI interface[edit]

You can find the screenshot of the CDM GUI and the general CDM FSM states and methods.
When you use the GUI only the buttons with allowed FSM transition states will be working and the rest of the will be grayed out.
In the example image below only Connect method is available in the current state.

CDM GUI appearance.
CDM FSM states and methods.


Standard use (for shifters)[edit]

  1. During startup check the state of the system. It should be at Safe(0) if there were no tests during the day.
  2. Check the Hood temperature and humidity. If the humidity is above 80% don't use the CDM as that is the upper operating limit for the relative humidity. If the humidity is below 80% then click Connect to connect to the CDM camera and transition to Ready(1) state. Hood temperature/humidity and camera temperature status are updated every 10 seconds. If the humidity rises above 80% or the camera temperature status is not Normal during the night then Disconnect the CDM.
  3. After you Connect you will see the current camera setting in the Configuration part of the GUI. For the nominal CDM the settings should be:
    • Pixel clock = 216
    • Exposure = 50
    • FPS = 10
    • Gain = 0
    • Pixel format: IS_CM_MONO8
    These settings should already be set. If not input the values in the Configuration boxes and call the Configure method.
    If you need to take bending model images you will need to change these settings. Pixel clock should be the same (216), Pixel format should be IS_CM_SENSOR_RAW16. For the rest of the setting check the bending model images instructions.
    If you want to check CDM camera images during the day then reduce the exposure time and set gain to 0.
  4. Following the instructions in the Commisioning Manual the LEDs and OARL should be on. Then you can start the CDM nominal mode with StartCDM button. You should see that the timestamp in the image is updating every second. You should also see a circle fitted to the LEDs. In the monitoring window you should see that the Circle and OARL values are updating every second. If LED or OARL are set to -1, then they were not detected. In that case check in the image that you see LEDs and OARL, you can use Image Enhancement button to help you.
  5. If you are done with the observations and the OARL/LEDs are off, then you can stop image taking with StopCDM.
  6. At the end of the night Disconnect the camera.


GUI subsections[edit]

Description of the GUI parts and their datapoints, commands etc.

Monitoring[edit]

Contains monitoring datapoint values. They are read-only.

  • Hood temperature: Displays temperature inside the hood.
  • Hood humidity: Displays humidity inside the hood. It should be below 80% to operate CDM.
  • Camera temperature status: If the CDM camera is connected it will display it's temperature status. It should be Normal. If it displays Warning or Critical, disconnect the CDM camera and contact Darko.
  • Status: This part displays information about the system status. This part is still unfinished, so it mostly displays No status.
  • FSM state: Display the current Finite State Machine state the CDM is in.
  • FSM transition: Displays if the system is in transition from one FSM state to another. If it is 1 then it is in transition and won't be able to receive FSM commands. If 0, then you can provide the available FSM commands.
  • Circle x: Current circle center in horizontal direction, units in arcsec.
  • OARL 1 x: Current OARL 1 center in horizontal direction, units in arcsec.
  • OARL 2 x: Current OARL 2 center in horizontal direction, units in arcsec.

Configuration[edit]

Contains configuration datapoint values. You can read the current values and input new values to be provided to the Configure commands.

  • Pixel clock: It determines the speed at which the sensor cells can be read out. Default value 216, usually you don't need to change this.
  • Exposure time: Exposure time for each image. Available range of values 0.1-999 ms.
  • FPS: Frames per second. Range of values: 1-10 Hz.
  • Gain: Range of values: 0-100.
  • Pixel format: You can select 8bit (IS_CM_MONO8) or 16bit (IS_CM_SENSOR_RAW16).
  • Comment: If you set any string here it will be added to the header of the saved images. Once set it will be the same for each subsequent image.

Commands[edit]

This part contains FSM commands.

  • Connect: When the system starts it is in Safe(0) state. In that state the CDM camera is not connected. With the Connect command you connect to the CDM camera and the system is in Ready(1) state.
  • Disconnect: Transitions the system from the Ready(1) state to Safe(0) state. This disconnects the camera.
  • Configure: Uses the input parameters from Configuration section (Pixel Clock, Exposure, FPS, Gain and Pixel Format) to set these parameters. Can only be called in Ready(1) and Tpoint(3) state. When this is called the datapoint in the Configuration part will be updated. Note that the pixel clock, exporesure and FPS settings depend on each other and internally the system calculates the final settings based on the input setting. The input settings may not match the final setting, so please check them after calling the Configure method. For example if you input FPS=10 and exposure=1000ms that cannot be true at the same time so the system will calculate the final setting. Similar thing is done to prevent input values lower than minimal and higher than maximal.
  • GetImage: Captures 1 image and saves it do disk as a FITS format. Callable in Ready(1) state.
  • GoToTpoint: Changes state from Ready(1) to Tpoint(3).
  • GetToReady: Changes state from Tpoin(3) to Ready(1).
  • StartStream: Display the live image from the camera using the current camera settings. No images are saved to disk. No calculations are performed on the images. Use this to check the current camera view.
  • StopStream: Stops the camera stream.
  • StartCDM: Starts the CDM image taking with the current configuration settings. The images are usually taken with 10 Hz. Images are not saved to disk, they are analyzed automatically. When the LEDs are on you should see a circle that fits the LEDs. Also a timestamp is displayed on the top of the image.
  • StopCDM: Stop the CDM mode.
  • Acknowledge: If in undefined state, this will transition the system in Safe(0) state. Still to be tested completely.

Image Taking commands[edit]

While in Tpoint(3) mode you can use these commands.

  • Get Multiple Images: They will be taken one by one and saved to disk. You need to input in "N images to take" box how many images to take.
  • Get Multiple Images Stacked: CDM will take multiple images and stack them. The final output will be one image that will be saved to disk. You need to input in "N images to integrate" box how many images to be stacked.
  • Stop Getting Images: This will stop the ongoing Get Multiple Images and Get Multiple Images Stacked commands. Use this if you want to prematurely end the aforementioned commands. The images will still be succesfully processed, although less than specified in the related input boxes.

Rest of the GUI[edit]

This part describes to bottom part of the GUI.

  • Image: This displays the last taken image from various image taking commands.
  • Image Path: If the image was saved to disk you can find the full path of the last images heree.
  • Image Enhancement: If the image is too dark, you can enhance it with this button.
  • Zoom: You can zoom in/out of the image.


Troubleshooting[edit]

GUI not responding[edit]

1) If the ImageEnhancement (LogScale) checkbox at the bottom of the GUI is turned on in can cause a delay in the image processing. Currently the GUI takes some time to process the image so it is displayed in LogScale. And that time can be more than the time between the incoming images. So if you are taking images continuously the GUI cannot keep up with the image processing and it will be delayed w.r.t. real time because an image queue will form. You will notice that the time displayed in the images will be behind the actual time. Also you will not be able to call any method until all the images are processed. If this happens just unclick the ImageEnhancement checkbox and the images will quickly catch up and you will be able to control the GUI.

2) Try to restart the GUI. If the values in the GUI are still not updating and the commands are not working then maybe the CDM MOS server is not working and/or needs to be restarted. In principle the CDM MOS server is always running. Via cronjob it checks if it's running and starts itself every minute in needed. In case of issue you can force restart the CDM MOS by logging to the lst1@operator3 machine and going to the /home/lst1/CDM_Scripts folder and running Kill_CDM.sh. The CDM will start again in a minute.