Changeset 8145


Ignore:
Timestamp:
Mar 10, 2011, 9:26:45 PM (14 years ago)
Author:
wilsonr
Message:

Removed '@brief' comments.

Location:
trunk/anuga_core/source/anuga
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/file/netcdf.py

    r7859 r8145  
    2323precision = netcdf_float # So if we want to change the precision its done here
    2424
    25 ##
    26 # @brief Clas for a NetCDF data file writer.
    2725class Write_nc:
    2826    """Write an nc file.
     
    3230    """
    3331
    34     ##
    35     # @brief Instantiate a Write_nc instance.
    36     # @param quantity_name
    37     # @param file_name
    38     # @param time_step_count The number of time steps.
    39     # @param time_step The time_step size.
    40     # @param lon
    41     # @param lat
    4232    def __init__(self,
    4333                 quantity_name,
     
    9585        #outfile.close()
    9686
    97     ##
    98     # @brief Write a time-step of quantity data.
    99     # @param quantity_slice The data to be stored for this time-step.
    10087    def store_timestep(self, quantity_slice):
    10188        """Write a time slice of quantity info
     
    121108
    122109
    123 ##
    124 # @brief Write an NC elevation file.
    125 # @param file_out Path to the output file.
    126 # @param lon ??
    127 # @param lat ??
    128 # @param depth_vector The elevation data to write.
    129110def write_elevation_nc(file_out, lon, lat, depth_vector):
    130111    """Write an nc elevation file."""
     
    150131    outfile.close()
    151132
    152 
    153 ##
    154 # @brief Write lat/lon headers to a NetCDF file.
    155 # @param outfile Handle to open file to write to.
    156 # @param lon An iterable of the longitudes.
    157 # @param lat An iterable of the latitudes.
    158 # @note Defines lat/long dimensions and variables. Sets various attributes:
    159 #          .point_spacing  and  .units
    160 #       and writes lat/lon data.
    161133
    162134def nc_lon_lat_header(outfile, lon, lat):
     
    188160
    189161
    190 ##
    191 # @brief Filter data file, selecting timesteps first:step:last.
    192 # @param filename1 Data file to filter.
    193 # @param filename2 File to write filtered timesteps to.
    194 # @param first First timestep.
    195 # @param last Last timestep.
    196 # @param step Timestep stride.
    197162def filter_netcdf(filename1, filename2, first=0, last=None, step=1):
    198163    """Filter data file, selecting timesteps first:step:last.
  • trunk/anuga_core/source/anuga/utilities/log_test.py

    r6902 r8145  
    3232            os.remove(STDOUT_LOG_NAME)
    3333
    34     ##
    35     # @brief Test the logging routines.
    36     # @note HAVE ONE TEST CASE ONLY! Multiple tests would concatenate
    37     #       multiple test output in one log file.
    3834    def test_simple(self):
    3935        '''Check that logging works in simple case.'''
  • trunk/anuga_core/source/anuga/utilities/system_tools.py

    r8018 r8145  
    325325       
    326326   
    327 ##
    328 # @brief Split a string into 'clean' fields.
    329 # @param str The string to process.
    330 # @param delimiter The delimiter string to split 'line' with.
    331 # @return A list of 'cleaned' field strings.
    332 # @note Any fields that were initially zero length will be removed.
    333 # @note If a field contains '\n' it isn't zero length.
    334327def clean_line(str, delimiter):
    335     """Split string on given delimiter, remove whitespace from each field."""
     328    """Split a string into 'clean' fields.
     329
     330    str        the string to process
     331    delimiter  the delimiter string to split 'line' with
     332
     333    Returns a list of 'cleaned' field strings.
     334
     335    Any fields that were initially zero length will be removed.
     336    If a field contains '\n' it isn't zero length.
     337    """
    336338
    337339    return [x.strip() for x in str.strip().split(delimiter) if x != '']
     
    363365################################################################################
    364366
    365 ##
    366 # @brief Convert 1-D list of strings to 2-D list of chars.
    367 # @param l 1-dimensional list of strings.
    368 # @return A 2-D list of 'characters' (1 char strings).
    369 # @note No checking that we supply a 1-D list.
    370367def string_to_char(l):
    371368    '''Convert 1-D list of strings to 2-D list of chars.'''
     
    385382
    386383
    387 ##
    388 # @brief Convert 2-D list of chars to 1-D list of strings.
    389 # @param ll 2-dimensional list of 'characters' (1 char strings).
    390 # @return A 1-dimensional list of strings.
    391 # @note Each string has had right-end spaces removed.
    392384def char_to_string(ll):
    393385    '''Convert 2-D list of chars to 1-D list of strings.'''
     
    397389################################################################################
    398390
    399 ##
    400 # @brief Get list of variable names in a python expression string.
    401 # @param source A string containing a python expression.
    402 # @return A list of variable name strings.
    403 # @note Throws SyntaxError exception if not a valid expression.
    404391def get_vars_in_expression(source):
    405392    '''Get list of variable names in a python expression.'''
     
    408395    from compiler.ast import Node
    409396
    410     ##
    411     # @brief Internal recursive function.
    412     # @param node An AST parse Node.
    413     # @param var_list Input list of variables.
    414     # @return An updated list of variables.
    415397    def get_vars_body(node, var_list=[]):
    416398        if isinstance(node, Node):
     
    430412
    431413
    432 ##
    433 # @brief Get a file from the web.
    434 # @param file_url URL of the file to fetch.
    435 # @param file_name Path to file to create in the filesystem.
    436 # @param auth Auth tuple (httpproxy, proxyuser, proxypass).
    437 # @param blocksize Read file in this block size.
    438 # @return (True, auth) if successful, else (False, auth).
    439 # @note If 'auth' not supplied, will prompt user.
    440 # @note Will try using environment variable HTTP_PROXY for proxy server.
    441 # @note Will try using environment variable PROXY_USERNAME for proxy username.
    442 # @note Will try using environment variable PROXY_PASSWORD for proxy password.
    443414def get_web_file(file_url, file_name, auth=None, blocksize=1024*1024):
    444415    '''Get a file from the web (HTTP).
     
    537508
    538509
    539 ##
    540 # @brief Tar a file (or directory) into a tarfile.
    541 # @param files A list of files (or directories) to tar.
    542 # @param tarfile The created tarfile name.
    543 # @note 'files' may be a string (single file) or a list of strings.
    544 # @note We use gzip compression.
    545510def tar_file(files, tarname):
    546511    '''Compress a file or directory into a tar file.'''
     
    555520
    556521
    557 ##
    558 # @brief Untar a file into an optional target directory.
    559 # @param tarname Name of the file to untar.
    560 # @param target_dir Directory to untar into.
    561522def untar_file(tarname, target_dir='.'):
    562523    '''Uncompress a tar file.'''
     
    569530
    570531
    571 ##
    572 # @brief Return a hex digest (MD5) of a given file.
    573 # @param filename Path to the file of interest.
    574 # @param blocksize Size of data blocks to read.
    575 # @return A hex digest string (16 bytes).
    576 # @note Uses MD5 digest if hashlib not available.
    577532def get_file_hexdigest(filename, blocksize=1024*1024*10):
    578533    '''Get a hex digest of a file.'''
     
    594549
    595550
    596 ##
    597 # @brief Create a file containing a hexdigest string of a data file.
    598 # @param data_file Path to the file to get the hexdigest from.
    599 # @param digest_file Path to hexdigest file to create.
    600 # @note Uses MD5 digest.
    601551def make_digest_file(data_file, digest_file):
    602552    '''Create a file containing the hex digest string of a data file.'''
     
    608558
    609559
    610 ##
    611 # @brief Function to return the length of a file.
    612 # @param in_file Path to file to get length of.
    613 # @return Number of lines in file.
    614 # @note Doesn't count '\n' characters.
    615 # @note Zero byte file, returns 0.
    616 # @note No \n in file at all, but >0 chars, returns 1.
    617560def file_length(in_file):
    618561    '''Function to return the length of a file.'''
Note: See TracChangeset for help on using the changeset viewer.