pyicat_plus.client.investigation.IcatInvestigationClient#

class pyicat_plus.client.investigation.IcatInvestigationClient(url, api_key=None, timeout=None)[source]#

Bases: object

Client for the investigation part of the ICAT+ REST API.

An “investigation” is a time slot assigned to a particular proposal at a particular beamline.

REST API docs: https://icatplus.esrf.fr/api-docs/

The ICAT+ server project: https://gitlab.esrf.fr/icat/icat-plus/-/blob/master/README.md

Parameters:
  • url (str)

  • api_key (Optional[str])

  • timeout (Optional[float])

DEFAULT_SCHEME = 'https'#
investigation_info(beamline, proposal, date=None, allow_open_ended=True, timeout=None)[source]#

An investigation is defined by a time slot. Find an investigation (if any) for a beamline, proposal and date (“now” when not provided). When there is more than one investigation, select the closest one started before or at the date. If there is no such investigation, get the closest investigation which starts after the date.

Parameters:
  • beamline (str)

  • proposal (str)

  • date (Union[datetime, date, None])

  • allow_open_ended (bool)

  • timeout (Optional[float])

Return type:

Optional[dict]

registered_dataset_ids(beamline, proposal, date=None, allow_open_ended=True, timeout=None)[source]#
Parameters:
  • beamline (str)

  • proposal (str)

  • date (Union[datetime, date, None])

  • allow_open_ended (bool)

  • timeout (Optional[float])

Return type:

Optional[List[DatasetId]]

registered_datasets(beamline, proposal, date=None, allow_open_ended=True, timeout=None)[source]#
Parameters:
  • beamline (str)

  • proposal (str)

  • date (Union[datetime, date, None])

  • allow_open_ended (bool)

  • timeout (Optional[float])

Return type:

Optional[List[Dataset]]

property timeout#