Changeset 2953 for trunk/python
- Timestamp:
- 06/24/14 20:51:58 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r2945 r2953 1328 1328 from matplotlib.dates import HourLocator, MinuteLocator,SecondLocator, DayLocator 1329 1329 from matplotlib.ticker import MultipleLocator 1330 from numpy import array, pi 1330 from numpy import array, pi, ma 1331 1331 if self._plotter and (PL.gcf() == self._plotter.figure): 1332 1332 # the current figure is ASAP plotter. Use mpl plotter … … 1340 1340 self._data = scan 1341 1341 dates = self._data.get_time(asdatetime=True) 1342 # for flag handling 1343 mask = [ self._data._is_all_chan_flagged(i) for i in range(self._data.nrow())] 1342 1344 t = PL.date2num(dates) 1343 1345 tz = timezone('UTC') … … 1354 1356 tdel = max(t) - min(t) 1355 1357 ax = PL.subplot(2,1,1) 1356 el = array(self._data.get_elevation())*180./pi1358 el = ma.masked_array(array(self._data.get_elevation())*180./pi, mask) 1357 1359 PL.ylabel('El [deg.]') 1358 1360 dstr = dates[0].strftime('%Y/%m/%d') … … 1392 1394 1393 1395 # Az plot 1394 az = array(self._data.get_azimuth())*180./pi1396 az = ma.masked_array(array(self._data.get_azimuth())*180./pi, mask) 1395 1397 if min(az) < 0: 1396 1398 for irow in range(len(az)): … … 1440 1442 """ 1441 1443 self._plotmode = "pointing" 1442 from numpy import array, pi 1444 from numpy import array, pi, ma 1443 1445 from asap import scantable 1444 1446 # check for scantable … … 1519 1521 # getting data to plot 1520 1522 dir = array(self._data.get_directionval()).transpose() 1523 # for flag handling 1524 mask = [ self._data._is_all_chan_flagged(i) for i in range(self._data.nrow())] 1521 1525 ra = dir[0]*180./pi 1522 dec = dir[1]*180./pi1526 dec = ma.masked_array(dir[1]*180./pi, mask) 1523 1527 # actual plot 1524 1528 self._plotter.set_line(label=(sellab+str(idx))) … … 1679 1683 if m > 1: 1680 1684 y=y.mean(axis=1) 1685 # flag handling 1686 m = [ scan._is_all_chan_flagged(i) for i in range(scan.nrow()) ] 1687 y = ma.masked_array(y,mask=m) 1681 1688 plotit = self._plotter.plot 1682 1689 llbl = self._get_label(scan, r, self._stacking, None)
Note:
See TracChangeset
for help on using the changeset viewer.