# These CXI datasets were taken on id13 with a Siemens star target

# Note: many frames, and distorted probe - so this takes a while to converge !!!
# the data is from a test lens, defocused, hence the bizarre probe shape
# No need for modes, only a small portion of the beam is used.
# data was taken with 50ms/frame, so low intensity - hence maxsize=256


# 0) Set the GPU number in the PYNX_PU if not already done (replace '1' by your trainee number):
export PYNX_PU=.1

# 1) analyse it using:

pynx-cxipty.py cxifile=20161021id13-siemens2-s014.cxi probe=40e-6x40e-6,0.01 defocus=-100e-6 object=random,.9,1,-.2,.2 algorithm=analysis,ML**100,DM**200,probe=1 saveplot liveplot save=all maxsize=256

# 2) You can look at the results of the analysis using:

eog ResultsScan0014/*.png

or:
 silx view ResultsScan0014/latest.cxi
(with silx, use the 'image' viewer and see the amplitude, phase or mixed phase/amplitude view)

# 3) There is a distortion, so also optimise the positions:

pynx-cxipty.py cxifile=20161021id13-siemens2-s014.cxi probe=40e-6x40e-6,0.01 defocus=-100e-6 object=random,.9,1,-.2,.2 algorithm=analysis,ML**100,AP**100,positions=1,AP**100,DM**50,probe=1 saveplot liveplot save=all maxsize=256
