Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/saving/bliss_esrf.py: 0%
17 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-14 02:13 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-14 02:13 +0000
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3import logging
4import os
6from daiquiri.core.saving.bliss_basic import Bliss_BasicSavingHandler
8logger = logging.getLogger(__name__)
11class Bliss_EsrfSavingHandler(Bliss_BasicSavingHandler):
12 def _set_filename(self, proposal=None, sample=None, dataset=None):
13 self.scan_saving.proposal_name = proposal
14 self.scan_saving.collection_name = sample
15 self.scan_saving.dataset_name = dataset
17 def _set_metadata(self, **metadata):
18 self.scan_saving.dataset.all.definition = metadata.get("dataset_definition")
19 self.scan_saving.dataset.all.Sample_notes = metadata.get("sample_notes")
20 self.scan_saving.dataset.sample_name = metadata.get("sample_name")
21 self.scan_saving.dataset.sample_description = metadata.get("sample_description")
23 @property
24 def proposal_root_path(self):
25 return os.path.join(
26 self.scan_saving.base_path,
27 self.scan_saving.template.format(
28 proposal_dirname=self.scan_saving.proposal,
29 beamline=self.scan_saving.beamline,
30 proposal_session_name=self.scan_saving.proposal_session_name,
31 collection_name="{sample}",
32 dataset_name="{dataset}",
33 ),
34 ).split("{")[0]