Skip to content
Snippets Groups Projects
Commit 8466e7fc authored by Martin Reinecke's avatar Martin Reinecke
Browse files

cosmetics

parent e69914c0
No related branches found
No related tags found
No related merge requests found
...@@ -22,9 +22,8 @@ if __name__ == '__main__': ...@@ -22,9 +22,8 @@ if __name__ == '__main__':
ht = ift.HarmonicTransformOperator(harmonic_space, position_space) ht = ift.HarmonicTransformOperator(harmonic_space, position_space)
power_space = A.value.domain[0] power_space = A.value.domain[0]
power_distributor = ift.PowerDistributor(harmonic_space, power_space) power_distributor = ift.PowerDistributor(harmonic_space, power_space)
position = {} position = ift.MultiField.from_dict(
position['xi'] = ift.Field.from_random('normal', harmonic_space) {'xi': ift.Field.from_random('normal', harmonic_space)})
position = ift.MultiField.from_dict(position)
xi = ift.Variable(position)['xi'] xi = ift.Variable(position)['xi']
Amp = power_distributor(A) Amp = power_distributor(A)
...@@ -35,6 +34,7 @@ if __name__ == '__main__': ...@@ -35,6 +34,7 @@ if __name__ == '__main__':
# apply some nonlinearity # apply some nonlinearity
signal = ift.PointwisePositiveTanh(correlated_field) signal = ift.PointwisePositiveTanh(correlated_field)
# Building the Line of Sight response # Building the Line of Sight response
LOS_starts, LOS_ends = get_random_LOS(100) LOS_starts, LOS_ends = get_random_LOS(100)
R = ift.LOSResponse(position_space, starts=LOS_starts, R = ift.LOSResponse(position_space, starts=LOS_starts,
......
...@@ -44,6 +44,7 @@ class LinearModel(Model): ...@@ -44,6 +44,7 @@ class LinearModel(Model):
self._lin_op = lin_op self._lin_op = lin_op
self._inp = inp self._inp = inp
# MR FIXME: what does this do?
if isinstance(self._lin_op, SelectionOperator): if isinstance(self._lin_op, SelectionOperator):
self._lin_op = SelectionOperator(self._inp.value.domain, self._lin_op = SelectionOperator(self._inp.value.domain,
self._lin_op._key) self._lin_op._key)
......
...@@ -63,3 +63,9 @@ class MultiDomain(object): ...@@ -63,3 +63,9 @@ class MultiDomain(object):
def __ne__(self, x): def __ne__(self, x):
return not self.__eq__(x) return not self.__eq__(x)
def __str__(self):
res = "MultiDomain:\n"
for key, dom in zip(self._keys, self._domains):
res += key+": "+str(dom)+"\n"
return res
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment