spc-group / haven

Bluesky tools for beamlines managed by the spectroscopy group
https://haven-spc.readthedocs.io/en/latest/
Other
2 stars 6 forks source link

Add user meta-data to bluesky start documents #50

Closed canismarko closed 1 year ago

canismarko commented 1 year ago

Meta-data taken from USAXS example: http://terrier:8000/ui/browse/20idb_usaxs/600852ca-3776-4e7a-ba29-f11786371e55

start:
  uid: 600852ca-3776-4e7a-ba29-f11786371e55
  time: 1667935604.6147602
  EPICS_HOST_ARCH: linux-x86_64
  beamline_id: APS 9-ID-C USAXS
  epics_libca: >-
    /home/beams11/USAXS/micromamba/envs/bluesky_2022_3/lib/python3.10/site-packages/epics/clibs/linux64/libca.so
  EPICS_CA_MAX_ARRAY_BYTES: '1280000'
  login_id: usaxs@usaxscontrol.xray.aps.anl.gov
  pid: 1639175
  scan_id: 92
  proposal_id: ''
  versions:
    apstools: 1.6.8
    area_detector_handlers: 0.0.10
    bluesky: 1.10.0
    databroker: 1.2.5
    epics_ca: 3.5.0
    epics: 3.5.0
    h5py: 3.7.0
    matplotlib: 3.6.1
    numpy: 1.23.3
    ophyd: 1.7.0
    pymongo: 4.2.0
    pyRestTable: 2020.0.6
    spec2nexus: 2021.2.4
  plan_type: generator
  plan_name: WAXS
  detectors:
    - waxs_det
  num_points: 1
  num_intervals: 0
  plan_args:
    detectors:
      - >-
        MyPilatusDetector(prefix='usaxs_pilatus2:', name='waxs_det',
        read_attrs=['hdf1'], configuration_attrs=['cam', 'cam.acquire_period',
        'cam.acquire_time', 'cam.image_mode', 'cam.manufacturer', 'cam.model',
        'cam.num_exposures', 'cam.num_images', 'cam.trigger_mode', 'hdf1'])
    num: 1
  hints:
    dimensions:
      - - - time
        - primary
  full_filename: /share1/USAXS_data/2022-11/usaxs.mac
  filename: usaxs.mac
  line_number: 38
  action: waxsExp
  parameters:
    - '40'
    - '120'
    - '3.77'
    - Frye_VAC_Perp
  iso8601: '2022-11-08 13:26:41.101412'
  purpose: tuner
  datetime: '2022-11-08 12:48:48.735664'
  sx: 40
  sy: 120
  thickness: 3.77
  title: Frye_VAC_Perp
  bss_aps_cycle: ''
  bss_beamline_name: ''
  esaf_id: ''
  esaf_title: ''
  mail_in_flag: 'OFF'
  principal_user: no users listed
  proposal_title: ''
  proprietary_flag: 'OFF'
  sample_thickness_mm: 3.77
  hdf5_path: /share1/USAXS_data/2022-11/11_08_Frye/11_08_Frye_waxs
  hdf5_file: Frye_VAC_Perp_0009.hdf
  sample_image_name: /share1/USAXS_data/2022-11/11_08_Frye/11_08_Frye_waxs/Frye_VAC_Perp_0009.jpg
  method: areaDetectorAcquire
  area_detector_name: waxs_det
stop:
  run_start: 600852ca-3776-4e7a-ba29-f11786371e55
  time: 1667935625.8599243
  uid: 1bfd2bbe-b1df-4d55-9935-025544d965a4
  exit_status: success
  reason: ''
  num_events:
    baseline: 2
    primary: 1
summary:
  uid: 600852ca-3776-4e7a-ba29-f11786371e55
  scan_id: 92
  timestamp: 1667935604.6147602
  datetime: '2022-11-08T13:26:44.614760'
  plan_name: WAXS
  stream_names:
    - aps_current_monitor
    - baseline
    - primary
  duration: 21.245164155960083
canismarko commented 1 year ago

Fixed: 7b2eba1e8d0a1b1fd1b1ae017aae2e9889f1c533