Data
From Siqi:
https://www.dropbox.com/s/8wrfbkpaosn23vq/labeledimg1.mat?dl=0
https://www.dropbox.com/s/uw9nx8mp8pqe94e/labeledimg2.mat?dl=0
In the data structure there is vccimg and yagimg which refer to the images on VCC and YAG screens. There is vccbox and yagbox which refer to the box coordinate where it finds the beam, [ystart yend xstart xend]. If it's empty it means it detects no signal. I corrected the mislabeled ones using the fitting method so they should all be labeled correctly now.
From David
I have downloaded the files, they are at (on the psana nodes) ~davidsch/mlearn/accyag/labeledimg*.mat
Access from Python
scipy can load mat files, here is some code that investigates a little:
In [3]: import scipy.io as sio In [4]: labeledimg1 = sio.loadmat('labeledimg1.mat') In [8]: vccImg = labeledimg1['vccImg'] In [18]: vccBox = labeledimg1['vccbox'] # you'll see vccImg and vccBox show up as 1 x 110 arrays of 'object', they are the images and labels for 110 samples # like Siqi says, a box entry is empty if no beam is present, here we get a count of the non empty boxes, or samples with beam In [23]: len([bx for bx in vccBox[0,:] if len(bx)>0]) Out[23]: 80 The first entry with a box is 4, so you can plot like In [24] %pylab In [26]: imshow(vccImg[0,4]) In [27]: bx = vccBox[0,4] In [31]: ymin,ymax,xmin,xmax=bx[0,:] In [32]: plot([xmin,xmin,xmax,xmax,xmin],[ymin,ymax,ymax,ymin,ymin], 'w')
In which case I see