We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 687750e commit ba4f464Copy full SHA for ba4f464
1 file changed
dedalus/core/field.py
@@ -326,6 +326,20 @@ def valid_modes(self):
326
# Return copy to avoid mangling cached result from coeff_layout
327
return valid_modes.copy()
328
329
+ @property
330
+ def real(self):
331
+ if self.is_real:
332
+ return self
333
+ else:
334
+ return (self + np.conj(self)) / 2
335
+
336
337
+ def imag(self):
338
339
+ return 0
340
341
+ return (self - np.conj(self)) / 2j
342
343
344
class Current(Operand):
345
0 commit comments