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

Deprecation warnings in spectractor

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: spectractor
    • Labels:
      None
    • Story Points:
      0.2
    • Team:
      Architecture
    • Urgent?:
      No

      Description

      Butler tests force imports of all storage classes as part of a storage class test. This generates a bunch of deprecation warnings from spectractor:

      tests/test_storageClass.py::StorageClassFactoryTestCase::testFactoryFind
        /Users/timj/work/lsstsw/stack/lsst-scipipe-6.0.0/Darwin/spectractor/g088299903b/lib/python/spectractor/tools.py:6: DeprecationWarning: `photutils.IRAFStarFinder` is a deprecated alias for `photutils.detection.IRAFStarFinder` and will be removed in the future. Instead, please use `from photutils.detection import IRAFStarFinder` to silence this warning.
          from photutils import IRAFStarFinder
       
      tests/test_storageClass.py::StorageClassFactoryTestCase::testFactoryFind
        /Users/timj/work/lsstsw/stack/lsst-scipipe-6.0.0/Darwin/spectractor/g088299903b/lib/python/spectractor/tools.py:20: DeprecationWarning: Please use `maximum_filter` from the `scipy.ndimage` namespace, the `scipy.ndimage.filters` namespace is deprecated.
          from scipy.ndimage.filters import maximum_filter
       
      tests/test_storageClass.py::StorageClassFactoryTestCase::testFactoryFind
        /Users/timj/work/lsstsw/stack/lsst-scipipe-6.0.0/Darwin/spectractor/g088299903b/lib/python/spectractor/tools.py:21: DeprecationWarning: Please use `generate_binary_structure` from the `scipy.ndimage` namespace, the `scipy.ndimage.morphology` namespace is deprecated.
          from scipy.ndimage.morphology import generate_binary_structure, binary_erosion
       
      tests/test_storageClass.py::StorageClassFactoryTestCase::testFactoryFind
        /Users/timj/work/lsstsw/stack/lsst-scipipe-6.0.0/Darwin/spectractor/g088299903b/lib/python/spectractor/tools.py:21: DeprecationWarning: Please use `binary_erosion` from the `scipy.ndimage` namespace, the `scipy.ndimage.morphology` namespace is deprecated.
          from scipy.ndimage.morphology import generate_binary_structure, binary_erosion
       
      tests/test_storageClass.py::StorageClassFactoryTestCase::testFactoryFind
        /Users/timj/work/lsstsw/stack/lsst-scipipe-6.0.0/Darwin/spectractor/g088299903b/lib/python/spectractor/extractor/background.py:12: DeprecationWarning: `photutils.Background2D` is a deprecated alias for `photutils.background.Background2D` and will be removed in the future. Instead, please use `from photutils.background import Background2D` to silence this warning.
          from photutils import Background2D, SExtractorBackground
       
      tests/test_storageClass.py::StorageClassFactoryTestCase::testFactoryFind
        /Users/timj/work/lsstsw/stack/lsst-scipipe-6.0.0/Darwin/spectractor/g088299903b/lib/python/spectractor/extractor/background.py:12: DeprecationWarning: `photutils.SExtractorBackground` is a deprecated alias for `photutils.background.SExtractorBackground` and will be removed in the future. Instead, please use `from photutils.background import SExtractorBackground` to silence this warning.
          from photutils import Background2D, SExtractorBackground
      

      Please fix.

        Attachments

          Activity

          Hide
          tjenness Tim Jenness added a comment -

          Matthias Wittgen has found that in the rubin-env 7.0.0dev python 3.11 env we have additional problems with spectractor in the use of axes vs ax parameters (seemingly from np.histogram). These deprecation warnings were not shown above.

          Show
          tjenness Tim Jenness added a comment - Matthias Wittgen has found that in the rubin-env 7.0.0dev python 3.11 env we have additional problems with spectractor in the use of axes vs ax parameters (seemingly from np.histogram). These deprecation warnings were not shown above.
          Hide
          tjenness Tim Jenness added a comment -

          Additional warning from test output:

          spectractor/tools.py:1424: FutureWarning: use_gaussian_derivatives currently defaults to False, but will change to True in a future version. Please specify this argument explicitly to maintain the current behavior
          spectractor/fit/fitter.py:1334: OptimizeWarning: Unknown solver options: ftol
          

          (I'm not sure why the warnings turn up twice when the package builds via eupspkg).

          Show
          tjenness Tim Jenness added a comment - Additional warning from test output: spectractor/tools.py:1424: FutureWarning: use_gaussian_derivatives currently defaults to False, but will change to True in a future version. Please specify this argument explicitly to maintain the current behavior spectractor/fit/fitter.py:1334: OptimizeWarning: Unknown solver options: ftol (I'm not sure why the warnings turn up twice when the package builds via eupspkg).
          Hide
          tjenness Tim Jenness added a comment -

          I fixed a bunch of warnings. There are still lots more when you run tests but you can put them on a new ticket.

          Show
          tjenness Tim Jenness added a comment - I fixed a bunch of warnings. There are still lots more when you run tests but you can put them on a new ticket.
          Hide
          mfisherlevine Merlin Fisher-Levine added a comment -

          Jeremy Neveu (I've DMed you, but just re-posting here): could you take a look at the PR and just make sure you'll be OK with me up-streaming all these to you?

          Show
          mfisherlevine Merlin Fisher-Levine added a comment - Jeremy Neveu (I've DMed you, but just re-posting here): could you take a look at the PR and just make sure you'll be OK with me up-streaming all these to you?
          Hide
          tjenness Tim Jenness added a comment -

          Approved on GitHub.

          Show
          tjenness Tim Jenness added a comment - Approved on GitHub.

            People

            Assignee:
            tjenness Tim Jenness
            Reporter:
            tjenness Tim Jenness
            Reviewers:
            Merlin Fisher-Levine
            Watchers:
            Jeremy Neveu, Merlin Fisher-Levine, Tim Jenness
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.