- Timestamp:
- 08/14/06 14:13:10 (18 years ago)
- Location:
- trunk/python
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/__init__.py
r1117 r1134 319 319 return 320 320 321 try: 322 import numpy.core as NUM 323 except ImportError: 324 try: 325 import numarray as NUM 326 except ImportError: 327 raise ImportError("You need to have numpy or numarray installed") 328 321 329 from asapfitter import fitter 322 330 from asapreader import reader … … 326 334 from scantable import scantable 327 335 from asaplinefind import linefinder 328 #from asapfit import * 329 330 from numarray import logical_and as mask_and331 from numarray import logical_or as mask_or332 from numarray import logical_not as mask_not336 from linecatalog import linecatalog 337 338 mask_and = NUM.logical_and 339 mask_or = NUM.logical_or 340 mask_not = NUM.logical_not 333 341 334 342 if rcParams['useplotter']: … … 337 345 plotter = asapplotter(gui) 338 346 del gui 339 340 347 341 348 __date__ = '$Date$'.split()[1] -
trunk/python/asapfitter.py
r1116 r1134 2 2 from asap import rcParams 3 3 from asap import print_log 4 from asap import NUM 4 5 5 6 class fitter: … … 41 42 self.y = ydat 42 43 if mask == None: 43 from numarray import ones 44 self.mask = ones(len(xdat)) 44 self.mask = NUM.ones(len(xdat)) 45 45 else: 46 46 self.mask = mask … … 65 65 self.mask = None 66 66 if mask is None: 67 from numarray import ones 68 self.mask = ones(self.data.nchan()) 67 self.mask = NUM.ones(self.data.nchan()) 69 68 else: 70 69 self.mask = mask … … 202 201 if self.fitfunc == "gauss" and component is not None: 203 202 if not self.fitted and sum(self.fitter.getparameters()) == 0: 204 from numarray import zeros 205 pars = list(zeros(len(self.components)*3)) 206 fxd = list(zeros(len(pars))) 203 pars = list(NUM.zeros(len(self.components)*3)) 204 fxd = list(NUM.zeros(len(pars))) 207 205 else: 208 206 pars = list(self.fitter.getparameters()) -
trunk/python/scantable.py
r1118 r1134 4 4 from asap import asaplog 5 5 from asap import selector 6 from numarray import ones 7 from numarray import zeros 6 from asap import NUM 8 7 9 8 class scantable(Scantable): … … 666 665 asaplog.push(msg) 667 666 n = self.nchan() 668 msk = zeros(n)667 msk = NUM.zeros(n) 669 668 # test if args is a 'list' or a 'normal *args - UGLY!!! 670 669 … … 679 678 if kwargs.has_key('invert'): 680 679 if kwargs.get('invert'): 681 from numarray import logical_not 682 msk = logical_not(msk) 680 msk = NUM.logical_not(msk) 683 681 print_log() 684 682 return msk … … 1093 1091 varlist = vars() 1094 1092 if mask is None: 1095 mask = list( ones(self.nchan(-1)))1093 mask = list(NUM.ones(self.nchan(-1))) 1096 1094 from asap.asapfitter import fitter 1097 1095 f = fitter()
Note:
See TracChangeset
for help on using the changeset viewer.