Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors (as in color-color or hardness-intensity diagrams) #781

Merged
merged 28 commits into from Jan 15, 2024
Merged

Conversation

matteobachetti
Copy link
Member

@matteobachetti matteobachetti commented Dec 7, 2023

Depends on #754

@pep8speaks
Copy link

pep8speaks commented Dec 7, 2023

Hello @matteobachetti! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-01-15 10:50:12 UTC

@matteobachetti matteobachetti marked this pull request as draft December 7, 2023 20:06
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1fc9b90) 79.07% compared to head (115b9e6) 93.98%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #781       +/-   ##
===========================================
+ Coverage   79.07%   93.98%   +14.91%     
===========================================
  Files          43       43               
  Lines        8697     8762       +65     
===========================================
+ Hits         6877     8235     +1358     
+ Misses       1820      527     -1293     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matteobachetti matteobachetti marked this pull request as ready for review December 15, 2023 13:38
@matteobachetti matteobachetti requested review from dhuppenkothen and mgullik and removed request for dhuppenkothen December 15, 2023 13:40
@matteobachetti matteobachetti changed the title Colors Colors (as in color-color or hardness-intensity diagrams) Dec 16, 2023
Copy link
Member

@dhuppenkothen dhuppenkothen left a comment

Choose a reason for hiding this comment

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

Great work! The usual nitpicky comments you expect from me, and a couple of questions. :)

setup.cfg Outdated Show resolved Hide resolved
stingray/base.py Outdated Show resolved Hide resolved
stingray/base.py Outdated Show resolved Hide resolved
stingray/base.py Outdated Show resolved Hide resolved
stingray/base.py Outdated Show resolved Hide resolved
stingray/base.py Outdated
>>> np.allclose(res, 10)
True
"""
from .gti import bin_intervals_from_gtis, time_intervals_from_gtis
Copy link
Member

Choose a reason for hiding this comment

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

top-level import?

stingray/base.py Show resolved Hide resolved
stingray/events.py Show resolved Hide resolved
stingray/events.py Outdated Show resolved Hide resolved
stingray/lightcurve.py Show resolved Hide resolved
Copy link
Member

@dhuppenkothen dhuppenkothen left a comment

Choose a reason for hiding this comment

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

My main comment is that I'm not convinced by the behaviour in TimeSeries that suggests that event lists have dt=0. That seems very counterintuitive to me. Either event lists are also time series, in which case dt should be set to either the time resolution of the instrument, or to the intervals between events. I think by definition time series should not be allowed to have dt<=0, because that kind of defeats the purpose of a class that explicitly has one variable be ordered time. I would like to see if there's maybe a different mechanism to make that distinction that is also simple but doesn't break basic assumptions about how time series work?

stingray/base.py Outdated Show resolved Hide resolved
stingray/base.py Outdated Show resolved Hide resolved
stingray/base.py Outdated Show resolved Hide resolved
@matteobachetti
Copy link
Member Author

@dhuppenkothen the problem is that some missions do not declare a time resolution. What do you use for dt then? 0 means simply that there is no known time resolution, or that it's probably irrelevant for the purpose of the analysis.

@matteobachetti
Copy link
Member Author

Ok, I changed the logic to eliminate some of the confusion, and eliminated method-level imports as promised ;)

@matteobachetti
Copy link
Member Author

matteobachetti commented Jan 12, 2024

Note to self: fix the return value in the docstring of get_intensity_evolution Done

Copy link
Member

@dhuppenkothen dhuppenkothen left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@matteobachetti matteobachetti added this pull request to the merge queue Jan 15, 2024
Merged via the queue into main with commit a4cafa4 Jan 15, 2024
16 checks passed
@matteobachetti matteobachetti deleted the colors branch January 15, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants