Changeset 2358
- Timestamp:
- 12/02/11 19:42:37 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapgrid.py
r2356 r2358 25 25 self.outfile = self.gridder._save( outfile ) 26 26 27 def plot( self ):27 def plot( self, plotchan=-1 ): 28 28 plotter = _SDGridPlotter( self.infile, self.outfile ) 29 plotter.plot( )29 plotter.plot( chan=plotchan ) 30 30 31 31 class _SDGridPlotter: … … 58 58 59 59 idx = spectra.nonzero()[1] 60 self.nonzero = self.pointing.take( idx, axis=1 )60 #self.nonzero = self.pointing.take( idx, axis=1 ) 61 61 62 62 s = scantable( self.outfile, average=False ) … … 85 85 if chan < 0: 86 86 data = self.data.mean(axis=0) 87 title = 'Gridded Image (averaged over channel)' 87 88 else: 88 89 data = self.data[chan] 90 title = 'Gridded Image (channel %s)'%(chan) 89 91 pl.figure(10) 90 92 pl.clf() 91 93 pl.plot(self.grid[0],self.grid[1],'.',color='blue') 92 94 pl.plot(self.pointing[0],self.pointing[1],'.',color='red') 93 pl.plot(self.nonzero[0],self.nonzero[1],'o',color='green')95 #pl.plot(self.nonzero[0],self.nonzero[1],'o',color='green') 94 96 extent=[self.grid[0].min()-0.5*self.cellx, 95 97 self.grid[0].max()+0.5*self.cellx, … … 100 102 pl.xlabel('R.A. [rad]') 101 103 pl.ylabel('Dec. [rad]') 104 pl.title( title )
Note:
See TracChangeset
for help on using the changeset viewer.