Commit cb0b29db authored by Lukas Platz's avatar Lukas Platz

rename parameters

parent cfa2f511
Pipeline #70375 passed with stages
in 15 minutes and 28 seconds
...@@ -58,9 +58,9 @@ if __name__ == '__main__': ...@@ -58,9 +58,9 @@ if __name__ == '__main__':
position_space = ift.RGSpace([128, 128]) position_space = ift.RGSpace([128, 128])
cfmaker = ift.CorrelatedFieldMaker.make( cfmaker = ift.CorrelatedFieldMaker.make(
offset_mean = 0., # 0. offset_mean = 0.0, # 0.
offset_variation_mean = 1e-3, # 1e-3 offset_std_mean = 1e-3, # 1e-3
offset_variation_stddev = 1e-6, # 1e-6 offset_std_std = 1e-6, # 1e-6
prefix = '') prefix = '')
fluctuations_dict = { fluctuations_dict = {
......
...@@ -364,16 +364,33 @@ class CorrelatedFieldMaker: ...@@ -364,16 +364,33 @@ class CorrelatedFieldMaker:
self._total_N = total_N self._total_N = total_N
@staticmethod @staticmethod
def make(offset_mean, offset_variation_mean, offset_variation_stddev, prefix, def make(offset_mean, offset_std_mean, offset_std_std, prefix,
total_N=0, total_N=0,
dofdex=None): dofdex=None):
"""Returns a CorrelatedFieldMaker object.
Parameters
----------
offset_mean : float
Mean offset from zero of the correlated field to be made.
offset_std_mean : float
Mean standard deviation of the offset value.
offset_std_std : float
Standard deviation of the stddev of the offset value.
prefix : string
Prefix to the names of the domains of the cf operator to be made.
total_N : integer
?
dofdex : np.array
?
"""
if dofdex is None: if dofdex is None:
dofdex = np.full(total_N, 0) dofdex = np.full(total_N, 0)
elif len(dofdex) != total_N: elif len(dofdex) != total_N:
raise ValueError("length of dofdex needs to match total_N") raise ValueError("length of dofdex needs to match total_N")
N = max(dofdex) + 1 if total_N > 0 else 0 N = max(dofdex) + 1 if total_N > 0 else 0
zm = _LognormalMomentMatching(offset_variation_mean, zm = _LognormalMomentMatching(offset_std_mean,
offset_variation_stddev, offset_std_std,
prefix + 'zeromode', prefix + 'zeromode',
N) N)
if total_N > 0: if total_N > 0:
......
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