-
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
Bright Objects plot #24
base: master
Are you sure you want to change the base?
Bright Objects plot #24
Conversation
Add sepList to get separation between GRB position and positions of catalog, saved in the report file
Renamed the previous method and changed code style
Method checks catalog of SGRs and calculates the separation to GRB position. Results are saved in _build_report.
Schönheitskorrektur
Implementing separation_values in report
Make separation tables shorter, only the three nearest
Function based on the existing location plot for a location plot of bright sources + SGRs
Fixes wrong location in plot and better visuals with markers
morgoth/utils/plot_utils.py
Outdated
if counter == 2: | ||
dec_sgr = value | ||
dec_center = dec_sgr * np.pi / 180 | ||
ax.scatter(ra_center, dec_center, label=name, s=30, color="darkorange", |
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.
write this as:
for m, (name, dictionary) in enumerate(SGRs.items()):
ra = np.deg2rad(dictionary["ra"])
dec = np.deg2rad(dictionary["dec"])
if ra>np.pi:
ra-=2*np.pi
ax.scatter(ra, dec, label=name, s=30, color="darkorange",marker=markers[m])
Same for the bright sources in line 440
"dec":round(table[i]['Coords Degs'].dec.degree,3), | ||
"separation":table[i]["Separation Degs"]} | ||
|
||
self._dic_SGRs = dic |
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.
change this to
dic = {}
for i in range(3):
dic[str(table[i]['Name'])]={"ra":float(round(table[i]['Coords Degs'].ra.degree,3)),
"dec":float(round(table[i]['Coords Degs'].dec.degree,3)),
"separation":float(table[i]["Separation Degs"])}
self._dic_SGRs = dic
Same for bright sources. Otherwise the numbers were saved as some strange type in the yaml and could not be read later. I changed this when we added the table on the website, but let's add it here to make it consistent.
Function based on the existing location plot for a location plot of bright sources + SGRs