There is a maintenance of MPCDF Gitlab on Thursday, April 22st 2020, 9:00 am CEST - Expect some service interruptions during this time

Commit eff68e75 authored by Gordian Edenhofer's avatar Gordian Edenhofer

correlated_fields.py: Improve readability

parent add965b9
Pipeline #92298 passed with stages
in 11 minutes and 6 seconds
......@@ -297,18 +297,15 @@ class _Amplitude(Operator):
vol0, vol1 = [np.zeros(target[space].shape) for _ in range(2)]
vol1[1:] = vol0[0] = totvol
vol0, vol1 = [
DiagonalOperator(makeField(target[space], aa), target, space)
for aa in (vol0, vol1)
]
vol0 = DiagonalOperator(makeField(target[space], vol0), target, space)
vol0 = vol0(full(vol0.domain, 1))
vol1 = DiagonalOperator(makeField(target[space], vol1), target, space)
# End prepare constant fields
slope = vslope @ ps_expander @ loglogavgslope
sig_flex = vflex @ expander @ flexibility if flexibility is not None else None
sig_asp = vasp @ expander @ asperity if asperity is not None else None
sig_fluc = vol1 @ ps_expander @ fluctuations
sig_fluc = vol1 @ ps_expander @ fluctuations
if sig_asp is None and sig_flex is None:
op = _Normalization(target, space) @ slope
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment