Package atmopy :: Package stat :: Module compute
[show private | hide private]
[frames | no frames]

Module atmopy.stat.compute

Function Summary
(2D-array, 1D-array) collect(sim, obs, dates, stations, period, stations_out)
Collects data (observations and simulated concentrations) over a given period and at a given set of stations.
dict of array compute_stat(sim, obs, measures, dates, stations, period, stations_out, cutoff)
Computes a set of statistical measures for one simulation or for a set of simulations.
dict of array compute_stat_station(sim, obs, measures, dates, stations, period, stations_out, cutoff)
Computes a set of statistical measures for one simulation or for a set of simulations, at given stations.
(list of datetime, dict of array) compute_stat_step(dates, sim, obs, obs_type, measures, stations, period, stations_out, ratio, cutoff)
Computes a set of statistical measures for one simulation or for a set of simulations, and for all time step.

Function Details

collect(sim, obs, dates=None, stations=None, period=None, stations_out=None)

Collects data (observations and simulated concentrations) over a given period and at a given set of stations.
Parameters:
sim - The list (indexed by simulations) of lists (indexed by stations) of simulated concentrations, or the list (indexed by stations) of simulated concentrations.
           (type=list of list of 1D-array, or list of 1D-array.)
obs - The list (indexed by stations) of observed concentrations.
           (type=list of 1D-array)
dates - The list (indexed by stations) of list of dates at which the data is defined. Both observations and simulated data (of every ensemble) are assumed to be designed at the same dates.
           (type=list of list of datetime)
stations - The stations at which the concentrations are given.
           (type=list of Station)
period - The period where to select the concentrations (bounds included). A single date may be provided. If a list is provided, the period is defined by the first and the last dates in the list.
           (type=2-tuple of datetime, or datetime, or list of datetime)
stations_out - The station(s) at which the concentrations are selected.
           (type=list of Station, or Station)
Returns:
The simulated concentrations in a 2D-array (simulations x concentrations) and the corresponding observed concentrations in a 1D-array.
           (type=(2D-array, 1D-array))

compute_stat(sim, obs, measures, dates=None, stations=None, period=None, stations_out=None, cutoff=None)

Computes a set of statistical measures for one simulation or for a set of simulations.
Parameters:
sim - The list (indexed by simulations) of lists (indexed by stations) of simulated concentrations, or the list (indexed by stations) of simulated concentrations.
           (type=list of list of 1D-array, or list of 1D-array.)
obs - The list (indexed by stations) of observed concentrations.
           (type=list of 1D-array)
dates - The list (indexed by stations) of list of dates at which the data is defined. Both observations and simulated data (of every ensemble) are assumed to be designed at the same dates. 'dates' may also be a list of datetime in case there is a single station. If 'dates' is set to None, all dates are included.
           (type=list of list of datetime, or list of datetime)
stations - The station(s) at which the concentrations are given. If it is set to None, all stations will be included.
           (type=list of Station, or Station)
period - The period where to select the concentrations (bounds included). A single date may be provided. If 'period' is set to None, all input dates are included. If a list is provided, the period is defined by the first and the last dates in the list.
           (type=2-tuple of datetime, or datetime, or list of datetime)
stations_out - The station(s) at which the concentrations are selected. If 'stations_out' is set to None, all input dates are included.
           (type=list of Station, or Station, or string)
cutoff - The value below (or equal) which data is discarded. This filters 'obs' and corresponding 'sim' values. Nothing is filtered if 'cutoff' is set to None.
           (type=float, or None)
Returns:
The statistical measures are a key of the output dictionary. Each value is a 1D-array (indexed by simulations).
           (type=dict of array)

compute_stat_station(sim, obs, measures, dates=None, stations=None, period=None, stations_out=None, cutoff=None)

Computes a set of statistical measures for one simulation or for a set of simulations, at given stations.
Parameters:
sim - The list (indexed by simulations) of lists (indexed by stations) of simulated concentrations, or the list (indexed by stations) of simulated concentrations.
           (type=list of list of 1D-array, or list of 1D-array.)
obs - The list (indexed by stations) of observed concentrations.
           (type=list of 1D-array)
dates - The list (indexed by stations) of list of dates at which the data is defined. Both observations and simulated data (of every ensemble) are assumed to be designed at the same dates. 'dates' may also be a list of datetime in case there is a single station. If 'dates' is set to None, all dates are included.
           (type=list of list of datetime, or list of datetime)
stations - The station(s) at which the concentrations are given. If it is set to None, all stations will be included.
           (type=list of Station, or Station)
period - The period where to select the concentrations (bounds included). A single date may be provided. If 'period' is set to None, all input dates are included. If a list is provided, the period is defined by the first and the last dates in the list.
           (type=2-tuple of datetime, or datetime, or list of datetime)
stations_out - The station(s) at which the concentrations are selected. If 'stations_out' is set to None, all input dates are included.
           (type=list of Station, or Station, or string)
cutoff - The value below (or equal) which data is discarded. This filters 'obs' and corresponding 'sim' values. Nothing is filtered if 'cutoff' is set to None.
           (type=float, or None)
Returns:
The statistical measures are a key of the output dictionary. Each value is a (simulation x station)-array.
           (type=dict of array)

compute_stat_step(dates, sim, obs, obs_type, measures, stations=None, period=None, stations_out=None, ratio=0.0, cutoff=None)

Computes a set of statistical measures for one simulation or for a set of simulations, and for all time step.
Parameters:
dates - The list (indexed by stations) of list of dates at which the data is defined. Both observations and simulated data (of every ensemble) are assumed to be designed at the same dates. 'dates' may also be a list of datetime in case there is a single station.
           (type=list of list of datetime, or list of datetime)
sim - The list (indexed by simulations) of lists (indexed by stations) of simulated concentrations, or the list (indexed by stations) of simulated concentrations.
           (type=list of list of 1D-array, or list of 1D-array.)
obs - The list (indexed by stations) of observed concentrations.
           (type=list of 1D-array)
obs_type - The type of the concentrations: "hourly" or "peak".
           (type=string)
stations - The station(s) at which the concentrations are given. If it is set to None, all stations will be included.
           (type=list of Station, or Station)
period - The period where to select the concentrations (bounds included). A single date may be provided. If 'period' is set to None, all input dates are included. If a list is provided, the period is defined by the first and the last dates in the list.
           (type=2-tuple of datetime, or datetime, or list of datetime)
stations_out - The station(s) at which the concentrations are selected. If 'stations_out' is set to None, all input dates are included.
           (type=list of Station, or Station, or string)
ratio - Minimum ratio of the number of available observations (per step) and the number of stations. A step at which the actual ratio is below this minimum is discarded.
           (type=float)
cutoff - The value below (or equal) which data is discarded. This filters 'obs' and corresponding 'sim' values. Nothing is filtered if 'cutoff' is set to None.
           (type=float, or None)
Returns:
The statistical measures are a key of the output dictionary. Each value is a (simulation x step)-array. The dates associated with the steps with enough measurements are returned in a list.
           (type=(list of datetime, dict of array))

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