Changeset 1011
- Timestamp:
- Jul 24, 2013, 2:13:49 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py
r1003 r1011 1690 1690 else: 1691 1691 if self.verbose: print "!! WARNING !! No area accounted for (computing on t and/or z axis)." 1692 # prepare quadratic mean 1693 if "qmean" in self.compute: self.field = self.field*self.field 1692 1694 # now ready to compute [TBD: we would like to have e.g. mean over x,y and min over t ??] 1693 1695 if self.method_t == "comp": … … 1707 1709 if self.method_y == "comp": 1708 1710 if self.verbose: print "**** OK. Computing over y axis." 1709 if self.compute == "mean": self.field = ppcompute.mean(self.field,axis=2)1711 if "mean" in self.compute: self.field = ppcompute.mean(self.field,axis=2) 1710 1712 elif self.compute == "min": self.field = ppcompute.min(self.field,axis=2) 1711 1713 elif self.compute == "max": self.field = ppcompute.max(self.field,axis=2) … … 1716 1718 if self.method_x == "comp": 1717 1719 if self.verbose: print "**** OK. Computing over x axis." 1718 if self.compute == "mean": self.field = ppcompute.mean(self.field,axis=3)1720 if "mean" in self.compute: self.field = ppcompute.mean(self.field,axis=3) 1719 1721 elif self.compute == "min": self.field = ppcompute.min(self.field,axis=3) 1720 1722 elif self.compute == "max": self.field = ppcompute.max(self.field,axis=3) … … 1725 1727 # remove all dimensions with size 1 to prepare plot (and check the resulting dimension with dimplot) 1726 1728 self.field = np.squeeze(self.field) 1729 # take root mean square for quadratic mean 1730 if self.compute == "qmean": self.field = np.sqrt(self.field) 1731 # error handling and verbose 1727 1732 if self.field.ndim != self.dimplot: 1728 1733 print "!! ERROR !! Problem: self.field is different than plot dimensions", self.field.ndim, self.dimplot ; exit()
Note: See TracChangeset
for help on using the changeset viewer.