-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from lsst-uk/develop
Develop
- Loading branch information
Showing
81 changed files
with
540 additions
and
380 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,14 @@ Annotation means that external users push information to the Lasair database. | |
Therefore it requires that user to inform the Lasair team and be approved | ||
before it will work. The team will use the admin interface to create an `annotator` | ||
object in the database, which is a conneciton between the API token of that user | ||
with the name (`topic`) assigned to the annotator. Here we see that admin interface: | ||
with the name (`topic`) assigned to the annotator. | ||
|
||
In the first case, write to | ||
<a href="mailto:[email protected]?subject=New Annotator">Lasair Team</a> | ||
to propose your annotator. | ||
|
||
Here we see that admin interface that the Lasair team uses to make your annotator, | ||
if it is approved.: | ||
|
||
<img src="../_images/make_annotator/fastfinder.png" width="500px"/> | ||
|
||
|
@@ -17,25 +24,29 @@ goes wild, the annotator can be switched off by setting `active=0`. Finally, the | |
can be `public` or not, meaning that it is visible or not to others building Lasair filters. | ||
|
||
### Make the code | ||
The following code reads the stream from a Lasair filter, and for each objectId, | ||
The following code reads the stream from a Lasair filter, and for each `objectId`, | ||
it pulls the complete object information so it could analyse the lightcurve | ||
and other information before making a classification decision. | ||
This information is collected up as the annotation and sent back to Lasair, | ||
where it will be available for others to query. | ||
|
||
The settings file that is needed with the code looks like: | ||
* `TOPIC_IN`: The name of your streaming query as seen in the 'more info' button of your filter | ||
There should be a file `settings.py` file to accomany the code below with these variables defined:: | ||
|
||
* `TOPIC_IN`: The name of your streaming query as seen in the filter detail, where it says "The filter is streamed via kafka with the topic name" | ||
* `GROUP_ID`: Choose a new one evey run when testing; keep it constant for long-term running | ||
* `API_TOKEN`: As found in 'My Profile' top right of the web page | ||
* `TOPIC_OUT`: The name of your annotator as agreed with the Lasair team (above) | ||
|
||
If the code below is not clear, it would be good for you to read about how | ||
the (Lasair client)[rest-api.html] works. | ||
|
||
For more information about what is returned as `objectInfo`, a complete example | ||
is [shown here](ZTF23aabplmy.html). | ||
|
||
For testing purposes, the `GROUP_ID` will change frequently, and you get all of the alerts | ||
the come from the given stream. Then you will set up your annotator program to run continuously, | ||
perhaps in a `screen` session on a server machine, or started every hour by `cron`. | ||
In this case, the `GROUP_ID` will remain constant, so you won't het any alerts twice. | ||
In that case, the `GROUP_ID` will remain constant, so you won't get any alerts twice. | ||
|
||
A much simpler code is possible if for example the annotation is the classification | ||
results from another broker. In that case, only the call to `L.annotator()` is necessary. | ||
|
@@ -95,7 +106,7 @@ topic_out = settings.TOPIC_OUT | |
# just get a few to start | ||
max_alert = 5 | ||
n_annotate = 0 | ||
n_alert = n_annotate = 0 | ||
while n_alert < max_alert: | ||
msg = consumer.poll(timeout=20) | ||
if msg is None: | ||
|
@@ -105,7 +116,8 @@ while n_alert < max_alert: | |
break | ||
jsonmsg = json.loads(msg.value()) | ||
objectId = jsonmsg['objectId'] | ||
n_alert += 1 | ||
n_annotate += handle_object(objectId, L, topic_out) | ||
print('Annotated %d objects' % n_annotate) | ||
print('Annotated %d of %d objects' % (n_annotate, n_alert)) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,26 @@ | ||
# Sky Search | ||
|
||
## The Search Bar | ||
At the top of every Lasair page is a form that can be filled in to do various kinds of | ||
search. The following are supported: | ||
|
||
<img src="../_images/search/searchbar.png" height="400px"/> | ||
- Search by RA and Dec decimal degrees, delimited by space or comma: | ||
``` | ||
308.590715 9.278195 | ||
308.590715, 9.278195 | ||
``` | ||
|
||
At the top of every Lasair page is a form that can be filled in to do a search | ||
on the sky. You can enter several different kinds of search term, as illustrated | ||
in the screenshot above: | ||
- Search by RA and Dec sexagesimal coordinates, delimited by space or comma: | ||
``` | ||
20:34:21.7 09:16:41.5 | ||
20:34:21.7, 09:16:41.5 | ||
``` | ||
|
||
- A Lasair object name | ||
- Adding a search radius in arcseconds to any of the previous, for example: | ||
``` | ||
308.590715 9.278195 60 | ||
``` | ||
|
||
- The name of an entry in the | ||
<a href=https://www.wis-tns.org/>Transient Name Server (TNS)</a>, for example | ||
<a href=https://www.wis-tns.org/search?name=SN2022ffg>SN2022ffg</a> | ||
- Search by object identifier, for example ```ZTF23aacvrxx``` | ||
|
||
- The name of a host galaxy, that can be searched in the | ||
<a href=https://ned.ipac.caltech.edu/>NED database</a>, for example | ||
<a href=https://ned.ipac.caltech.edu/cgi-bin/objsearch?objname=CGCG093-074>CGCG093-074</a>. | ||
- Search by TNS identifier, for example ```AT2020iry``` or ```SN2020iry``` or ```2020iry```. | ||
|
||
- Right ascension and declination in J2000 frame: | ||
|
||
- As decimal degrees, for example 141.15725 25.39508, | ||
|
||
- As decimal degrees with a search radius in arcseconds, for example 141.15725 25.39508 10, | ||
|
||
- As sexagesimal, for example 10:13:48.2 18:07:38.3 | ||
|
||
- As sexagesimal with a search radius in arcseconds, for example 10:13:48.2 18:07:38.3 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ | |
|
||
</div> | ||
</div> | ||
<hr/> | ||
|
||
|
||
{% endblock content %} | ||
|
||
|
Oops, something went wrong.