Difference: Atf2LwDaqSoftware (1 vs. 2)

Revision 201 Dec 2011 - LaurieNevay

Line: 1 to 1
 
META TOPICPARENT name="Atf2Laserwire"

DAQ Software

Note, python indexes start at 0 and not 1.

Added:
>
>
All software is operated from extlw/run directory.

Data Structure

Data is recorded in ASCII text files with the extension '.dat'. Filenames are of the format YYYYMMDD_HHMM_suf.dat, where 'suf' is a suffix denoting the purpose of the data file.

Suffix
<-- -->
Sorted ascending
Purpose
log Data that is not specifically as a scan
lws Laser-wire scan of any kind
otr OTR data of any kind
 

Control

Revision 125 Nov 2010 - LaurieNevay

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="Atf2Laserwire"

DAQ Software

Note, python indexes start at 0 and not 1.

Control

ApdControl

FltControl

IpMoverControl

PhaseControl

TdxControl

Acquisition

IpMoverScan

File : IpMoverScan.py Class : IpMoverScan() Methods : scan(axis, npulse, start, stop, nstep)

axis = 'chaver' 'chahor' 'manver' 'manang' - use ' marks as well!

npulse = number of pulses to record at each position - should be >= 5. Will be corrected to five if less (to avoid mover issue)

start = start value

stop = stop value

nstep = number of steps to split range into

ie import IpMoverScan

a = IpMoverScan.IpMoverScan() a.scan('chaver',10,900,1000,50)

PhaseScan

lwLog

File : lwLog.py

Class : none

Methods :

Log(npulse)

lwAcq

File : lwAcq.py

Class : Acq()

Methods :

log(npulsemax)

reset()

callback(value)

Shell Scripts (for EDM integration)

All of which are used by the EDM using a 'shell command' button

ie ./BpmLog.py

All should be run from the extlw/run directory ie the edm should have been started from here.

ApdOpen / Close

File : ApdOpen.py, ApdClose.py

Description :

BpmLog

File : BpmLog.py

Description :

still to be finished.

FltMoveAbs

File : FltMoveAbs.py

Description :

Log

File : Log.py

Description :

gets number of pulses to log from extlw:edm:logn

creates instance of lwLog.Log and logs the appropriate number of pulses

Should be changed to use lwAcq!

ManAngMoveAbs

File : ManAngMoveAbs.py

Description :

Starts an instance of IpMoverControl.IpMoverControl('manang')

gets extlw:edm:manang

sets the absolute position

ManVerMoveAbs

File : ManVerMoveAbs.py

Description :

Starts an instance of IpMoverControl.IpMoverControl('manver')

gets extlw:edm:manver

sets the aboslute position

PhaseMoveAbs

File : PhaseMoveAbs.py

Description :

Starts an instance of PhaseControl.PhaseControl()

gets extlw:emd:phase

sets voltage

SavePos.py

File : SavePos.py

Description :

Records ip:cham:ver:pos, ip:cham:hor:pos, ip:man:ver:pos, ip:man:angl:pos, extlw:phasev

into a text file : '../dat/raw/poisitions_timestamp.dat

Scan

File : Scan.py

Description :

A lot of stuff happens

StopLaser

File : StopLaser.py

Description :

Puts extlw:laser:flt:cmdval 0.0015

Puts extlw:laser:flt:cmd moveabs

Pushes flash lamp delay up to 1.5ms which means it's only the absorbed RGA power (best we can do) which is <1mJ.

Data

lwData

File: lwData

Class : Data()

Methods : array() extend(lwData instance) read(filename) write(filename)

ie

import lwData

a = lwData.Data()

a.read('../dat/raw/lwLog_date.dat')

a.info

info printed out here

a.camac

camac variables (as described below) printed out as [[allvariablespulse1],[allvariablespulse2,...] so

a.camac[0] gives you all the camac data from the first pulse

a.camac[0,0] gives you extlw:cherenkov from the first pulse

a.camac[:,0] gives you extlw:cherenkov for EVERY pulse in the data

Example: (after loading data above)

xdata = a.ipmove[:,0]

ydata = a.camac[:,2]

plot(xdata,ydata)

This plots extlw:cherenkov (y) against ip:cham:ver:pos

Data structure is as follows:

.info description, npulse, start, stop,
.ipmove ip:man:ver:pos, ip:man:angl:pos, ip:cham:ver:pos, ip:cham:hor:pos
.opmove description
.camac extlw:cherenkov, extlw:TD2:1:read, extlw:TD2:2:read, extlw:TD4:1:read, extlw:TD2:3:read, extlw:phasev, extlw:cherenkov:cnorm
.cbpmamp REF1:amp
.cbpmx cbpm:xpos
.cbpmy cbpm:ypos
.atf extlw:atfcharge, extlw:wsdetector
.laser description
.ipmov ip:man:ver:pos, ip:man:angl:pos, ip:cham:hor:pos, ip:cham:ver:pos

Note, the order of what is stored in each part is described in lwAcq.py

!!! TODO - why are there 'ipmov' and 'ipmove' with cham:hor and ver swapped round? !!!

lwAnaData

Analysis

lwAna1

File : lwAna1.py

Class : AnalysisOnline(datafile)

Methods :

XYdata(xaxis,yaxis)

Avg(nparray,npulse)

Std(nparray,npulse)

AverageData(xdata,ydata)

BpmAverageData(xdata,ydata)

LowerErrorBarLimit(data,errdata,limit)

PlotArea(xdata,ydata)

PlotAreaAvg(xdata,ydata,xerrdata,yerrdata)

PlotFitLegLoc(area)

Fit(model,params)

PlotDataOnline(title)

PlotAvgDataOnline(title)

PlotFitDataOnline(title)

PlotBpmGlobal(title)

PlotBpmLocal(title)

AnaDataWrite()

Class : Scatter(xdata,ydata,title,xaxislabel,yaxislabel)

Methods:

PlotArea(xdata,ydata)

Plot(filename)

Class : ScatterErrorBar(avgxdata,avgydata,stdxdata,stdydata,title,xaxislabel,yaxislabel)

Methods :

PlotAreaAvg(xdata,ydata,xerrdata,yerrdata)

Plot(filename)

Class : ScatterErrorBarPlusFit(avgxdata,avgydata,stdxdata,stdydata,xdata,yfitdata,xaxislabel,yaxislabel)

Methods :

PlotAreaAvg(xdata,ydata,xerrdata,yerrdata)

Plot(filename)

CHANGES

If changes are made to the order of anything please note here along with date, so previous data files can be interpreted properly.

<--

Settings just to customise this page

  • Set STYLESIDEBAR = off
  • Set ALLOWTOPICVIEW = Public.TWikiGuest, Public.JohnAdamsInstituteGroup
  • Set MYTITLE = - ATF2 laser wire project - DAQ Software
-->
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback