Closed prjemian closed 1 year ago
It is not possible to filter on the Status at this time. That information comes from the stop
document and the current search tools available don't search that document at this time. This highly-requested feature might come by the end of 2023Q4. Maybe.
We should disable that item in the UI file, for now.
For the Motor filter, they are named in a list, so we should allow the user to specify more than one motor name. For example: m1 m2
would search for runs where both m1
and m2
appear in the list of motors for that run.
The Scan Id is an integer. We need to make sure that we convert the string to an int
when searching.
To use the DateTimeSlider to select a range of dates, we need to configure that with the information from the catalog. We can add that configuration in this method after these lines: https://github.com/BCDA-APS/tiled-viz2023/blob/7285cc3731f0a89126082e2637d1dca2754d7212/gemviz23/demo/filterpanel.py#L42-L44
On these lines we get the full catalog from the server: https://github.com/BCDA-APS/tiled-viz2023/blob/7285cc3731f0a89126082e2637d1dca2754d7212/gemviz23/demo/resultwindow.py#L232-L233
The view should not do this. Instead, we should ask the filterpanel for the filtered catalog at this point. The filterpanel needs a new method for this.
We should add explanatory tooltips to each of the widgets
With tiled, a search of a catalog results in a new catalog.
cat = cat.search(query)
Date & time values come from the DateTimeRangeSlider widget:
since = self.date_time_widget.low()
until = self.date_time_widget.high()
# cat = utils.get_tiled_runs(cat, since=since, until=until)
Motor search was not quite right. With more than one motor to search, we searched for runs that had the first name (and only the first name), then runs that had only the second name. That would always be an empty list. There is a different tiled search to get that.
tiled.queries.Contains("motors", motor)
For Contains()
query, see https://blueskyproject.io/tiled/reference/queries.html
Tiled lets us quickly and efficiently get the first and last runs in a catalog:
cat.keys().first()
cat.keys().last()
Each of those returns a uid
for the particular run. To get the start time (which is a Python timestamp):
run = cat[uid]
start_time = run.metadata["start"]["time"]
the widget controls to set:
self.date_time_widget.setMinimum(t_lo)
self.date_time_widget.setLow(t_lo)
self.date_time_widget.setHigh(t_hi)
self.date_time_widget.setMaximum(t_hi)
The present code uses the complete catalog from the server. Instead, return a catalog with the filter terms applied.
filterpanel.py
module)