def NutatorsZeros_In(start=45, stop=135, step=5, t=2): adet = session.getDevice('adet') lam = session.getDevice('wavelength')() Cryopad = session.getDevice('Cryopad') maw('pc2', 0, 'pc1', 180.0 / (Cryopad.coefficients[0] * lam), 'Fout', 'off') nsteps = int((stop - start) / step) scan(['nutator1', 'nutator2'], [start, start - 90], [step, step], nsteps, adet, t=t) fit(ZerosFit, 'Asym')
def amplscan(dev1, start1, step1, numpoints1, dev2, start2, step2, numpoints2, t): scandet = session.getDevice('scandet') scandet.scandev = str(dev2) scandet.positions = [start2 + i * step2 for i in range(numpoints2)] dev1pos = [[start1 + i * step1] for i in range(numpoints1)] ds = Scan([session.getDevice(dev1)], dev1pos, None, detlist=[scandet], preset={ 't': t }).run() fit(CosineFit, 'A', dataset=ds)
def NutatorPerpendicularity(start=45, stop=135, step=5, t=2): adet = session.getDevice('adet') maw('nutator2', 0, 'nutator1', start, 'Fout', 'off', 'pc1', 0, 'pc2', 0) nsteps = int((stop - start) / step) scan('nutator1', start, step, nsteps, adet, t=t) fit(PerpFit, 'Asym')
def PC2Current(start=-4, stop=4, step=0.25, t=2): adet = session.getDevice('adet') maw('nutator2', 0, 'nutator1', 0, 'Fout', 'off', 'pc1', 0) nsteps = int((stop - start) / step) scan('pc2', start, step, nsteps, adet, t=t) fit(PCurrentFit, 'Asym')
def sinfit(xcol='ctr1', *args): return fit(CosineFit, xcol, *args)