/[escript]/trunk/downunder/py_src/datasources.py
ViewVC logotype

Diff of /trunk/downunder/py_src/datasources.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3965 by caltinay, Fri Sep 14 01:23:17 2012 UTC revision 3966 by caltinay, Mon Sep 17 00:45:39 2012 UTC
# Line 341  class UBCDataSource(DataSource): Line 341  class UBCDataSource(DataSource):
341      #    return mask      #    return mask
342    
343      def getGravityAndStdDev(self):      def getGravityAndStdDev(self):
344          gravlist=self._readGravity() # x,y,z,g,s          gravlist=self.__readGravity() # x,y,z,g,s
345          g_and_sigma=self._interpolateOnDomain(gravlist)          g_and_sigma=self._interpolateOnDomain(gravlist)
346          return g_and_sigma[0]*[0,0,1], g_and_sigma[1]          return g_and_sigma[0]*[0,0,1], g_and_sigma[1]
347    
# Line 672  class ERSDataSource(DataSource): Line 672  class ERSDataSource(DataSource):
672          return self.__domainclass          return self.__domainclass
673    
674      def getGravityAndStdDev(self):      def getGravityAndStdDev(self):
675          gravlist=self._readGravity() # x,y,z,g,s          gravlist=self.__readGravity() # x,y,z,g,s
676          g_and_sigma=self._interpolateOnDomain(gravlist)          g_and_sigma=self._interpolateOnDomain(gravlist)
677          return g_and_sigma[0]*[0,0,1], g_and_sigma[1]          return g_and_sigma[0]*[0,0,1], g_and_sigma[1]
678    
679      def _readGravity(self):      def __readGravity(self):
680          f=open(self.__datafile, 'r')          f=open(self.__datafile, 'r')
681          n=self.__nPts[0]*self.__nPts[1]          n=self.__nPts[0]*self.__nPts[1]
682          grav=[]          grav=[]
# Line 699  class ERSDataSource(DataSource): Line 699  class ERSDataSource(DataSource):
699          alt=self.__altOfData*np.ones((n,))          alt=self.__altOfData*np.ones((n,))
700    
701          # convert units          # convert units
702          err=2e-5*np.array(err)          err=2e-6*np.array(err)
703          grav=1e-5*np.array(grav)          grav=1e-6*np.array(grav)
704          gravdata=np.column_stack((x,y,alt,grav,err))          gravdata=np.column_stack((x,y,alt,grav,err))
705          return gravdata          return gravdata
706    

Legend:
Removed from v.3965  
changed lines
  Added in v.3966

  ViewVC Help
Powered by ViewVC 1.1.26