The bokeh column datasource has the filter_name attribute and the simplest approach would be to distinguish the data points based on that, something like:
|
self.plot.circle(x='time', y='value', color='color', legend='filter_name', source=self.cds, fill_color='white', size=12)
|
|
One issue is that the interactive legend does not work as expected with bokeh 0.12.15
https://bokeh.pydata.org/en/latest/docs/user_guide/interaction/legends.html
I decided to leave it like this and wait for the bokeh fix. My expectation is that the interactive legend will let us to select a particular filter and bokeh will set appropriate ranges for the x and y axis.
The second issue is that the line glyph will not connect the circle glyphs as expected when working with a single column datasource (the line glyph will connect the circle glyphs in the sequence the data is stored)
One solution for that is to use column datasource views and group the data by filter_name then, in principle, we could connect the circle glyphs with a different line for each filter.
https://bokeh.pydata.org/en/latest/docs/user_guide/data.html#groupfilter
lsst.verify adds filter_name into the job metadata, this information goes to the job.meta field in the SQuaSH DB which is JSON datatype.
For the verification jobs prior to lsst.verify we have to add the filter_name key in this field by hand.
Here are the queries used. For the validation_data_cfht:
MySQL [squash]> UPDATE job SET meta=JSON_SET(meta, "$.filter_name", "r") WHERE job.ci_dataset='validation_data_cfht';
and for the validation_data_hsc. Note the constraint on job.id making sure we don't overwrite the recent jobs where the filter_name is set by lsst.verify:
MySQL [squash]> UPDATE job SET meta=JSON_SET(meta, "$.filter_name", "HSC-I") WHERE job.ci_dataset='validation_data_hsc' AND job.id < '1240';