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.EddiesObservations

Methods

add_fields

Add a new field.

add_rotation_type

align_on

Align the time indexes of two datasets.

append

Merge.

basic_formula_ellips_major_axis

Give major axis in km with a given latitude

bins_stat

param str,array xname

variable to compute stats on

birth_event

box_display

Return value evenly spaced with few numbers

build_var_list

circle_contour

Set contours as a circles from radius and center data.

coherence

Check coherence between two datasets.

compare_units

concatenate

connexions

contains

Return index of contour which contain (x,y)

copy

copy_data_to_zarr

Copy with buffer for zarr.

cost_function

Return the cost function between two obs.

cost_function_common_area

How does it work on x bound ?

create_variable

create_variable_zarr

death_event

display

Plot the speed and effective (dashed) contour of the eddies

display_timeline

Must be call on only one network

distance

Use haversine distance for distance matrix between every self and other eddies.

event_timeline

extract_event

extract_segment

extract_with_area

Extract geographically with a bounding box.

extract_with_mask

Extract a subset of observations.

filled

param matplotlib.axes.Axes ax

matplotlib axe used to draw

first_obs

Get first obs of each trajectory.

fixed_ellipsoid_mask

format_label

from_netcdf

from_split_network

Build a NetworkObservations object with Group dataset and indexs

from_zarr

fully_connected

get_infos

grid_box_stat

Get percentile of eddies in each bin

grid_count

Count the eddies in each bin (use all pixels in each contour)

grid_stat

Return the mean of the eddies’ variable in each bin

hist

Build histograms.

index

Return obs from self at the index.

infos

insert_observations

Insert other obs in self at the index.

insert_virtual

inside

True for each point inside the effective contour of an eddy

intern

interp_grid

Interpolate a grid on a center or contour with mean, min or max method

is_convex

Get flag of the eddy’s convexity

iter_on

Yield observation group for each bin.

last_obs

Get Last obs of each trajectory.

load_file

Load the netcdf or the zarr file.

load_from_netcdf

Load data from netcdf.

load_from_zarr

Load data from zarr.

mask_function

match

Return index and score computed on the effective contour.

median_filter

merge

Merge two datasets.

merge_filters

Compute an intersection between all filters after to evaluate each of them

merging_event

needed_variable

netcdf_create_dimensions

new_like

obs_dimension

obs_relative_order

only_one_network

Raise a warning or error? if there are more than one network

parse_varname

plot

This function will draw path of each trajectory

post_process_link

propagate

Filled virtual obs (C).

relative

remove_dead_branch

reset

scatter

Scatter data.

scatter_timeline

Must be call on only one network

segment_relative_order

segment_track_array

set_global_attr_netcdf

set_global_attr_zarr

shifted_ellipsoid_degrees_mask

solve_conflict

solve_first

solve_function

solve_simultaneous

Write something (TODO)

spliting_event

to_netcdf

to_zarr

tracking

Track obs between self and other

write_file

Write a netcdf or zarr with eddy obs.

zarr_dimension

Attributes

COLORS

ELEMENTS

NB_COLORS

NOGROUP

array_variables

dtype

Return dtype to build numpy array.

elements

Return all the names of the variables.

global_attr

nb_days

Return period days cover by dataset

obs

Return observations.

observations

only_variables

period

Give the time coverage

period_

raw_data

shape

sign_legend

sign_type

track_array_variables

track_extra_variables

tracks

NOGROUP = 0
birth_event()[source]
connexions()[source]
death_event()[source]
display_timeline(ax, event=True, field=None, method=None)[source]

Must be call on only one network

property elements

Return all the names of the variables.

event_timeline(ax, field=None, method=None)[source]
extract_event(indices)[source]
extract_segment(segments)[source]
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

return NetworkObservations

fully_connected()[source]
infos(label='')[source]
insert_virtual()[source]
median_filter(half_window, xfield, yfield, inplace=True)[source]
merging_event()[source]
obs_relative_order(i_obs)[source]
only_one_network()[source]

Raise a warning or error? if there are more than one network

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

relative(i_obs, order=2, direct=True, only_past=False, only_future=False)[source]
remove_dead_branch(nobs=3)[source]
scatter_timeline(ax, name, factor=1, event=True, **kwargs)[source]

Must be call on only one network

segment_relative_order(seg_origine)[source]
segment_track_array()[source]
spliting_event()[source]