Modify investigation selection
from pprint import pprint
import datetime
from pyicat_plus.client.bliss import get_icat_client
client = get_icat_client(timeout=100)
session = "20231128"
date = session_startdate_fromdir = datetime.datetime.combine(
datetime.datetime.strptime(session, "%Y%m%d").date(),
datetime.time(hour=8), # sessions start at 8 a.m.
).astimezone()
investigation = client.investigation_info(
beamline="id27", proposal="ihhc3952", date=date
)
pprint(investigation)
{'beamline': 'ID27',
'data portal': 'https://data.esrf.fr/investigation/1397396079/datasets',
'e-logbook': 'https://data.esrf.fr/investigation/1397396079/events',
'endDate': '2023-11-30T08:00:00.000+01:00',
'id': 1397396079,
'investigationUsers': [],
'meta': {'page': {'currentPage': 1,
'total': 2,
'totalPages': 1,
'totalWithoutFilters': 2}},
'proposal': 'IH-HC-3952',
'releaseDate': '2026-11-30T08:00:00.000+01:00',
'startDate': '2023-11-28T08:00:00.000+01:00',
'summary': 'Within this proposal we investigate the evolution of charge order '
'in LaRu3Si2 with pressure and temperature by means of single '
'crystal x-ray diffraction and diffuse scattering.',
'title': 'Charge order in LaRu3Si2 at high pressures and low temperatures',
'type': {'createId': 'root',
'createTime': '2014-06-18T15:00:43.523+02:00',
'description': 'In-house Hard Condensed Matter Science',
'id': 327,
'investigations': [],
'modId': 'root',
'modTime': '2014-06-18T15:00:43.523+02:00',
'name': 'IH-HC'}}
However it select dataset 1397396079 instead of dataset 1402335301 (https://data.esrf.fr/beamline/id27?page=1&search=IH-HC-3952). Dataset 1402335301 is the correct one and has been selected by Bliss.
Edited by Wout De Nolf