Uploaded image for project: 'Instrument control development'
  1. Instrument control development
  2. INSTRM-2800

Define minimum guiding star limit and give better error message

    XMLWordPrintable

    Details

      Description

      A good error message is currently displayed when there are zero guide stars available, but if there is a single star available we get a non-obvious message. The message should be improved and there should be a defined minimum number of stars that are required for guiding and/or focusing.

      2025-11-21 09:34:42.228Z actor            20 AgCmd.py:458 AgCmd.acquire_field: Calling focus
      2025-11-21 09:34:42.228Z agActor.utils.focus 20 focus.py:58 In focus with max_ellipticity=2.0, max_size=1000000000000.0, min_size=-1.0
      2025-11-21 09:34:42.235Z actor            40 AgCmd.py:509 AgCmd.acquire_field:
      Traceback (most recent call last):
        File "/software/mhs/products/Linux64/ics_agActor/1.1.63/python/agActor/Commands/AgCmd.py", line 459, in acquire_field
          dz, dzs = focus(
                    ^^^^^^
        File "/software/mhs/products/Linux64/ics_agActor/1.1.63/python/agActor/utils/focus.py", line 79, in focus
          dzs = calculate_focus_errors(
                ^^^^^^^^^^^^^^^^^^^^^^^
        File "/software/mhs/products/Linux64/ics_agActor/1.1.63/python/agActor/coordinates/FieldAcquisitionAndFocusing.py", line 45, in calculate_focus_errors
          moment_differences = pfs.agarray2momentdifference(
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/software/mhs/products/Linux64/ics_agActor/1.1.63/python/agActor/coordinates/Subaru_POPT2_PFS_AG.py", line 328, in agarray2momentdifference
          filtered_agarray, v = PFS.sourceFilter(self, array, maxellip, maxsize, minsize)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/software/mhs/products/Linux64/ics_agActor/1.1.63/python/agActor/coordinates/Subaru_POPT2_PFS_AG.py", line 13, in sourceFilter
          ag_ccd  = agarray[:,0]
                    ~~~~~~~^^^^^
      IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
      2025-11-21 09:34:42.244Z cmds             20 CommandLink.py:122 > 2 59 f text="AgCmd.acquire_field: too many indices for array: array is 1-dimensional, but 2 were indexed"
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wtgee Wilfred Gee
                Reporter:
                wtgee Wilfred Gee
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: