-
Notifications
You must be signed in to change notification settings - Fork 0
/
collection.py
45 lines (34 loc) · 1.2 KB
/
collection.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""
configure for data collection in a console session
"""
from .session_logs import logger
logger.info(__file__)
# conda environment name
import os
_conda_prefix = os.environ.get("CONDA_PREFIX")
if _conda_prefix is not None:
logger.info("CONDA_PREFIX = %s", _conda_prefix)
del _conda_prefix
from . import mpl
logger.info("#### Bluesky Framework ####")
from .framework import *
logger.info("#### Devices ####")
from .devices import *
logger.info("#### Callbacks ####")
from .callbacks import *
logger.info("#### Plans ####")
from .plans import *
logger.info("#### Utilities ####")
from .utils import *
from apstools.utils import *
from ._iconfig import iconfig
if iconfig.get("WRITE_SPEC_DATA_FILES", False):
if specwriter is not None:
RE.subscribe(specwriter.receiver)
logger.info(f"writing to SPEC file: {specwriter.spec_filename}")
logger.info(" >>>> Using default SPEC file name <<<<")
logger.info(" file will be created when bluesky ends its next scan")
logger.info(" to change SPEC file, use command: newSpecFile('title')")
# last line: ensure we have the console's logger
from .session_logs import logger
logger.info("#### Startup is complete. ####")