-
Notifications
You must be signed in to change notification settings - Fork 2
Posterior Skymap Development #63
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make ang_err own function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the new code @Samhori ! A few suggestions to make parts a bit clearer + some formatting. Overall looks very good!
One comment I made a couple times but not everywhere is to add docstrings to each function for the documentation. Most of the info you already included, but please format so that they appear correctly in the documentation when it's generated
_float_index = not _fix_index | ||
_index = 2.5 | ||
_index = 2.5 | ||
_nside = 512 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a different nside than current. can you either make this a default in the posterior part of the code, or somehow else differentiate the nside you need? (giving it a new name also works)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be whatever we want (changed for testing, will change it back), but we should probably talk about what value we want to send out. Multiple neutrinos can give resolutions much better than the floor for a single neutrino
from . import sensitivity_utils | ||
from . import plotting_utils | ||
from .reports import FastResponseReport | ||
from .reports import FastResponseReport,FastResponsePosteriorReport |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a space after the comma
if livestream_start is None or livestream_stop is None: | ||
livestream_start = self.start - 6. | ||
livestream_stop = self.stop | ||
print("livestream",livestream_start, livestream_stop) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this for troubleshooting purposes? can probably put these in the if self._verbose
or remove (same on ln 205)
events = self.llh.exp | ||
events = events[(events['time'] < self.stop) & (events['time'] > self.start)] | ||
|
||
print(custom_events) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make this a bit clearer? I think it's a good idea to print any custom events injected, but can you give the user a message about what is being printed and the names (assuming this is the normal structured ndarray as events). something like
Custom events injected:
run, event, ra, dec
<array>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to move this somewhere else? It is in there for debugging for now, but I don't think this is the right place to print custom events if we want to keep that
|
||
print(custom_events) | ||
if(custom_events is not None): | ||
events=np.concatenate([events,custom_events]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you're passing these separately in each function, can you maybe plot them with a different linestyle to show they are injected? maybe dashed or something, to make it clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment in ln 619/637-638
|
||
self.PosteriorSkymap=outputProbHPMap | ||
self._make_posterior_fits() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra newlines
temporal_weights = self.llh.temporal_model.signal(self.llh._events) | ||
msk = spatial_weights * energy_ratio * temporal_weights > 10 | ||
self.coincident_events = [] | ||
if(custom_events!=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment above about distinguishing injected events also applies here
Phi[bins] = Phi[0] | ||
|
||
return Theta, Phi | ||
def plot_events2(dec,ra,sigmas, src_ra, src_dec, reso, sigma_scale=5., col = 'k', constant_sigma=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you choose a more descriptive name here? just so it's clear what the difference between this and just plot_events
is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think rather than adding these shell scripts, can you add the calls for two examples to the README at top level?
|
||
f = CascadeFollowup(name, args.skymap, start, stop, skipped=args.alert_id) | ||
t_mask=(f.llh.exp['time']<=f.stop)&(f.llh.exp['time']>=f.start) | ||
print("__________________________________",f.start,f.stop) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like you have several messages printing by default - can you make sure that it's clear what each is when printed for the user to understand?
Pull request for the development of the posterior skymap request. Currently, still some work to be done before we are ready to merge.