roald87 / gracedb Goto Github PK
View Code? Open in Web Editor NEWTelegram bot which you can use to get information on gravitational wave events from LIGO/Virgo.
License: Apache License 2.0
Telegram bot which you can use to get information on gravitational wave events from LIGO/Virgo.
License: Apache License 2.0
Use VOEvent xml directly from gcn notice instead of refreshing grace database.
Then updating the events will go faster and it will probably close #7.
See for example event S200114f.
For example event S190727h was classified as a terrestrial event in the preliminary alert, but for the initial one it changed to a BBH.
LALInference is an improved estimation.
Currently only the details of the last measured event can be seen with /latest. Add command/interface to view all past events.
For example:
Seen by Livingston, Hanford and Virgo.
The duration on the status status page is not in 24 hour format, but hours keep on adding after 24.
For example for event S190728q a preliminary event was send 3 times, which lead to the user receiving three messages that a new event had been measured.
/status
command can easily be sped up by only retrieving the data from the source once, instead of once times for each detector.
Command /status
gives no reply when a detector status is in an state without a time.
File "/root/Projects/GraceDB/gracebot/detector.py", line 44, in __post_init__
self.duration = self._convert_to_time(duration)
File "/root/Projects/GraceDB/gracebot/detector.py", line 67, in _convert_to_time
hours, minutes = time_string.split(":")
For example for event S191213ai I didn't receive a new event message.
For example making it dark and adding constellations for reference like [here](http://gwcat.cardiffgravity.org/skymaps.
After event S190701AH was updated user got no message that the event was updated. Probably the origin why #1 stopped working.
Error message after update was requested:
2019-07-05 03:40:46 root INFO Refreshing event database.
Updating events: [ ] 0%2019-07-05 03:40:54 asyncio ERROR Task exception was never retrieved
future: <Task finished coro=<Events._periodic_event_updater() done, defined at /root/Projects/GraceDB/gracebot/gwevents.py:107> exception=<HTTPError 404: 'Not Found'>>
Traceback (most recent call last):
File "/root/Projects/GraceDB/gracebot/gwevents.py", line 118, in _periodic_event_updater
self.update_all_events()
File "/root/Projects/GraceDB/gracebot/gwevents.py", line 46, in update_all_events
self.update_single_event(_event["superevent_id"])
File "/root/Projects/GraceDB/gracebot/gwevents.py", line 72, in update_single_event
voevent.from_event_id(event_id)
File "/root/Projects/GraceDB/gracebot/voevent.py", line 107, in from_event_id
self._add_distance(self._data["skymap_fits"])
File "/root/Projects/GraceDB/gracebot/voevent.py", line 59, in _add_distance
with fits.open(url) as fit_data:
File "/root/venvs/gracedb/lib/python3.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 151, in fitsopen
lazy_load_hdus, **kwargs)
File "/root/venvs/gracedb/lib/python3.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 390, in fromfile
lazy_load_hdus=lazy_load_hdus, **kwargs)
File "/root/venvs/gracedb/lib/python3.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 1039, in _readfrom
fileobj = _File(fileobj, mode=mode, memmap=memmap, cache=cache)
File "/root/venvs/gracedb/lib/python3.7/site-packages/astropy/utils/decorators.py", line 521, in wrapper
return function(*args, **kwargs)
File "/root/venvs/gracedb/lib/python3.7/site-packages/astropy/io/fits/file.py", line 147, in __init__
self.name = download_file(fileobj, cache=cache)
File "/root/venvs/gracedb/lib/python3.7/site-packages/astropy/utils/data.py", line 1091, in download_file
raise e
File "/root/venvs/gracedb/lib/python3.7/site-packages/astropy/utils/data.py", line 1024, in download_file
with urllib.request.urlopen(remote_url, timeout=timeout) as remote:
File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.7/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
If two users try to select an event simultaneously it sometimes skip pages, because the self.start_at
parameter in GraceBot
class is not unique per user.
/root/venvs/gracedb/lib/python3.7/site-packages/aiogram/dispatcher/webhook.py:206: TimeoutWarning: Detected slow response into webhook. (Greater than 55 seconds)
Recommended to use 'async_task' decorator from Dispatcher for handler with long timeouts.
TimeoutWarning)
The following error showed when /stats
didn't work and /latest
didn't show the event type. I think it was after event S190701AH was updated.
2019-07-06 21:03:47 aiohttp.server ERROR Error handling request
Traceback (most recent call last):
File "/root/venvs/gracedb/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/root/venvs/gracedb/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/root/venvs/gracedb/lib/python3.7/site-packages/aiohttp/web_urldispatcher.py", line 890, in _iter
resp = await method()
File "/root/venvs/gracedb/lib/python3.7/site-packages/aiogram/dispatcher/webhook.py", line 137, in post
results = await self.process_update(update)
File "/root/venvs/gracedb/lib/python3.7/site-packages/aiogram/dispatcher/webhook.py", line 188, in process_update
return fut.result()
File "/root/venvs/gracedb/lib/python3.7/site-packages/aiogram/dispatcher/handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "/root/venvs/gracedb/lib/python3.7/site-packages/aiogram/dispatcher/dispatcher.py", line 162, in process_update
return await self.message_handlers.notify(update.message)
File "/root/venvs/gracedb/lib/python3.7/site-packages/aiogram/dispatcher/handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "gracebot/main.py", line 36, in send_o3_stats
await bot.send_o3_stats(message)
File "/root/Projects/GraceDB/gracebot/gracebot.py", line 167, in send_o3_stats
[info["most_likely"] for info in self.events.events.values()]
File "/root/Projects/GraceDB/gracebot/gracebot.py", line 167, in <listcomp>
[info["most_likely"] for info in self.events.events.values()]
KeyError: 'most_likely'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.