Skip to content

quantumdetectors/python-xspress3-epics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-xspress3-epics

A couple of simple classes to aid acquisition and data processing for the Xspress 3 EPICS IOC

Documentation

https://quantumdetectors.github.io/python-xspress3-epics/

Acquiring

x3 = Xspress3('XSPRESS3-EXAMPLE')
x3.set(trigger_mode='Internal', num_images=10, exposure_time=0.5)
x3.acquire()

while x3.acquiring():
    print 'Acquiring ... {num}/{tot}'.format(num=x3.num_acquired(), tot=x3.get('num_images'))
    time.sleep(1)
    

Reading hdf5

with HDF5(file) as h5:
    size = h5.size()
    print 'File Dimensions:', size

    for f in range(size['frames']):
        print 'Frame {f}'.format(f=f)

        for c in range(size['channels']):
            print 'Ch {c}: Time {t} Events {e}'.format(c=c, t=h5.sca(c,f,0), e=h5.sca(c,f,3))
            print '   MCA Counts {cts}'.format(cts=sum(h5.mca(c,f)))

Releases

No releases published

Packages

No packages published

Languages