Skip to content

Commit

Permalink
Stop using drizzle.util.is_blank
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Dec 11, 2024
1 parent 9cdaf94 commit 40b5682
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions romancal/resample/gwcs_drizzle.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging

import numpy as np
from drizzle import cdrizzle, util
from drizzle import cdrizzle

from . import resample_utils

Expand Down Expand Up @@ -377,10 +377,7 @@ def dodrizzle(
"""

# Insure that the fillval parameter gets properly interpreted for use with tdriz
if util.is_blank(str(fillval)):
fillval = "INDEF"
else:
fillval = str(fillval)
fillval = "INDEF" if str(fillval).strip() == "" else str(fillval)

if in_units == "cps":
expscale = 1.0
Expand Down
4 changes: 2 additions & 2 deletions romancal/resample/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
from astropy import units as u
from astropy.coordinates import SkyCoord
from drizzle import cdrizzle, util
from drizzle import cdrizzle
from roman_datamodels import datamodels, maker_utils, stnode
from stcal.alignment.util import compute_s_region_keyword, compute_scale

Expand Down Expand Up @@ -696,7 +696,7 @@ def drizzle_arrays(
"""

# Insure that the fillval parameter gets properly interpreted for use with tdriz
fillval = "INDEF" if util.is_blank(str(fillval)) else str(fillval)
fillval = "INDEF" if str(fillval).strip() == "" else str(fillval)
if insci.dtype > np.float32:
insci = insci.astype(np.float32)

Expand Down

0 comments on commit 40b5682

Please sign in to comment.