Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stingray/lightcurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

__all__ = ["Lightcurve"]

valid_statistics = ["poisson", "gauss", None]
valid_statistics = ["poisson", "gauss", "None"]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do .lower() so either "None" or "none" is fine from the user perspective. I kept "None" as that's what e.g. matplolib uses. But we could keep it as "none" in valid_statistics as poiss and gauss are not capitalized, but from the user perspective it does not matter.

Having None type would make the code more clunky and we would unnecessarily need to handle that case separately, while if "none" is taken as a string makes all the cases the same and the code more straightforward.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I just pushed the suggested change


logger = setup_logger()

Expand Down Expand Up @@ -215,7 +215,7 @@ def __init__(
err=None,
input_counts=True,
gti=None,
err_dist="poisson",
err_dist="none",
bg_counts=None,
bg_ratio=None,
frac_exp=None,
Expand Down
Loading