Skip to content

Commit

Permalink
wrap pixell imports in try/except blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiquard authored and zonca committed Jan 23, 2025
1 parent a51c5ae commit f9368a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/pysm3/models/interpolating.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
from .. import utils
from ..utils import trapz_step_inplace, map2alm
from .template import Model
import pixell

try:
import pixell
except ImportError:
pixell = None

log = logging.getLogger("pysm3")

Expand Down
6 changes: 5 additions & 1 deletion src/pysm3/utils/spherical_harmonics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import logging

from astropy import units as u
import pixell.enmap, pixell.curvedsky

try:
import pixell.enmap, pixell.curvedsky
except ImportError:
pixell = None

from .. import mpi, utils

Expand Down

0 comments on commit f9368a4

Please sign in to comment.