コード例 #1
0
def library(diffraction_pattern):
    dp = diffraction_pattern.mean((0, 1))
    im = Signal2D(np.ones((10, 10)))
    cdl = CalibrationDataLibrary(
        au_x_grating_dp=dp, au_x_grating_im=im, moo3_dp=dp, moo3_im=im
    )
    return cdl
コード例 #2
0
def calibration_library(request, ring_pattern):
    #  Create a dummy X-grating image
    data = np.zeros((200, 200))
    data[:, 10:20] = 100
    data[:, 30:40] = 50
    data[:, 150:160] = 50
    data[:, 170:180] = 100
    im = Signal2D(data)
    return CalibrationDataLibrary(au_x_grating_dp=ring_pattern,
                                  au_x_grating_im=im)
コード例 #3
0
def empty_calibration_library(request):
    return CalibrationDataLibrary()