I would like to retrieve all the images taken by a given instrument through the Python API.
This (in principle) works, but is of course super inefficient:
with BlitzGateway("root", "XXX", host=host, port=port) as conn: conn.SERVICE_OPTS.setOmeroGroup("-1") all_images = [ im.getId() for im in conn.getObjects("Image") if im.getInstrument() == 10455 ]
Is there a way to perform a direct database query from BlitzGateway, as
SELECT Id FROM image WHERE instrument=10455;
retrieves the relevant data?
Thanks a lot!