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

meas_algorithms testPsfSelectTest.py relies on global state

    Details

    • Templates:

      Description

      In testing DM-11514 I have learned that testPsfSelectTest.py fails when run in pytest if testDetection.py is run first.

      The output on failure:

      E       AssertionError: 64 not less than 64
       
      tests/testPsfSelectTest.py:452: AssertionError
       
      Testing PSF selection *without* distortion
      sourceDetection INFO: Detected 70 positive sources to 5 sigma.
      sourceDetection INFO: Resubtracting the background after object detection
      measurement INFO: Measuring 70 sources (70 parents, 0 children) 
      measurement INFO: Measuring 1 sources (1 parents, 0 children) 
      Testing PSF selection *with* distortion
      sourceDetection INFO: Detected 70 positive sources to 5 sigma.
      sourceDetection INFO: Resubtracting the background after object detection
      measurement INFO: Measuring 70 sources (70 parents, 0 children) 
      measurement INFO: Measuring 1 sources (1 parents, 0 children) 
      uncorrected nStar, nGxy:  64 / 64     0 / 9
      dist-corrected nStar, nGxy:  64 / 64     0 / 9
      

      When it passes the output is:

      Testing PSF selection *without* distortion
      sourceDetection INFO: Detected 70 positive sources to 5 sigma.
      sourceDetection INFO: Resubtracting the background after object detection
      measurement INFO: Measuring 70 sources (70 parents, 0 children) 
      measurement INFO: Measuring 1 sources (1 parents, 0 children) 
      Testing PSF selection *with* distortion
      sourceDetection INFO: Detected 70 positive sources to 5 sigma.
      sourceDetection INFO: Resubtracting the background after object detection
      measurement INFO: Measuring 70 sources (70 parents, 0 children) 
      measurement INFO: Measuring 1 sources (1 parents, 0 children) 
      uncorrected nStar, nGxy:  62 / 64     0 / 9
      dist-corrected nStar, nGxy:  62 / 64     0 / 9
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tjenness Tim Jenness
                Watchers:
                John Swinbank, Russell Owen, Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel