py_eddy_tracker.tracking.Correspondances

class py_eddy_tracker.tracking.Correspondances(datasets, virtual=0, class_method=None, class_kw=None, previous_correspondance=None, memory=False)[source]

Bases: list

Object to store correspondances And run tracking

Initiate tracking

Parameters:
  • datasets (list(str)) – A sorted list of filename which contains eddy observations to track

  • class_method (class) – A class which tell how to track

  • class_kw (dict) – keyword argument to setup class

  • previous_correspondance (Correspondances) – A previous correspondance object if you want continue tracking

  • memory (bool) – identification file are load in memory before to be open with netcdf

Methods

append

Append object to the end of the list.

clear

Remove all items from list.

copy

Return a shallow copy of the list.

count

Return number of occurrences of value.

extend

Extend list by appending elements from the iterable.

from_netcdf

get_unused_data

Add in track object all the observations which aren't selected Returns: Unused Eddies

id_generator

Generation id and incrementation

index

Return first index of value.

insert

Insert object before index.

load

load_compatible

load_state

longer_than

Remove from correspondance table all association for shorter eddies than size_min

merge

Merge all the correspondance in one array with all fields

merge_correspondance

pop

Remove and return item at index (default last).

prepare_merging

recense_dead_id_to_extend

Recense dead id to extend in virtual observation

remove

Remove first occurrence of value.

reset_dataset_cache

reverse

Reverse IN PLACE.

save

shorter_than

Remove from correspondance table all association for longer eddies than size_max

sort

Sort the list in ascending order and return None.

store_correspondance

Storing correspondance in an array

swap_dataset

Swap to next dataset

to_netcdf

track

Run tracking

Attributes

ID_DTYPE

N_DTYPE

UINT32_MAX

VIRTUAL_DTYPE

period

To rethink

ID_DTYPE = 'u4'
N_DTYPE = 'u2'
UINT32_MAX = 4294967295
VIRTUAL_DTYPE = 'u1'
append(*args, **kwargs)[source]

Append object to the end of the list.

classmethod from_netcdf(handler)[source]
get_unused_data(raw_data=False)[source]

Add in track object all the observations which aren’t selected Returns: Unused Eddies

id_generator(nb_id)[source]

Generation id and incrementation

classmethod load(filename)[source]
load_compatible(filename)[source]
load_state()[source]
longer_than(size_min)[source]

Remove from correspondance table all association for shorter eddies than size_min

merge(until=-1, raw_data=True)[source]

Merge all the correspondance in one array with all fields

merge_correspondance(other)[source]
property period

To rethink

Returns: period coverage by obs

prepare_merging()[source]
recense_dead_id_to_extend()[source]

Recense dead id to extend in virtual observation

reset_dataset_cache()[source]
save(filename, dict_completion=None)[source]
shorter_than(size_max)[source]

Remove from correspondance table all association for longer eddies than size_max

store_correspondance(i_previous, i_current, nb_real_obs, association_cost)[source]

Storing correspondance in an array

swap_dataset(dataset, *args, **kwargs)[source]

Swap to next dataset

to_netcdf(handler)[source]
track()[source]

Run tracking