Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_renormalize(self,
diffraction_pattern,
dqe):
difvar = DiffractionVariance(diffraction_pattern)
difvar.renormalize(dqe)
assert isinstance(difvar,DiffractionVariance)
def diffraction_variance(diffraction_pattern):
return DiffractionVariance(diffraction_pattern)
def test_get_diffraction_variance_signal(self,
diffraction_pattern):
difvar = DiffractionVariance(diffraction_pattern)
assert isinstance(difvar,DiffractionVariance)
def test_renormalize(self,
diffraction_pattern,
dqe):
difvar = DiffractionVariance(diffraction_pattern)
difvar.renormalize(dqe)
assert isinstance(difvar,DiffractionVariance)
def test_get_diffraction_variance(
self,
variance_generator: VarianceGenerator,
dqe
):
vardps = variance_generator.get_diffraction_variance(dqe)
assert isinstance(vardps, DiffractionVariance)
mean_dp = np.array(
[[0., 0., 0., 0., 0., 0., 0., 0.5],
[0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0.5, 0., 0., 0., 0.],
[0., 0., 0.5, 1., 1.25, 0., 0., 0.],
[0., 0., 0., 1.25, 1., 0.75, 0., 0.],
[0., 0., 0., 0., 0.75, 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0.]]).reshape(8,8)
meansq_dp = np.array(
[[0., 0., 0., 0., 0., 0., 0., 1.],
[0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0.5, 0., 0., 0., 0.],
[0., 0., 0.5, 2., 1.75, 0., 0., 0.],
[0., 0., 0., 1.75, 2., 1.25, 0., 0.],