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

Return clearer message when no spot is detected

    XMLWordPrintable

    Details

      Description

      When agccActor didn't detect any spots, agActor failed with the following message:

      2025-04-04 11:45:37.104Z actor 40 AgCmd.py:301 AgCmd.acquire_field:
      Traceback (most recent call last):
       File "/software/mhs/products/Linux64/ics_agActor/1.1.1/python/agActor/Commands/AgCmd.py", line 244, in acquire_field
       ra, dec, inst_pa, dra, ddec, dinr, dscale, dalt, daz, *values = field_acquisition.acquire_field(design=design, frame_id=frame_id, altazimuth=True, logger=self.actor.logger, **kwargs) # design takes precedence over center
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       File "/software/mhs/products/Linux64/ics_agActor/1.1.1/python/agActor/field_acquisition.py", line 117, in acquire_field
       return (ra, dec, inst_pa, *_acquire_field(guide_objects, detected_objects, ra, dec, taken_at, adc, inst_pa, m2_pos3=m2_pos3, obswl=obswl, altazimuth=altazimuth, logger=logger, **_kwargs))
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       File "/software/mhs/products/Linux64/ics_agActor/1.1.1/python/agActor/field_acquisition.py", line 147, in _acquire_field
       dra, ddec, dinr, dscale, *diags = pfs.FAinstpa(_guide_objects, _detected_objects, ra, dec, taken_at.astimezone(tz=timezone.utc) if isinstance(taken_at, datetime) else datetime.fromtimestamp(taken_at, tz=timezone.utc) if isinstance(taken_at, Number) else taken_at, adc, inst_pa, m2_pos3, obswl, **_kwargs)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       File "/software/mhs/products/Linux64/ics_agActor/1.1.1/lib/python/agActor/kawanomoto/FieldAcquisitionAndFocusing.py", line 85, in FAinstpa
       filtered_darray, v = pfs.sourceFilter(darray, maxellip, maxsize, minsize)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       File "/software/mhs/products/Linux64/ics_agActor/1.1.1/lib/python/agActor/kawanomoto/Subaru_POPT2_PFS_AG.py", line 143, in sourceFilter
       ag_ccd = agarray[:,0]
       ~~~~~~~^^^^^
      IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
      2025-04-04 11:45:37.107Z cmds 20 CommandLink.py:122 > 2 2280 f text="AgCmd.acquire_field: too many indices for array: array is 1-dimensional, but 2 were indexed"

      It is helpful if the actor returns more clear message like "no spot was detected" or something.

        Attachments

          Activity

            People

            • Assignee:
              wtgee Wilfred Gee
              Reporter:
              yuki.moritani yuki.moritani
              Reviewers:
              yuki.moritani
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: