Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-19964

Read the ts_MTAOS Code and Document

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: ts_aos
    • Labels:

      Description

      Read the ts_MTAOS code and document to be familiar with it. This task will also to learn the Python asyncio library to have an initial understanding of how to use it. This task also plans to read the code of ts_salobj.

        Attachments

          Activity

          Hide
          ttsai Te-Wei Tsai added a comment - - edited

          Read the Dockerfiles of mtaos_dev and mtaos_sim. Read the  Document-21527.

          Read the document of ts_salobj.

          Show
          ttsai Te-Wei Tsai added a comment - - edited Read the Dockerfiles of mtaos_dev and mtaos_sim. Read the  Document-21527 . Read the document of ts_salobj .
          Hide
          ttsai Te-Wei Tsai added a comment -
          Show
          ttsai Te-Wei Tsai added a comment - Russel has the documents to adapt the ts_salobj from 3.9 to 3.10 as the following: 1.  https://community.lsst.org/t/changes-in-salobj-4-the-dds-version/3701 2.  https://community.lsst.org/t/changes-to-sal-script-schemas-and-dds/3709
          Hide
          ttsai Te-Wei Tsai added a comment -

          Send the following questions to Chris after reading through the code of ts_MTAOS:

          1. What are the "ts_config_ocs" and "ts_config_mttcs" for in the Dockerfile of mtaos_dev? I do not see the related import library on mtaos.py? Why do we need these two repositories?

          2. What is MTAOS_command_measureAlignment in MTAOS_Commands.xml? What is the intentional implementation of do_measureAlignment() in MTAOS class?

          3. What is MTAOS_command_issueAlignmentCorrection in MTAOS_Commands.xml?

          4. From the commands of MTAOS_command_measureAlignment and MTAOS_command_issueAlignmentCorrection, it looks like the MTAOS will command the alignment system directly. Is this correct? I thought these two commands should be defines by the alignment system. Otherwise, the MTAOS need to know the details of alignment system. Is this correct?

          5. What is MTAOS_logevent_rejectedWavefrontError in MTAOS_Events.xml? How to decide this rejection?

          6. What is MTAOS_logevent_rejectedDegreeOfFreedom in MTAOS_Events.xml? How to decide this rejection?

          7. There are some correction rejection event such as  MTAOS_logevent_rejectedM2HexapodCorrection in MTAOS_Events.xml? How to decide this rejection?

          8. Are there the warning ID list for MTAOS_logevent_wepWarning and MTAOS_logevent_ofcWarning in MTAOS_Events.xml

          9. Why the attribute of mtm1m3 and mtm2 have same index value = 0 while the mtcamerahexapod and mtm2hexapod have different values?

          https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L83-L87

          10. What is the id_data in do_issueAlignmentCorrection()?

          https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L122

          11. Where does the attribute of sync come from? And what is it?

          https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L141

          12. How do we leverage the hard-coded RawExpData object in runWEP()? Shall we add a mock camera class? Or extend the MTAOS's functions to let the RawExpData to be the output of internal functions?

          https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L373-L379

          13. Where does the attribute of evt_cameraHexapodCorrection come from? Is it automatically? The similar questions for logEvent_<name> functions. The similar question for tel_ofcDuration attribute.

          https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L513

          https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L718

          14. No contents in schema/MTAOS.yaml. What is the plan for this?

          15. Any plan/ blueprint in mind for me to work first or how to improve the ts_MTAOS?

          Show
          ttsai Te-Wei Tsai added a comment - Send the following questions to Chris after reading through the code of ts_MTAOS: 1. What are the "ts_config_ocs" and "ts_config_mttcs" for in the Dockerfile of mtaos_dev? I do not see the related import library on mtaos.py? Why do we need these two repositories? 2. What is MTAOS_command_measureAlignment in MTAOS_Commands.xml? What is the intentional implementation of do_measureAlignment() in MTAOS class? 3. What is MTAOS_command_issueAlignmentCorrection in MTAOS_Commands.xml? 4. From the commands of MTAOS_command_measureAlignment and MTAOS_command_issueAlignmentCorrection, it looks like the MTAOS will command the alignment system directly. Is this correct? I thought these two commands should be defines by the alignment system. Otherwise, the MTAOS need to know the details of alignment system. Is this correct? 5. What is MTAOS_logevent_rejectedWavefrontError in MTAOS_Events.xml? How to decide this rejection? 6. What is MTAOS_logevent_rejectedDegreeOfFreedom in MTAOS_Events.xml? How to decide this rejection? 7. There are some correction rejection event such as  MTAOS_logevent_rejectedM2HexapodCorrection in MTAOS_Events.xml? How to decide this rejection? 8. Are there the warning ID list for MTAOS_logevent_wepWarning and MTAOS_logevent_ofcWarning in MTAOS_Events.xml 9. Why the attribute of mtm1m3 and mtm2 have same index value = 0 while the mtcamerahexapod and mtm2hexapod have different values? https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L83-L87 10. What is the id_data in do_issueAlignmentCorrection()? https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L122 11. Where does the attribute of sync come from? And what is it? https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L141 12. How do we leverage the hard-coded RawExpData object in runWEP()? Shall we add a mock camera class? Or extend the MTAOS's functions to let the RawExpData to be the output of internal functions? https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L373-L379 13. Where does the attribute of evt_cameraHexapodCorrection come from? Is it automatically? The similar questions for logEvent_<name> functions. The similar question for tel_ofcDuration attribute. https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L513 https://github.com/lsst-ts/ts_MTAOS/blob/develop/python/lsst/ts/MTAOS/mtaos.py#L718 14. No contents in schema/MTAOS.yaml. What is the plan for this? 15. Any plan/ blueprint in mind for me to work first or how to improve the ts_MTAOS?
          Hide
          ttsai Te-Wei Tsai added a comment - - edited

          Chris replied my questions as the following:

          1. The ts_salobj needs "ts_config_ocs" and "ts_config_mttcs" to build. The ts_config_ocs contains the configuration files for OCS. The ts_salobj needs ts_config_ocs to find the Test directory. The ts_config_mttcs is for main telescope to use. The configuration files of ts_MTAOS will be in this repository in the final. This ts_config_mttcs repository is put in the Dockerfile for the use in the future.
          2. The MTAOS_command_measureAlignment will talk to laser alignment. This means MTAOS can control the laser tracker. Needs to discuss with Colin for the details of this.
          3. The id_data contains the the command id and data. It is noted that the ts_salobj v.3.10 removed this already. Only the "data" is left. They are generated by the ts_salobj in the run time. The value of id_data is filled by the Remote of ts_salobj automatically. What the developer needs to work is the BaseCsc actually (for ts_salobj v.3.9).
          4. The do_measureAlignment() will need to get the id_data to populate the attributes of  cameraHexapodAlignment and m2HexapodAlignment for do_issueAlignmentCorrection() to use.
          5. I could addd more rejections in the future.
          6. Same as 5.
          7. Covered above.
          8. They are defined in WEPWarning and OFCWarning from the event xml.
          9. There are two instances of SALPY_Hexapod. One is camera hexapod (index = 1) and one is m2 hexapod (index=2). For the M1M3 and M2, there is only one instance.
          10. Covered.
          11. Synchronize the movement of actuators. This attribute name is based on the xml file of hexapod. Chris checked with Doug for the value (=True) to set.
          12. Need to update the code to dynamically change the visit number.
          13. It is dynamically obtained when instantiating a BaseCsc object for the evt_ and tel_. Actually, the attribute of cmd_ will be generated from the Remote class.
          14. Need to move to ts_config_mttcs in the future. At this moment, the ts_MTAOS will have the build error if there is no this yaml file.
          15. No. Do the CMOS+SH first in the minimum effort. Then, to the ComCam, and scientific camera.
          16. Need to publish the warning event in the init().
          17. The ts_salobj will handle the raised error. I could remove the try-and-catch loop in do_processIntraExtraWavefrontError() in a future time.
          18. The flush() function in the test script is to remove the history.
          Show
          ttsai Te-Wei Tsai added a comment - - edited Chris replied my questions as the following: The ts_salobj needs "ts_config_ocs" and "ts_config_mttcs" to build. The ts_config_ocs contains the configuration files for OCS. The ts_salobj needs ts_config_ocs to find the Test directory. The ts_config_mttcs is for main telescope to use. The configuration files of ts_MTAOS will be in this repository in the final. This ts_config_mttcs repository is put in the Dockerfile for the use in the future. The MTAOS_command_measureAlignment will talk to laser alignment. This means MTAOS can control the laser tracker. Needs to discuss with Colin for the details of this. The id_data contains the the command id and data. It is noted that the ts_salobj v.3.10 removed this already. Only the "data" is left. They are generated by the ts_salobj in the run time. The value of id_data is filled by the Remote of ts_salobj automatically. What the developer needs to work is the BaseCsc actually (for ts_salobj v.3.9). The do_measureAlignment() will need to get the id_data to populate the attributes of  cameraHexapodAlignment and m2HexapodAlignment for do_issueAlignmentCorrection() to use. I could addd more rejections in the future. Same as 5. Covered above. They are defined in WEPWarning and OFCWarning from the event xml. There are two instances of SALPY_Hexapod. One is camera hexapod (index = 1) and one is m2 hexapod (index=2). For the M1M3 and M2, there is only one instance. Covered. Synchronize the movement of actuators. This attribute name is based on the xml file of hexapod. Chris checked with Doug for the value (=True) to set. Need to update the code to dynamically change the visit number. It is dynamically obtained when instantiating a BaseCsc object for the evt_ and tel_. Actually, the attribute of cmd_ will be generated from the Remote class. Need to move to ts_config_mttcs in the future. At this moment, the ts_MTAOS will have the build error if there is no this yaml file. No. Do the CMOS+SH first in the minimum effort. Then, to the ComCam, and scientific camera. Need to publish the warning event in the init(). The ts_salobj will handle the raised error. I could remove the try-and-catch loop in do_processIntraExtraWavefrontError() in a future time. The flush() function in the test script is to remove the history.
          Show
          ttsai Te-Wei Tsai added a comment - - edited Read the asyncio-internals , Python asyncio tips , coroutine , introduction-to-asyncio , and concurrency-vs-event-loop-vs-event-loop-concurrency .
          Hide
          ttsai Te-Wei Tsai added a comment -

          Read the ts_MTAOS code and discussed with Chris for the details. Practiced the asyncio library in Python.

          Show
          ttsai Te-Wei Tsai added a comment - Read the ts_MTAOS code and discussed with Chris for the details. Practiced the asyncio library in Python.
          Hide
          ccontaxis Christopher Contaxis [X] (Inactive) added a comment -

          Te-Wei asked some very good questions. I think he has a decent understanding of the code.

           

          Show
          ccontaxis Christopher Contaxis [X] (Inactive) added a comment - Te-Wei asked some very good questions. I think he has a decent understanding of the code.  

            People

            Assignee:
            ttsai Te-Wei Tsai
            Reporter:
            ttsai Te-Wei Tsai
            Reviewers:
            Christopher Contaxis [X] (Inactive)
            Watchers:
            Christopher Contaxis [X] (Inactive), Te-Wei Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Start date:
              End date:

                Jenkins

                No builds found.