-
Notifications
You must be signed in to change notification settings - Fork 5
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
SWIFT_BAT_GRB_POS_ACK conversion #36
base: main
Are you sure you want to change the base?
Conversation
Explicit int conversion removed MAXI_UNKNOWN conversion Removed GECAM_FLT and GECAM_GND conversion Added documentation and changed function name reformatted file deleted files
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.
Please remove the xfail mark for the unit test.
@parsotat, would you please review this? |
…sary equalities changed Unused to intentionally omitted reformated comments
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.
Did @parsotat ever take a look at this?
comments = "\n".join( | ||
[val for (key, val) in flag_descriptions.items() if (soln_status_bits[key])] | ||
) |
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.
Please capture these flags in a machine-readable way, not as comments.
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 use additional_info to capture the data stored in the COMMENTS:
fields in the text notices. Some of these are redundant with the data in the notices and can be removed(I've mainly added them for completeness). However, some of the these comments I think may be too complex to easily translate into a field like "StarTracker not locked so trigger probably bogus" or "This was orginally a SubTresh, but it is now converted to a real BAT_POS.".
f#inished comments
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 ran a spell checker and noticed some typos
"image_peak": bin[10], | ||
"background_events": bin[22], | ||
"background_start_time": utils.datetime_to_iso8601(bin[5], bin[23]), | ||
"backgroun_duration": bin[24] * 1e-2, |
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.
typo: should be "background_duration"
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.
Hey @bob-wiegand! Could you link the package that you used for spell-checking? I think it would be easier for me to run this on my end and correct it for each notice type instead of you having to manually list each error. Thanks!
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.
Note: I am not sure it would be simpler since it was still somewhat manual.
I ran https://github.com/crate-ci/typos
$ typos --words
on the files to find the words then
$ hunspell -d en_US
to check them. hunspell will build up a dictionary of excusable terms for gcn-*.
The silliest aspect is that I was unable to find a way to get typos to exclude times (e.g., 1987-01-02T03:04:05.6); although extend-ignore-re will exclude the times from the misspelling list, I could not figure out how to get it to exclude them from the word/identifier list.
"image_peak": bin[10], | ||
"background_events": bin[22], | ||
"background_start_time": utils.datetime_to_iso8601(bin[5], bin[23]), | ||
"backgroun_duration": bin[24] * 1e-2, |
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.
typo: background_duration again
"image_peak": bin[10], | ||
"background_events": bin[22], | ||
"background_start_time": utils.datetime_to_iso8601(bin[5], bin[23]), | ||
"backgroun_duration": bin[24] * 1e-2, |
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.
typo: background_duration again
else: | ||
grb_status = "It is not a GRB" | ||
|
||
calalog_num = bin[25] |
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.
It does not affect the output, but suggest renaming variable: s/calalog/catalog/
else: | ||
grb_status = "It is not a GRB" | ||
|
||
calalog_num = bin[25] |
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.
typo on catalog
"flaring_known_source": bool(soln_status_bits[2]), | ||
"star_tracker_status": start_tracker_status[soln_status_bits[10]], | ||
"bright_star_nearby": bool(soln_status_bits[13]), | ||
"originally_subtresh": bool(soln_status_bits[14]), |
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.
update subtresh to subthresh.
Would "was_subthreshold" be a better name?
All SWIFT_BAT_* notices have a very similar similar conversion with just a few differing/missing fields. So if the format is acceptable I could commit the rest of the conversions to this pull request as well.
The following keywords do not exist in the core schema for SWIFT_BAT_GRB_POS_ACK: