Skip to content

Commit

Permalink
Merge branch 'tickets/DM-44175'
Browse files Browse the repository at this point in the history
  • Loading branch information
leeskelvin committed May 11, 2024
2 parents 1ca68d4 + 7b703ea commit 3de15ee
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions python/lsst/pipe/tasks/functors.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,25 @@
"LocalDipoleDiffFluxErr", "Ebv",
]

import yaml
import re
from itertools import product
import logging
import os
import os.path
import re
import warnings
from contextlib import redirect_stdout
from itertools import product

import pandas as pd
import numpy as np
import astropy.units as u
import lsst.geom as geom
import lsst.sphgeom as sphgeom
import numpy as np
import pandas as pd
import yaml
from astropy.coordinates import SkyCoord

from lsst.utils import doImport
from lsst.utils.introspection import get_full_type_name
from lsst.daf.butler import DeferredDatasetHandle
from lsst.pipe.base import InMemoryDatasetHandle
import lsst.geom as geom
import lsst.sphgeom as sphgeom
from lsst.utils import doImport
from lsst.utils.introspection import get_full_type_name


def init_fromDict(initDict, basePath='lsst.pipe.tasks.functors',
Expand Down Expand Up @@ -1820,7 +1821,10 @@ class Ebv(Functor):

def __init__(self, **kwargs):
# Import is only needed for Ebv.
from dustmaps.sfd import SFDQuery
# Suppress unnecessary .dustmapsrc log message on import.
with open(os.devnull, "w") as devnull:
with redirect_stdout(devnull):
from dustmaps.sfd import SFDQuery
self._columns = ['coord_ra', 'coord_dec']
self.sfd = SFDQuery()
super().__init__(**kwargs)
Expand Down

0 comments on commit 3de15ee

Please sign in to comment.