Package atmopy :: Package observation :: Module location
[show private | hide private]
[frames | no frames]

Module atmopy.observation.location

Classes
Station Stores information about an observation station

Function Summary
sequence of Station filter_stations(filter_func, station_list)
Filters a station list in place according to the given filter.
Station sequence, 1D numpy.array sequence filter_stations_observations(filter_func, station_list, observations_list)
Filters a station list and corresponding observations list in place according to the given filter which takes a station and an observation array in argument.
1D numpy.array get_simulated_at_location(origin, delta, data, point)
Gets a time sequence of data at specified location using bilinear interpolation.
1D numpy.array get_simulated_at_location_closest(origins, deltas, data, point)
Gets a time sequence of data at specified location using closest neighbour values.
sequence of 1D numpy.array get_simulated_at_locations(origins, deltas, data, point_list)
Gets a list of time sequences of data at specified locations using bilinear interpolation.
sequence of 1D numpy.array get_simulated_at_locations_closest(origins, deltas, data, point_list)
Gets a list of time sequences of data at specified locations using closest neighbours.
1D numpy.array get_simulated_at_station(origins, deltas, data, station)
Gets a time sequence of data at specified station using bilinear interpolation.
1D numpy.array get_simulated_at_station_closest(origins, deltas, data, station)
Gets a time sequence of data at specified station using the closest data, that is, without interpolation.
sequence of 1D numpy.array get_simulated_at_stations(origins, deltas, data, stations)
Gets a list of time sequences of data at specified stations using bilinear interpolation.
Station get_station(station_list, station_name)
Gets a Station object given its name and a list of stations.
Boolean has_valid_latlon(station)
Tests if the given station has valid latitude and longitude (ie not null).
Boolean is_rural(station)
Tests if the station is of rural type.
Boolean is_urban(station)
Tests if the station is of urban type.
Boolean sequence map_stations(bool_func, station_list)
Returns a boolean list containing the return values of the given function applied on every station of the list.
Boolean sequence map_stations_observations(map_func, station_list, observations_list)
Returns a sequence containing the return values of the given function applied on every station and observation of the sequences.

Function Details

filter_stations(filter_func, station_list)

Filters a station list in place according to the given filter. To have a filter not acting in place, use the filter python builtin.
Parameters:
filter_func - The function used to filter the station list. This function must take a Station object as argument, and must return a boolean.
           (type=Python function)
station_list - sequence of stations to filter.
           (type=sequence of Station)
Returns:
Sequence of stations filtered in place.
           (type=sequence of Station)

filter_stations_observations(filter_func, station_list, observations_list)

Filters a station list and corresponding observations list in place according to the given filter which takes a station and an observation array in argument.
Parameters:
filter_func - The function used to filter the station sequence and observation sequence . This function must take a Station object and the corresponding observations sequence as argument, and must return a boolean.
           (type=Python function)
station_list - sequence of stations to filter.
           (type=sequence of Station)
observations_list - sequence of observations to filter.
           (type=sequence of 1D numpy.array)
Returns:
Stations sequence and observations sequence, filtered in place.
           (type=Station sequence, 1D numpy.array sequence)

get_simulated_at_location(origin, delta, data, point)

Gets a time sequence of data at specified location using bilinear interpolation.
Parameters:
origin - Grid origin, ie (t_min, y_min, x_min). Only y_min and x_min are used in this function.
           (type=(*, float, float) tuple)
delta - Grid deltas, ie (delta_t, delta_y, delta_x). Only delta_x and delta_y are used in this function.
           (type=(*, float, float) tuple)
data - 3D array of data to interpolate with T, Y, X dimensions.
           (type=3D numpy.array)
point - (latitude, longitude) of the point where the time sequence must be computed.
           (type=(float, float) tuple)
Returns:
Time sequence of data at given point.
           (type=1D numpy.array)

get_simulated_at_location_closest(origins, deltas, data, point)

Gets a time sequence of data at specified location using closest neighbour values.
Parameters:
origins - Grid origin, ie (t_min, y_min, x_min). Only y_min and x_min are used in this function.
           (type=(*, float, float) tuple)
deltas - Grid deltas, ie (delta_t, delta_y, delta_x). Only delta_x and delta_y are used in this function.
           (type=(*, float, float) tuple)
data - 3D array of data to interpolate with T, Y, X dimensions.
           (type=3D numpy.array)
point - (latitude, longitude) of the point where the time sequence must be computed.
           (type=(float, float) tuple)
Returns:
Time sequence of data at given point.
           (type=1D numpy.array)

get_simulated_at_locations(origins, deltas, data, point_list)

Gets a list of time sequences of data at specified locations using bilinear interpolation.
Parameters:
origins - Grid origin, ie (t_min, y_min, x_min). Only y_min and x_min are used in this function.
           (type=(*, float, float) tuple)
deltas - Grid deltas, ie (delta_t, delta_y, delta_x). Only delta_x and delta_y are used in this function.
           (type=(*, float, float) tuple)
data - 3D array of data to interpolate with T, Y, X dimensions.
           (type=3D numpy.array)
point_list - Sequence of (latitude, longitude) of the points where the time sequences must be computed.
           (type=sequence of (float, float) tuples)
Returns:
Sequence of time sequences of data at given points.
           (type=sequence of 1D numpy.array)

get_simulated_at_locations_closest(origins, deltas, data, point_list)

Gets a list of time sequences of data at specified locations using closest neighbours.
Parameters:
origins - Grid origin, ie (t_min, y_min, x_min). Only y_min and x_min are used in this function.
           (type=(*, float, float) tuple)
deltas - Grid deltas, ie (delta_t, delta_y, delta_x). Only delta_x and delta_y are used in this function.
           (type=(*, float, float) tuple)
data - 3D array of data to interpolate with T, Y, X dimensions.
           (type=3D numpy.array)
point_list - Sequence of (latitude, longitude) of the points where the time sequences must be computed.
           (type=sequence of (float, float) tuples)
Returns:
Sequence of time sequences of data at given points.
           (type=sequence of 1D numpy.array)

get_simulated_at_station(origins, deltas, data, station)

Gets a time sequence of data at specified station using bilinear interpolation.
Parameters:
origins - Grid origin, ie (t_min, y_min, x_min). Only y_min and x_min are used in this function.
           (type=(*, float, float) tuple)
deltas - Grid deltas, ie (delta_t, delta_y, delta_x). Only delta_x and delta_y are used in this function.
           (type=(*, float, float) tuple)
data - 3D array of data to interpolate with T, Y, X dimensions.
           (type=3D numpy.array)
station - station where the time sequence must be computed.
           (type=Station)
Returns:
Time sequence of data at given point.
           (type=1D numpy.array)

get_simulated_at_station_closest(origins, deltas, data, station)

Gets a time sequence of data at specified station using the closest data, that is, without interpolation.
Parameters:
origins - Grid origin, ie (t_min, y_min, x_min). Only y_min and x_min are used in this function.
           (type=(*, float, float) tuple)
deltas - Grid deltas, ie (delta_t, delta_y, delta_x). Only delta_x and delta_y are used in this function.
           (type=(*, float, float) tuple)
data - 3D array of data to interpolate with T, Y, X dimensions.
           (type=3D numpy.array)
station - station where the time sequence must be computed.
           (type=Station)
Returns:
Time sequence of data at given point.
           (type=1D numpy.array)

get_simulated_at_stations(origins, deltas, data, stations)

Gets a list of time sequences of data at specified stations using bilinear interpolation.
Parameters:
origins - Grid origin, ie (t_min, y_min, x_min). Only y_min and x_min are used in this function.
           (type=(*, float, float) tuple)
deltas - Grid deltas, ie (delta_t, delta_y, delta_x). Only delta_x and delta_y are used in this function.
           (type=(*, float, float) tuple)
data - 3D array of data to interpolate with T, Y, X dimensions.
           (type=3D numpy.array)
stations - Sequence of Station giving the stations where the time sequences must be computed.
           (type=sequence of (float, float) tuples)
Returns:
Sequence of time sequences of data at given points.
           (type=sequence of 1D numpy.array)

get_station(station_list, station_name)

Gets a Station object given its name and a list of stations.
Parameters:
station_list - Sequence of stations in which to search the given station name.
           (type=sequence of Station)
station_name - Name of the station to search for in the list.
           (type=string)
Returns:
The Station object corresponding to the station name in the given list of stations.
           (type=Station)

has_valid_latlon(station)

Tests if the given station has valid latitude and longitude (ie not null).
Parameters:
station - The station to test.
           (type=Station)
Returns:
True if station has not null lagitude or longitude , False otherwise (both null).
           (type=Boolean)

is_rural(station)

Tests if the station is of rural type.
Parameters:
station - The station to test as rural or not.
           (type=Station)
Returns:
True if station is marked as rural, False otherwise.
           (type=Boolean)

is_urban(station)

Tests if the station is of urban type.
Parameters:
station - The station to test as urban or not.
           (type=Station)
Returns:
True if station is marked as urban, False otherwise.
           (type=Boolean)

map_stations(bool_func, station_list)

Returns a boolean list containing the return values of the given function applied on every station of the list. This just calls the map builtin function.
Parameters:
bool_func - The function mapped to every station of the station_list.
           (type=Python function)
station_list - sequence of stations to apply bool_func to.
           (type=sequence of Station)
Returns:
A boolean sequence, results of bool_func applied to every stations of the list.
           (type=Boolean sequence)

map_stations_observations(map_func, station_list, observations_list)

Returns a sequence containing the return values of the given function applied on every station and observation of the sequences.
Parameters:
map_func - The function used to map the station sequence and observation sequence. This function must take a Station object and the corresponding observations array as argument, and must return a boolean.
           (type=Python function)
station_list - sequence of stations to map.
           (type=sequence of Station)
observations_list - sequence of observations to filter.
           (type=sequence of 1D numpy.array)
Returns:
A boolean sequence, results of map_func applied to every stations and observations of the sequences.
           (type=Boolean sequence)

Generated by Epydoc 2.1 on Tue May 19 10:37:13 2009 http://epydoc.sf.net