'''Use this script to go from the nominal low noise state to high bandwidth, high noise state
The idea is to increase the control bandwidth of the arm ASC and reduce the ETMY PUM drive from the LSC feedforward
This might help us survive some earthquakes. This will take us out of observing
Written by Elenna Capote and Jim Warner, based on the guardian code'''

import ezca as ez
import time

ezca=ez.Ezca()

ezca.get_LIGOFilter('ASC-CHARD_Y').ramp_gain(300, ramp_time=10, wait=False)
ezca.switch('ASC-CHARD_Y', 'FM3', 'FM8', 'FM9', 'OFF')

time.sleep(10)

ezca.switch('ASC-DHARD_Y', 'FM1', 'FM3', 'FM4', 'FM5', 'FM8', 'OFF')

time.sleep(10)

ezca.switch('ASC-CHARD_P', 'FM9', 'ON')
ezca.switch('ASC-CHARD_P', 'FM3', 'FM8', 'OFF')
ezca['ASC-CHARD_P_GAIN'] = 80

time.sleep(10)

ezca.get_LIGOFilter('ASC-DSOFT_Y').ramp_gain(30, ramp_time=5, wait=False)
ezca.get_LIGOFilter('ASC-DSOFT_P').ramp_gain(10, ramp_time=5, wait=False)

time.sleep(5)

ezca.switch('ASC-DHARD_P', 'FM4', 'FM8', 'OFF')

time.sleep(10)

ezca['LSC-PRCLFF_GAIN'] = 0

ezca['LSC-MICHFF_GAIN'] = 0

ezca['LSC-SRCLFF1_GAIN'] = 0