Commit fb06eff7 authored by Marco Selig's avatar Marco Selig

explicit 'demo_wf3.py' added.

parent fc0ca7ea
...@@ -17,4 +17,5 @@ demos/* ...@@ -17,4 +17,5 @@ demos/*
!demos/demo_faraday_map.npy !demos/demo_faraday_map.npy
!demos/demo_excaliwir.py !demos/demo_excaliwir.py
!demos/demo_wf1.py !demos/demo_wf1.py
!demos/demo_wf2.py !demos/demo_wf2.py
\ No newline at end of file !demos/demo_wf3.py
\ No newline at end of file
...@@ -1358,14 +1358,16 @@ class explicit_operator(operator): ...@@ -1358,14 +1358,16 @@ class explicit_operator(operator):
interactive = pl.isinteractive() interactive = pl.isinteractive()
pl.matplotlib.interactive(not bool(kwargs.get("save",False))) pl.matplotlib.interactive(not bool(kwargs.get("save",False)))
if(np.any(np.iscomplex(self.val))): X = self.get_matrix(bare=kwargs.get("bare",True))
if(np.any(np.iscomplex(X))):
about.infos.cprint("INFO: absolute values and phases are plotted.") about.infos.cprint("INFO: absolute values and phases are plotted.")
if(kwargs.has_key("title")): if(kwargs.has_key("title")):
title = kwargs.get("title")+" " title = kwargs.get("title")+" "
kwargs.__delitem__("title") kwargs.__delitem__("title")
else: else:
title = "" title = ""
self.get_plot(np.absolute(self.val),title=title+"(absolute)",**kwargs) self.get_plot(np.absolute(X),title=title+"(absolute)",**kwargs)
if(kwargs.has_key("vmin")): if(kwargs.has_key("vmin")):
kwargs.__delitem__("vmin") kwargs.__delitem__("vmin")
if(kwargs.has_key("vmin")): if(kwargs.has_key("vmin")):
...@@ -1376,9 +1378,9 @@ class explicit_operator(operator): ...@@ -1376,9 +1378,9 @@ class explicit_operator(operator):
kwargs["norm"] = None kwargs["norm"] = None
if(not kwargs.has_key("cmap")): if(not kwargs.has_key("cmap")):
kwargs["cmap"] = pl.cm.hsv_r kwargs["cmap"] = pl.cm.hsv_r
self.get_plot(np.angle(self.val,deg=False),title=title+"(phase)",vmin=-3.1416,vmax=3.1416,**kwargs) ## values in [-pi,pi] self.get_plot(np.angle(X,deg=False),title=title+"(phase)",vmin=-3.1416,vmax=3.1416,**kwargs) ## values in [-pi,pi]
else: else:
self.get_plot(np.real(self.val),**kwargs) self.get_plot(np.real(X),**kwargs)
pl.matplotlib.interactive(interactive) pl.matplotlib.interactive(interactive)
......
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