Ignore:
Timestamp:
Jun 2, 2010, 1:15:38 PM (14 years ago)
Author:
hudson
Message:

File tests passing OK - extra module for .urs files.

File:
1 edited

Legend:

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

    r7760 r7766  
     1"""
     2    Read a mux2 file.
     3"""
     4
    15from anuga.utilities.numerical_tools import ensure_numeric
    26import numpy as num     
    37       
    4  ################################################################################
     8################################################################################
    59# READ MUX2 FILES line of points
    610################################################################################
     11
     12WAVEHEIGHT_MUX_LABEL = '-z-mux'
     13EAST_VELOCITY_LABEL =  '-e-mux'
     14NORTH_VELOCITY_LABEL =  '-n-mux'
    715
    816WAVEHEIGHT_MUX2_LABEL = '-z-mux2'
     
    4351    # Convert verbose to int C flag
    4452    if verbose:
    45         verbose=1
     53        verbose = 1
    4654    else:
    47         verbose=0
     55        verbose = 0
    4856
    4957    if weights is None:
     
    102110    longitudes = num.zeros(number_of_selected_stations, num.float)
    103111    elevation = num.zeros(number_of_selected_stations, num.float)
    104     quantity = num.zeros((number_of_selected_stations, parameters_index), num.float)
     112    quantity = num.zeros((number_of_selected_stations, parameters_index), \
     113                                                    num.float)
    105114
    106115    starttime = 1e16
     
    116125
    117126
    118 ##
    119 # @brief ??
    120 # @param mux_times ??
    121 # @param mint ??
    122 # @param maxt ??
    123 # @return ??
    124 def read_time_from_mux(mux_times, mint, maxt):
    125     """
    126     """
    127127
    128     if mint == None:
    129         mux_times_start_i = 0
    130     else:
    131         mux_times_start_i = num.searchsorted(mux_times, mint)
    132 
    133     if maxt == None:
    134         mux_times_fin_i = len(mux_times)
    135     else:
    136         maxt += 0.5 # so if you specify a time where there is
    137                     # data that time will be included
    138         mux_times_fin_i = num.searchsorted(mux_times, maxt)
    139 
    140     return mux_times_start_i, mux_times_fin_i
    141 
    142 
    143        
Note: See TracChangeset for help on using the changeset viewer.