pangeo_fish.helpers.compute_diff#
- pangeo_fish.helpers.compute_diff(*, reference_model: Dataset, tag_log: Dataset, relative_depth_threshold: float, chunk_time=24, plot=False, save=False, target_root='.', storage_options: dict = None, **kwargs)#
Compute the difference between the reference model and the DST data of a tag. Optionally, the dataset can be saved and plotted.
- Parameters:
reference_model (
xarray.Dataset) – The reference modeltag_log (
xarray.Dataset) – The DST data. Hint: given a tag model, it corresponds to ``tag[“dst”].ds``relative_depth_threshold (
float) – Relative (seabed’s) depth threshold to deal with cases where the fish’s depths are lower than the seabed’s depthchunk_time (
int, default:24) – Chunk size for the time dimensionplot (
bool, default:False) – Whether to return a plot of the datasettarget_root (
str, default:".") – Root of the folder to save the .zarr array (under{target_root}/diff.zarr) Only used ifsave=Truestorage_options (
dict, optional) – Dictionary containing storage options for connecting to the S3 bucket. Only used ifsave=True
- Returns:
diff (
xarray.Dataset) – The difference between the biologging and field datafigure (
plt.FigureorNone) – The plot of diff, or None if plot=False