py_eddy_tracker.observations.groups.GroupEddiesObservations¶
- class py_eddy_tracker.observations.groups.GroupEddiesObservations(size=0, track_extra_variables=None, track_array_variables=0, array_variables=None, only_variables=None, raw_data=False)[source]¶
Bases:
EddiesObservations,ABCMethods
add_fieldsAdd a new field.
add_rotation_typealign_onAlign the variable indices of two datasets.
appendMerge.
basic_formula_ellipse_major_axisGive major axis in km with a given latitude
bins_stat- param str,array xname
variable to compute stats on
box_displayReturn values evenly spaced with few numbers
build_var_listcircle_contourSet contours as circles from radius and center data.
coherenceCheck coherence between two datasets.
compare_unitsconcatenatecontainsReturn index of contour containing (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_particlesCreate particles inside contour (Default : speed contour).
create_variablecreate_variable_zarrdisplayPlot the speed and effective (dashed) contour of the eddies
display_colorPlot colored contour of eddies
distanceUse haversine distance for distance matrix between every self and other eddies.
empty_datasetextract_with_areaExtract geographically with a bounding box.
extract_with_maskExtract a subset of observations.
field_tableProduce description table of the fields available in this object
_summary_
filled- param matplotlib.axes.Axes ax
matplotlib axe used to draw
Fill selected values by interpolation
first_obsGet first obs of each trajectory.
fixed_ellipsoid_maskformat_labelfrom_arrayfrom_netcdffrom_zarrget_colorReturn colors as a cyclic list
get_filters_zarrGet filters to store in zarr for known variable
get_infosFind indexes where observations are missing
grid_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 given index.
Insert virtual observations on segments where observations are missing
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.
Find tracks that exist at date date and lasted at least nb_days after.
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_from_polygonsReturn mask for all observations in one of polygons list
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
Copy local result in merged result with global indexation
needed_variablenetcdf_create_dimensionsnew_likeobs_dimensionparse_varnameSelect particles within eddies, advect them, return target observation and associated percentages
post_process_linkpropagateFill virtual obs (C).
re_reference_indexShift index with ref
remove_fieldsCopy with fields listed remove
resetscatterScatter data.
set_global_attr_netcdfset_global_attr_zarrshifted_ellipsoid_degrees_masksolve_conflictsolve_firstsolve_functionsolve_simultaneousDeduce link from cost matrix.
time_sub_sampleTime sub sampling
to_netcdfto_zarrtrackingTrack obs between self and other
write_fileWrite a netcdf or zarr with eddy obs.
zarr_dimensionAttributes
COLORSELEMENTSNB_COLORSdtypeReturn dtype to build numpy array.
elementsReturn all the names of the variables.
fieldsglobal_attrnb_daysReturn period in days covered by the dataset
obsReturn observations.
periodGive the time coverage.
shapesign_legendtracks- array_variables¶
- classmethod fill_coherence(network, i_targets, percents, i_origin, i_end, start_intern, end_intern, **kwargs)[source]¶
_summary_
- filled_by_interpolation(mask)[source]¶
Fill selected values by interpolation
- Parameters
mask (array(bool)) – True if must be filled by interpolation
- keep_tracks_by_date(date, nb_days)[source]¶
Find tracks that exist at date date and lasted at least nb_days after.
- Parameters
If nb_days is negative, it searches a track that exists at the date, but existed at least nb_days before the date
- static merge_particle_result(i_targets, percents, i_local_targets, local_percents, i_origin, i_end)[source]¶
Copy local result in merged result with global indexation
- Parameters
i_targets (array) – global target
percents (array) –
i_local_targets (array) – local index target
local_percents (array) –
i_origin (array) – indices of origins
i_end (array) – indices of ends
- observations¶
- only_variables¶
- particle_candidate_atlas(cube, space_step, dt, start_intern=False, end_intern=False, callback_coherence=None, finalize_coherence=None, **kwargs)[source]¶
Select particles within eddies, advect them, return target observation and associated percentages
- Parameters
cube (GridCollection) – GridCollection with speed for particles
space_step (float) – step between 2 particles
dt (int) – duration of advection
start_intern (bool) – Use intern or extern contour at injection, defaults to False
end_intern (bool) – Use intern or extern contour at end of advection, defaults to False
kwargs (dict) – dict of params given to advection
callback_coherence (func) – if None we will use cls.fill_coherence
finalize_coherence (func) – to apply on results of callback_coherence
- Return (np.array,np.array)
return target index and percent associate
- period_¶
- raw_data¶
- sign_type¶
- track_array_variables¶
- track_extra_variables¶