def dy_pretune_hook():
    stage = d_stage.y
    logger.info(f"Tuning axis {stage.name}, current position is {stage.position}")
    yield from bps.mv(scaler0.preset_time, 0.1)
    y_name = UPD_SIGNAL.chname.get()
    scaler0.select_channels([y_name])
    scaler0.channels.chan01.kind = Kind.config
    trim_plot_by_name(n=5)
def m2rp_pretune_hook():
    stage = m_stage.r2p
    logger.info(f"Tuning axis {stage.name}, current position is {stage.position}")
    yield from bps.mv(scaler0.preset_time, 0.1)
    yield from bps.mv(scaler0.delay, 0.02)
    y_name = TUNING_DET_SIGNAL.chname.get()
    scaler0.select_channels([y_name])
    scaler0.channels.chan01.kind = Kind.config
    trim_plot_by_name(n=5)