<commit_before># vim: sw=4 ts=4 sts expandtab smarttab
# HXN fly-scan configuration

from hxnfly.bs import (FlyScan1D, FlyScan2D)
# from hxnfly.callbacks import FlyLivePlot
from hxnfly.callbacks import (FlyRoiPlot, FlyLiveImage)
from hxnfly.callbacks import FlyLiveCrossSection

# def _sum_func(*values):
#     return np.sum(values, axis=1)
#
# A live plot using scaler 1's first three MCA channels and sums them
# together:
# flyplot = FlyLivePlot(sclr1_mca[:3], data_func=_sum_func,
#                       labels=['test'])
#
# A 1D ROI plot of aluminum from channels 1 to 3:
# flyplot = FlyRoiPlot('Al', channels=[1, 2, 3])
# (optionally sum them together with use_sum=True or adding a function to
#  calculate with data_func=sum_func)
#
flyplot = FlyRoiPlot(['Fe'], channels=[1, 2, 3], use_sum=True)
fly2dplot = FlyLiveImage(['Fe','Gd','Ce','Co'], channels=[1, 2, 3], use_sum=True)
fly2dplot1 = FlyLiveCrossSection(['Fe'], channels=[1, 2, 3], use_sum=True)

fly1d = FlyScan1D([flyplot],
                  detectors=[xspress3, merlin1],
                  scaler_channels=[2, 3, 4])

fly2d = FlyScan2D([fly2dplot, fly2dplot1],
                  detectors=[xspress3, merlin1],
                  scaler_channels=[2, 3, 4])<commit_msg>Flyscan plotting modifications<commit_after># vim: sw=4 ts=4 sts expandtab smarttab
# HXN fly-scan configuration
from hxnfly.bs import (FlyScan1D, FlyScan2D)
# from hxnfly.callbacks import FlyLivePlot
from hxnfly.callbacks import (FlyRoiPlot, FlyLiveImage)
from hxnfly.callbacks import FlyLiveCrossSection

# def _sum_func(*values):
#     return np.sum(values, axis=1)
#
# A live plot using scaler 1's first three MCA channels and sums them
# together:
# flyplot = FlyLivePlot(sclr1_mca[:3], data_func=_sum_func,
#                       labels=['test'])
#
# A 1D ROI plot of aluminum from channels 1 to 3:
# flyplot = FlyRoiPlot('Al', channels=[1, 2, 3])
# (optionally sum them together with use_sum=True or adding a function to
#  calculate with data_func=sum_func)
#
flyplot = FlyRoiPlot(['Pt'], channels=[1, 2, 3], use_sum=True)
fly2dplot = FlyLiveImage(['V','P','Ag','Pt','Si'], channels=[1, 2, 3], use_sum=True)
fly2dplot1 = FlyLiveCrossSection(['V'], channels=[1, 2, 3], use_sum=True)

fly1d = FlyScan1D([flyplot],
                  detectors=[xspress3, merlin1],
                  scaler_channels=[2, 3, 4])

fly2d = FlyScan2D([fly2dplot],
                  detectors=[xspress3, merlin1],
                  scaler_channels=[2, 3, 4])
{'fraction_non_alphanumeric': 0.13096200485044462, 'fraction_numerical': 0.03395311236863379, 'mean_word_length': 4.061349693251533, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1353968', 'n_tokens_mistral': 931, 'n_tokens_neox': 865, 'n_words': 228}