<commit_before>from bluesky.examples import Mover, SynGauss, Syn2DGauss
import bluesky.simple_scans as bss
import bluesky.spec_api as bsa
import bluesky.callbacks
from bluesky.standard_config import gs
import bluesky.qt_kicker

# motors
theta = Mover('theta', ['theta'])
gamma = Mover('gamma', ['gamma'])

# synthetic detectors coupled to one motor
theta_det = SynGauss('theta_det', theta, 'theta', center=0, Imax=1, sigma=1)
gamma_det = SynGauss('gamma_det', gamma, 'gamma', center=0, Imax=1, sigma=1)

# synthetic detector coupled to two detectors
tgd = Syn2DGauss('theta_gamma_det', theta, 'theta', gamma, 'gamma',
                 center=(0, 0), Imax=1)

# set up the default detectors
gs.DETS = [theta_det, gamma_det, tgd]

ysteps = 25
xsteps = 20

# hook up the live raster callback
#cb = bluesky.callbacks.LiveRaster((ysteps + 1, xsteps + 1),
#                                  'theta_gamma_det', clim=[0, 1])
mesha = bss.OuterProductAbsScanPlan()
# run a mesh scan
gs.MASTER_DET_FIELD = 'theta_gamma_det'
bsa.mesh(theta, -2.5, 2.5, ysteps, gamma, -2, 2, xsteps, False)<commit_msg>DOC: update example<commit_after>from bluesky.examples import Mover, SynGauss, Syn2DGauss
import bluesky.plans as bp
import bluesky.spec_api as bsa
import bluesky.callbacks
from bluesky.standard_config import gs
import bluesky.qt_kicker
bluesky.qt_kicker.install_qt_kicker()

# motors
theta = Mover('theta', ['theta'])
gamma = Mover('gamma', ['gamma'])

# synthetic detectors coupled to one motor
theta_det = SynGauss('theta_det', theta, 'theta', center=0, Imax=1, sigma=1)
gamma_det = SynGauss('gamma_det', gamma, 'gamma', center=0, Imax=1, sigma=1)

# synthetic detector coupled to two detectors
tgd = Syn2DGauss('theta_gamma_det', theta, 'theta', gamma, 'gamma',
                 center=(0, 0), Imax=1)

# set up the default detectors
gs.DETS = [theta_det, gamma_det, tgd]

ysteps = 25
xsteps = 20

# hook up the live raster callback
cb = bluesky.callbacks.LiveRaster((ysteps, xsteps),
                                  'theta_gamma_det', clim=[0, 1])
lt = bluesky.callbacks.LiveTable([theta, gamma, tgd])
gs.MASTER_DET_FIELD = 'theta_gamma_det'
mesha = bp.OuterProductAbsScanPlan(gs.DETS,
                                   theta, -2.5, 2.5, ysteps,
                                   gamma, -2, 2, xsteps, True)
gs.RE(mesha, [cb, lt])
{'fraction_non_alphanumeric': 0.12505371723248818, 'fraction_numerical': 0.020627417275461968, 'mean_word_length': 3.8907563025210083, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7425143', 'n_tokens_mistral': 854, 'n_tokens_neox': 792, 'n_words': 219}