Skip to content
Snippets Groups Projects
Commit 274cd0a1 authored by Simone Vadilonga's avatar Simone Vadilonga
Browse files

use file_exporter instead of csv_exporter

parent de176148
No related branches found
No related tags found
No related merge requests found
from .base import *
from datetime import datetime
from beamlinetools.callbacks.mca_callback import McaCallback
from beamlinetools.callbacks.file_exporter import CSVCallback, SpecWriterCallback
from apstools.callbacks import NXWriter
import pathlib
import os
# Nexus Callback
# h5_file = pathlib.Path("/opt/bluesky/data")
RE.subscribe(McaCallback())
\ No newline at end of file
# nxwriter = NXWriter()
# RE.subscribe(nxwriter.receiver)
# nxwriter.file_name = str(h5_file)
# nxwriter.warn_on_missing_content = False
# SPEC callback
year = str(datetime.now().year)
specwriter = SpecWriterCallback(filename="/opt/bluesky/data/beamline"+year+".spec")
RE.subscribe(specwriter.receiver)
# data manager, export scans to single csv file
dm = CSVCallback(file_path="/opt/bluesky/data")
dm.change_user("beamline_commissioning_"+year)
changeuser=dm.change_user
RE.subscribe(dm.receiver)
# MCA Callback
RE.subscribe(McaCallback())
from .mca_callback import *
from .csv_exporter import *
\ No newline at end of file
from .file_exporter import *
\ No newline at end of file
......@@ -22,15 +22,6 @@ class CSVCallback(FileWriterCallbackBase):
file_path (str): File path for CSV files.
logger(logging instance): If not None, exceptions are logged here
"""
^Z
Out[25]: ('b5db0f52-9228-463d-821a-e39c929d9f70',)
In [26]:
def __init__(self, _receivers=[], file_path=None, logger=None):
"""
Initialize the CSVCallback.
......@@ -161,4 +152,3 @@ In [26]:
else:
print(f"Folder '{user_path}' already exists.")
self.file_path = user_path
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment