Changeset 5520


Ignore:
Timestamp:
Jul 17, 2008, 10:25:55 PM (16 years ago)
Author:
ole
Message:

Cleaned up more and retired (points, values, data_georef) option which was obsoleted by geo_spatial data objects a while
ago.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py

    r5518 r5520  
    259259
    260260
    261     # New leaner interface to setting values
     261    #---------------------------------------------
     262    # Public interface for setting quantity values
     263    #---------------------------------------------
    262264    def set_values(self,
    263265                   numeric=None,    # List, numeric array or constant
     
    265267                   function=None,   # Callable object: f(x,y)
    266268                   geospatial_data=None, # Arbitrary dataset
    267                    points=None, values=None, data_georef=None, # Obsoleted by use of geo_spatial object
    268                    filename=None, attribute_name=None, #Input from file
     269                   filename=None, attribute_name=None, # Input from file
    269270                   alpha=None,
    270271                   location='vertices',
     
    298299          fit_interpolate.fit fitting
    299300
    300         points:
    301           Nx2 array of data points for use with fit_interpolate.fit
    302           If points are present, an N array of attribute
    303           values corresponding to
    304           each data point must be present.
    305           (Obsoleted by geospatial_data)         
    306 
    307         values:
    308           If points is specified, values is an array of length N containing
    309           attribute values for each point.
    310           (Obsoleted by geospatial_data)         
    311 
    312         data_georef:
    313           If points is specified, geo_reference applies to each point.
    314           (Obsoleted by geospatial_data)         
    315 
    316301        filename:
    317302          Name of a points file containing data points and attributes for
     
    375360
    376361        Exactly one of the arguments
    377           numeric, quantity, function, points, filename
     362          numeric, quantity, function, filename
    378363        must be present.
    379364        """
     
    431416
    432417        # General input checks
    433         L = [numeric, quantity, function, geospatial_data, points, filename]
     418        L = [numeric, quantity, function, geospatial_data, filename]
    434419        msg = 'Exactly one of the arguments '+\
    435               'numeric, quantity, function, geospatial_data, points, '+\
     420              'numeric, quantity, function, geospatial_data, '+\
    436421              'or filename must be present.'
    437422        assert L.count(None) == len(L)-1, msg
     
    446431        msg = 'Indices must be a list or None'
    447432        assert type(indices) in [ListType, NoneType, ArrayType], msg
    448 
    449 
    450         if not(points is None and values is None and data_georef is None):
    451             from warnings import warn
    452 
    453             msg = 'Using points, values or data_georef with set_quantity '
    454             msg += 'is obsolete. Please use a Geospatial_data object instead.'
    455             #warn(msg, DeprecationWarning)
    456             raise Exception, msg
    457433
    458434
     
    497473                                                     verbose=verbose,
    498474                                                     use_cache=use_cache)
    499         elif points is not None:
    500             msg = 'The usage of points in set_values has been deprecated.' +\
    501                   'Please use the geospatial_data object instead.'
    502             raise Exception, msg
    503 
    504 
    505475           
    506476        elif filename is not None:
     
    530500
    531501
    532     # Specific functions for setting values
     502    #-------------------------------------------------------------       
     503    # Specific internal functions for setting values based on type
     504    #-------------------------------------------------------------           
     505   
    533506    def set_values_from_constant(self, X,
    534507                                 location, indices, verbose):
     
    776749                    self.vertex_values[:,j] = values[j::3]                 
    777750            else:   
    778                 #Brute force
     751                # Brute force
    779752                for i in indices:
    780753                    for j in range(3):
     
    902875                                   location, indices, verbose)
    903876
    904    
     877   
     878   
     879    #-----------------------------------------------------   
    905880    def get_extremum_index(self, mode=None, indices=None):
    906881        """Return index for maximum or minimum value of quantity (on centroids)
Note: See TracChangeset for help on using the changeset viewer.