Skip to content

Commit

Permalink
Fix jess_gauss.py: numpy import when no cupy, zerodm percent flagged
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwkania committed Dec 21, 2023
1 parent 392ee79 commit 458e74e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/jess_gauss.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
BACKEND_GPU = True

except ModuleNotFoundError:
import numpy as xp

BACKEND_GPU = False


Expand Down Expand Up @@ -156,10 +158,10 @@ def clean(

data[mask] = flatten_to

dm_percentage = xp.float(0.0)
if modes_to_zero < 0:
time_series -= xp.median(time_series)
data += time_series[:, None]
dm_percentage = 0
elif modes_to_zero == 1:
logging.debug("Zero DMing: Subtracting Mean")
data[mask] = xp.nan
Expand Down

0 comments on commit 458e74e

Please sign in to comment.