py_eddy_tracker.observations.network.NetworkObservations¶
-
class
py_eddy_tracker.observations.network.NetworkObservations(size=0, track_extra_variables=None, track_array_variables=0, array_variables=None, only_variables=None, raw_data=False)[source]¶ Bases:
py_eddy_tracker.observations.observation.EddiesObservationsMethods
add_fieldsAdd a new field.
add_rotation_typealign_onAlign the time indexes of two datasets.
appendMerge.
basic_formula_ellips_major_axisGive major axis in km with a given latitude
bins_stat- param str,array xname
variable to compute stats on
box_displayReturn value evenly spaced with few numbers
build_var_listcircle_contourSet contours as a circles from radius and center data.
coherenceCheck coherence between two datasets.
compare_unitsconcatenatecontainsReturn index of contour which contain (x,y)
copycopy_data_to_zarrCopy with buffer for zarr.
cost_functionReturn the cost function between two obs.
cost_function_common_areaHow does it work on x bound ?
create_variablecreate_variable_zarrdisplayPlot the speed and effective (dashed) contour of the eddies
Must be call on only one network
distanceUse haversine distance for distance matrix between every self and other eddies.
extract_with_areaExtract geographically with a bounding box.
Extract a subset of observations.
filled- param matplotlib.axes.Axes ax
matplotlib axe used to draw
first_obsGet first obs of each trajectory.
fixed_ellipsoid_maskformat_labelfrom_netcdfBuild a NetworkObservations object with Group dataset and indexs
from_zarrget_infosgrid_box_statGet percentile of eddies in each bin
grid_countCount the eddies in each bin (use all pixels in each contour)
grid_statReturn the mean of the eddies’ variable in each bin
histBuild histograms.
indexReturn obs from self at the index.
insert_observationsInsert other obs in self at the index.
insideTrue for each point inside the effective contour of an eddy
interninterp_gridInterpolate a grid on a center or contour with mean, min or max method
is_convexGet flag of the eddy’s convexity
iter_onYield observation group for each bin.
last_obsGet Last obs of each trajectory.
load_fileLoad the netcdf or the zarr file.
load_from_netcdfLoad data from netcdf.
load_from_zarrLoad data from zarr.
mask_functionmatchReturn index and score computed on the effective contour.
mergeMerge two datasets.
merge_filtersCompute an intersection between all filters after to evaluate each of them
needed_variablenetcdf_create_dimensionsnew_likeobs_dimensionRaise a warning or error? if there are more than one network
parse_varnameThis function will draw path of each trajectory
post_process_linkpropagateFilled virtual obs (C).
resetscatterScatter data.
Must be call on only one network
set_global_attr_netcdfset_global_attr_zarrshifted_ellipsoid_degrees_masksolve_conflictsolve_firstsolve_functionsolve_simultaneousWrite something (TODO)
to_netcdfto_zarrtrackingTrack obs between self and other
write_fileWrite a netcdf or zarr with eddy obs.
zarr_dimensionAttributes
COLORSELEMENTSNB_COLORSarray_variablesdtypeReturn dtype to build numpy array.
Return all the names of the variables.
global_attrnb_daysReturn period days cover by dataset
obsReturn observations.
observationsonly_variablesperiodGive the time coverage
period_raw_datashapesign_legendsign_typetrack_array_variablestrack_extra_variablestracks-
NOGROUP= 0¶
-
property
elements¶ Return all the names of the variables.
-
extract_with_mask(mask)[source]¶ Extract a subset of observations.
- Parameters
mask (array(bool)) – mask to select observations
- Returns
same object with selected observations
- Return type
self
-
classmethod
from_split_network(group_dataset, indexs, **kwargs)[source]¶ Build a NetworkObservations object with Group dataset and indexs
- Parameters
group_dataset (TrackEddiesObservations) – Group dataset
indexs – result from split_network
return NetworkObservations
-
plot(ax, ref=None, **kwargs)[source]¶ This function will draw path of each trajectory
- Parameters
ax (matplotlib.axes.Axes) – ax to draw
ref (float,int) – if defined, all coordinates will be wrapped with ref like west boundary
kwargs (dict) – keyword arguments for Axes.plot
- Returns
a list of matplotlib mappables