Skip to content

Commit 03942ab

Browse files
fixes test falling
1 parent 458b19c commit 03942ab

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

stingray/lightcurve.py

+14-15
Original file line numberDiff line numberDiff line change
@@ -278,21 +278,20 @@ def __init__(
278278
if not skip_checks:
279279
time, counts, err = self.initial_optional_checks(time, counts, err, gti=gti)
280280

281-
if err_dist is None:
282-
pass
283-
elif isinstance(err_dist, str) or err_dist.lower() not in valid_statistics:
284-
# err_dist set can be increased with other statistics
285-
raise StingrayError(
286-
"Statistic not recognized." "Please select one of these: ",
287-
"{}".format(valid_statistics),
288-
)
289-
elif not err_dist.lower() == "poisson":
290-
simon(
291-
"Stingray only uses poisson err_dist at the moment. "
292-
"All analysis in the light curve will assume Poisson "
293-
"errors. "
294-
"Sorry for the inconvenience."
295-
)
281+
if err_dist is not None:
282+
if err_dist.lower() not in valid_statistics:
283+
# err_dist set can be increased with other statistics
284+
raise StingrayError(
285+
"Statistic not recognized." "Please select one of these: ",
286+
"{}".format(valid_statistics),
287+
)
288+
elif not err_dist.lower() == "poisson":
289+
simon(
290+
"Stingray only uses poisson err_dist at the moment. "
291+
"All analysis in the light curve will assume Poisson "
292+
"errors. "
293+
"Sorry for the inconvenience."
294+
)
296295

297296
self._time = time
298297

0 commit comments

Comments
 (0)