Changeset 8150


Ignore:
Timestamp:
Mar 11, 2011, 7:23:24 PM (14 years ago)
Author:
wilsonr
Message:

Removed '@brief' comments.

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

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/culvert_flows/test_all.py

    r7779 r8150  
    2828
    2929
    30 ##
    31 # @brief List a string sequence on the screen in columns.
    32 # @param names Sequence of strings to list.
    33 # @param func Function to apply to each string in sequence.
    34 # @param col_width Force columns to this width (default calculated).
    35 # @param page_width Set displayable page width to this (default 132).
    3630def list_names(names, func=None, col_width=None, page_width=None):
    3731    # set defaults
     
    6862
    6963
    70 ##
    71 # @brief Get 'test_*.py' files and paths to directories.
    72 # @param path Path to directory to start walk in.
    73 # @return A tuple (<files>, <dirs>).
    74 # @note Don't include any files in and below forbidden directories.
    7564def get_test_files(path):
    7665    walk = os.walk(path)
     
    175164
    176165
    177 ##
    178 # @brief Check that the environment is sane.
    179 # @note Stops here if there is an error.
    180166def check_anuga_import():
    181167    try:
  • trunk/anuga_core/source/anuga/file_conversion/asc2dem.py

    r7814 r8150  
    5555
    5656
    57 ##
    58 # @brief Convert an ASC file to a DEM file.
    59 # @param basename_in Stem of input filename.
    60 # @param basename_out Stem of output filename.
    61 # @param verbose True if this function is to be verbose.
    6257def _convert_dem_from_ascii2netcdf(name_in, name_out = None,
    6358                                   verbose = False):
  • trunk/anuga_core/source/anuga/file_conversion/dem2pts.py

    r7841 r8150  
    5353
    5454
    55 ##
    56 # @brief
    57 # @param basename_in
    58 # @param basename_out
    59 # @param verbose
    60 # @param easting_min
    61 # @param easting_max
    62 # @param northing_min
    63 # @param northing_max
    6455def _dem2pts(name_in, name_out=None, verbose=False,
    6556            easting_min=None, easting_max=None,
  • trunk/anuga_core/source/anuga/file_conversion/file_conversion.py

    r7866 r8150  
    8686        write_obj(FN, xx, yy, zz)
    8787
    88 ##
    89 # @brief Convert time-series text file to TMS file.
    90 # @param filename
    91 # @param quantity_names
    92 # @param time_as_seconds
    9388def timefile2netcdf(file_text, file_out = None, quantity_names=None, \
    9489                                time_as_seconds=False):
     
    224219   
    225220
    226 ##
    227 # @brief
    228 # @param filename
    229 # @param verbose
    230221def tsh2sww(filename, verbose=False):
    231222    """
     
    266257
    267258
    268 ##
    269 # @brief Return max&min indexes (for slicing) of area specified.
    270 # @param latitudes_ref ??
    271 # @param longitudes_ref ??
    272 # @param minlat Minimum latitude of specified area.
    273 # @param maxlat Maximum latitude of specified area.
    274 # @param minlon Minimum longitude of specified area.
    275 # @param maxlon Maximum longitude of specified area.
    276 # @return Tuple (lat_min_index, lat_max_index, lon_min_index, lon_max_index)
    277259def get_min_max_indices(latitudes_ref, longitudes_ref,
    278260                         minlat=None, maxlat=None,
     
    350332
    351333
    352 ##
    353 # @brief
    354 # @param filename
    355 # @param x
    356 # @param y
    357 # @param z
    358334def write_obj(filename, x, y, z):
    359335    """Store x,y,z vectors into filename (obj format).
  • trunk/anuga_core/source/anuga/file_conversion/sdf2pts.py

    r7814 r8150  
    33from anuga.geospatial_data.geospatial_data import Geospatial_data
    44
    5 ##
    6 # @brief  Return block of surface lines for each cross section
    7 # @param lines Iterble  of text lines to process.
    8 # @note BROKEN?  UNUSED?
    95def _read_hecras_cross_sections(lines):
    106    """Return block of surface lines for each cross section
     
    4339    """Read HEC-RAS Elevation datal from the following ASCII format (.sdf)
    4440
    45 # @brief Convert HECRAS (.sdf) file to PTS file.
    46 # @param basename_in Sterm of input filename.
    47 # @param basename_out Sterm of output filename.
    48 # @param verbose True if this function is to be verbose.
     41    basename_in Sterm of input filename.
     42    basename_out Sterm of output filename.
     43    verbose True if this function is to be verbose.
    4944
    5045    Example:
  • trunk/anuga_core/source/anuga/file_conversion/urs2nc.py

    r7800 r8150  
    6464
    6565
    66 ##
    67 # @brief Convert a quantity URS file to a NetCDF file.
    68 # @param file_in Path to input URS file.
    69 # @param file_out Path to the output file.
    70 # @param quantity Name of the quantity to be written to the output file.
    71 # @return A tuple (lonlatdep, lon, lat, depth).
    7266def _binary_c2nc(file_in, file_out, quantity):
    7367    """Reads in a quantity urs file and writes a quantity nc file.
     
    140134
    141135
    142 ##
    143 # @brief
    144 # @param long_lat_dep
    145 # @return A tuple (long, lat, quantity).
    146 # @note The latitude is the fastest varying dimension - in mux files.
    147136def lon_lat2grid(long_lat_dep):
    148137    """
  • trunk/anuga_core/source/anuga/geometry/polygon.py

    r8136 r8150  
    1313from aabb import AABB
    1414
    15 ##
    16 # @brief Determine whether a point is on a line segment.
    17 # @param point (x, y) of point in question (tuple, list or array).
    18 # @param line ((x1,y1), (x2,y2)) for line (tuple, list or array).
    19 # @param rtol Relative error for 'close'.
    20 # @param atol Absolute error for 'close'.
    21 # @return True or False.
    2215def point_on_line(point, line, rtol=1.0e-5, atol=1.0e-8):
    2316    """Determine whether a point is on a line segment
     
    9891   }
    9992
    100 ##
    101 # @brief Finds intersection point of two line segments.
    102 # @param line0 First line ((x1,y1), (x2,y2)).
    103 # @param line1 Second line ((x1,y1), (x2,y2)).
    104 # @param rtol Relative error for 'close'.
    105 # @param atol Absolute error for 'close'.
    106 # @return (status, value) where:
    107 #             status = 0 - no intersection, value set to None
    108 #                      1 - intersection found, value=(x,y)
    109 #                      2 - lines collienar, overlap, value=overlap segment
    110 #                      3 - lines collinear, no overlap, value is None
    111 #                      4 - lines parallel, value is None
    11293def intersection(line0, line1, rtol=1.0e-5, atol=1.0e-8):
    11394    """Returns intersecting point between two line segments.
     
    180161            return 0, None
    181162
    182 ##
    183 # @brief Finds intersection point of two line segments.
    184 # @param line0 First line ((x1,y1), (x2,y2)).
    185 # @param line1 Second line ((x1,y1), (x2,y2)).
    186 # @return (status, value) where:
    187 #             status = 0 - no intersection, value set to None
    188 #                      1 - intersection found, value=(x,y)
    189 #                      2 - lines collienar, overlap, value=overlap segment
    190 #                      3 - lines collinear, no overlap, value is None
    191 #                      4 - lines parallel, value is None
    192 # @note Wrapper for C function.
    193163def NEW_C_intersection(line0, line1):
    194164    """Returns intersecting point between two line segments.
     
    436406        raise Exception(msg)
    437407
    438 ##
    439 # @brief Determine which of a set of points are inside a polygon.
    440 # @param points A set of points (tuple, list or array).
    441 # @param polygon A set of points defining a polygon (tuple, list or array).
    442 # @param closed True if points on boundary are considered 'inside' polygon.
    443 # @param verbose True if this function is to be verbose.
    444 # @return A list of indices of points inside the polygon.
    445408def inside_polygon(points, polygon, closed=True, verbose=False):
    446409    """Determine points inside a polygon
     
    489452    return indices[:count]
    490453
    491 ##
    492 # @brief Determine if one point is outside a polygon.
    493 # @param point The point of interest.
    494 # @param polygon The polygon to test inclusion in.
    495 # @param closed True if points on boundary are considered 'inside' polygon.
    496 # @param verbose True if this function is to be verbose.
    497 # @return True if point is outside the polygon.
    498 # @note Uses inside_polygon() to do the work.
    499454def is_outside_polygon(point, polygon, closed=True, verbose=False,
    500455                       points_geo_ref=None, polygon_geo_ref=None):
     
    514469        raise Exception, msg
    515470
    516 ##
    517 # @brief Determine which of a set of points are outside a polygon.
    518 # @param points A set of points (tuple, list or array).
    519 # @param polygon A set of points defining a polygon (tuple, list or array).
    520 # @param closed True if points on boundary are considered 'inside' polygon.
    521 # @param verbose True if this function is to be verbose.
    522 # @return A list of indices of points outside the polygon.
    523471def outside_polygon(points, polygon, closed = True, verbose = False):
    524472    """Determine points outside a polygon
     
    562510        return indices[count:][::-1]  #return reversed
    563511
    564 ##
    565 # @brief Separate a list of points into two sets inside+outside a polygon.
    566 # @param points A set of points (tuple, list or array).
    567 # @param polygon A set of points defining a polygon (tuple, list or array).
    568 # @param closed True if points on boundary are considered 'inside' polygon.
    569 # @param verbose True if this function is to be verbose.
    570 # @return A tuple (in, out) of point indices for poinst inside amd outside.
    571512def in_and_outside_polygon(points, polygon, closed=True, verbose=False):
    572513    """Determine points inside and outside a polygon
     
    1055996    the extrema in both axes are preserved.
    1056997
    1057 ##
    1058 # @brief Reduce number of points in polygon by the specified factor.
    1059 # @param polygon The polygon to reduce.
    1060 # @param factor The factor to reduce polygon points by (default 10).
    1061 # @note The extrema of both axes are preserved.
     998    Reduce number of points in polygon by the specified factor.
     999    polygon The polygon to reduce.
     1000    factor The factor to reduce polygon points by (default 10).
     1001
     1002    The extrema of both axes are preserved.
    10621003
    10631004    Return reduced polygon
  • trunk/anuga_core/source/anuga/geometry/polygon_function.py

    r7858 r8150  
    4444
    4545    def __init__(self, regions, default=0.0, geo_reference=None):
    46         """
    47         # @brief Create instance of a polygon function.
    48         # @param regions A list of (x,y) tuples defining a polygon.
    49         # @param default Value or function returning value for points outside poly.
    50         # @param geo_reference ??
     46        """Create instance of a polygon function.
     47
     48        regions A list of (x,y) tuples defining a polygon.
     49        default Value or function returning value for points outside poly.
     50        geo_reference ??
    5151        """
    5252
     
    9090
    9191    def __call__(self, pts_x, pts_y):
    92         """
    93         # @brief Implement the 'callable' property of Polygon_function.
    94         # @param x List of x coordinates of points ot interest.
    95         # @param y List of y coordinates of points ot interest.
     92        """Implement the 'callable' property of Polygon_function.
     93
     94        x List of x coordinates of points ot interest.
     95        y List of y coordinates of points ot interest.
    9696        """
    9797        pts_x = num.array(pts_x, num.float)
  • trunk/anuga_core/source/anuga/load_mesh/loadASCII.py

    r7317 r8150  
    8080
    8181
    82 ##
    83 # @brief Read a mesh file (.tsh or .msh) and return a dictionary.
    84 # @param ofile Path to the file to read.
    85 # @return A dictionary of data from the input file.
    86 # @note Throws IOError if can't read file.
    87 # @note This is used by pmesh.
    8882def import_mesh_file(ofile):
    8983    """Read a mesh file, either .tsh or .msh
     
    107101
    108102
    109 ##
    110 # @brief Write a mesh file from a dictionary.
    111 # @param ofile The path of the mesh file to write.
    112 # @param mesh_dict Dictionary containing data to write to output mesh file.
    113 # @note Raises IOError if file extension is unrecognized.
    114103def export_mesh_file(ofile, mesh_dict):
    115104    """Write a mesh file given a dictionary.
     
    148137
    149138
    150 ##
    151 # @brief Read a mesh file into a dictionary.
    152 # @param ofile Path of the file to read.
    153 # @return Points dictionary from the mesh (.tsh) file.
    154139def _read_tsh_file(ofile):
    155140    """Read the text file format for meshes"""
     
    165150
    166151
    167 ##
    168 # @brief Read triangulation data from a file, leave file open.
    169 # @param fd An open descriptor of the file to read.
    170 # @return A dictionary ...
    171152def _read_triangulation(fd):
    172153    """Read the generated triangulation, NOT the outline."""
     
    265246
    266247
    267 ##
    268 # @brief Read a mesh outline file.
    269 # @param fd An open descriptor of the file to read.
    270 # @return A Points dictionary.
    271 # @note If file has no mesh info, an empty dict will be returned.
    272248def _read_outline(fd):
    273249    """Read a mesh file outline.
     
    397373
    398374
    399 ##
    400 # @brief Write an ASCII triangulation file.
    401 # @param fd An open descriptor to the file to write.
    402 # @param gen_dict Dictionary containing data to write.
    403375def _write_ASCII_triangulation(fd, gen_dict):
    404376    vertices = gen_dict['vertices']
     
    510482
    511483
    512 ##
    513 # @brief Write triangulation and outline to a .tsh file.
    514 # @param ofile Path of the file to write.
    515 # @mesh_dict Dictionary of data to write.
    516484def _write_tsh_file(ofile, mesh_dict):
    517485    fd = open(ofile, 'w')
     
    521489
    522490
    523 ##
    524 # @brief Write an ASCII outline to a file.
    525 # @param fd An open descriptor of the file to write.
    526 # @param dict Dictionary holding data to write.
    527491def _write_ASCII_outline(fd, dict):
    528492    points = dict['points']
     
    597561
    598562
    599 ##
    600 # @brief Write a .msh file.
    601 # @param file Path to the file to write.
    602 # @param mesh Dictionary holding data to write.
    603563def _write_msh_file(file_name, mesh):
    604564    """Write .msh NetCDF file
     
    791751
    792752
    793 ##
    794 # @brief Read a mesh file.
    795 # @param file_name Path to the file to read.
    796 # @return A dictionary containing the .msh file data.
    797 # @note Throws IOError if file not found.
    798753def _read_msh_file(file_name):
    799754    """ Read in an msh file."""
     
    916871
    917872
    918 ##
    919 # @brief Export a boundary file.
    920 # @param file_name Path to the file to write.
    921 # @param points List of point index pairs.
    922 # @paran title Title string to write into file (first line).
    923 # @param delimiter Delimiter string to write between points.
    924 # @note Used by alpha shapes
    925873def export_boundary_file(file_name, points, title, delimiter=','):
    926874    """Export a boundary file.
     
    949897################################################################################
    950898
    951 ##
    952 # @brief
    953 # @param point_atts
    954899def extent_point_atts(point_atts):
    955900    """Returns 4 points representing the extent
     
    963908
    964909
    965 ##
    966 # @brief Get an extent array for a set of points.
    967 # @param points A set of points.
    968 # @return An extent array of form [[min_x, min_y], [max_x, min_y],
    969 #                                  [max_x, max_y], [min_x, max_y]]
    970910def extent(points):
    971911    points = num.array(points, num.float)
     
    995935
    996936
    997 ##
    998 # @brief Reduce a points file until number of points is less than limit.
    999 # @param infile Path to input file to thin.
    1000 # @param outfile Path to output thinned file.
    1001 # @param max_points Max number of points in output file.
    1002 # @param verbose True if this function is to be verbose.
    1003937def reduce_pts(infile, outfile, max_points, verbose = False):
    1004938    """Reduce a points file until less than given size.
     
    1019953
    1020954
    1021 ##
    1022 # @brief
    1023 # @param infile
    1024 # @param max_points
    1025 # @param delimiter
    1026 # @param verbose True if this function is to be verbose.
    1027 # @return A list of
    1028955def produce_half_point_files(infile, max_points, delimiter, verbose=False):
    1029956    point_atts = _read_pts_file(infile)
     
    1046973
    1047974
    1048 ##
    1049 # @brief
    1050 # @param point_atts Object with attribute of 'pointlist'.
    1051 # @return
    1052975def point_atts2array(point_atts):
    1053976    # convert attribute list to array of floats
     
    1061984
    1062985
    1063 ##
    1064 # @brief ??
    1065 # @param point_atts ??
    1066 # @return ??
    1067986def half_pts(point_atts):
    1068987    point_atts2array(point_atts)
     
    1074993    return point_atts
    1075994
    1076 ##
    1077 # @brief ??
    1078 # @param dic ??
    1079 # @return ??
    1080995def concatinate_attributelist(dic):
    1081996    """
     
    10951010
    10961011
    1097 ##
    1098 # @brief
    1099 # @param dict
    1100 # @param indices_to_keep
    1101 # @return
    1102 # @note FIXME(dsg), turn this dict plus methods into a class?
    11031012def take_points(dict, indices_to_keep):
    11041013    dict = point_atts2array(dict)
     
    11121021    return dict
    11131022
    1114 ##
    1115 # @brief ??
    1116 # @param dict1 ??
    1117 # @param dict2 ??
    1118 # @return ??
    11191023def add_point_dictionaries(dict1, dict2):
    11201024    """
  • trunk/anuga_core/source/anuga/test_all.py

    r8129 r8150  
    2828
    2929
    30 ##
    31 # @brief List a string sequence on the screen in columns.
    32 # @param names Sequence of strings to list.
    33 # @param func Function to apply to each string in sequence.
    34 # @param col_width Force columns to this width (default calculated).
    35 # @param page_width Set displayable page width to this (default 132).
    3630def list_names(names, func=None, col_width=None, page_width=None):
    3731    # set defaults
     
    176170
    177171
    178 ##
    179 # @brief Check that the environment is sane.
    180 # @note Stops here if there is an error.
    181172def check_anuga_import():
    182173    try:
Note: See TracChangeset for help on using the changeset viewer.