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

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

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

revision 4120 by gross, Tue Dec 18 04:49:37 2012 UTC revision 4124 by gross, Fri Dec 21 01:35:43 2012 UTC
# Line 52  class DomainBuilder(object): Line 52  class DomainBuilder(object):
52              raise ValueError("Number of dimensions must be 2 or 3")              raise ValueError("Number of dimensions must be 2 or 3")
53          self._domain=None          self._domain=None
54          self._dim=dim          self._dim=dim
         self._gravity_surveys=[]  
         self._magnetic_surveys=[]  
55          self._sources=[]          self._sources=[]
56          self.setPadding()          self.setPadding()
57          self.setVerticalExtents()          self.setVerticalExtents()
# Line 158  class DomainBuilder(object): Line 156  class DomainBuilder(object):
156      Returns a list of magnetic surveys, see `` getSurveys`` for details      Returns a list of magnetic surveys, see `` getSurveys`` for details
157      """      """
158      return self.getSurveys(DataSource.MAGNETIC)      return self.getSurveys(DataSource.MAGNETIC)
159        
160      def fixDensityBelow(self,depth=None):      def fixDensityBelow(self,depth=None):
161          """          """
162          defines the depth below which density anomaly is set to zero.          defines the depth below which density anomaly is set to zero.
# Line 174  class DomainBuilder(object): Line 173  class DomainBuilder(object):
173                    
174      def getSurveys(self, datatype):      def getSurveys(self, datatype):
175          """          """
176          Returns a list of `Data` objects for all gravity surveys available to          Returns a list of `Data` objects for all surveys of type *datatype*  available to
177          this domain builder.          this domain builder.
178    
179          :return: List of gravity surveys which are tuples (anomaly,error).          :return: List of gravity surveys which are tuples (anomaly,error).
180          :rtype: ``list``          :rtype: ``list``
181          """          """
182          if len(self._gravity_surveys)==0:          surveys=[]
183              for src in self._sources:          for src in self._sources:
184                  if src.getDataType()==datatype:             if src.getDataType()==datatype:
185                      survey=src.getSurveyData(self.getDomain(), self._dom_origin, self._dom_NE, self._spacing)                surveys.append(src.getSurveyData(self.getDomain(), self._dom_origin, self._dom_NE, self._spacing))
186                      self._gravity_surveys.append(survey)          return surveys
         return self._gravity_surveys  
187    
188      def setBackgroundMagneticFluxDensity(self, B):      def setBackgroundMagneticFluxDensity(self, B):
189          """          """

Legend:
Removed from v.4120  
changed lines
  Added in v.4124

  ViewVC Help
Powered by ViewVC 1.1.26