Refactor inputs to streamline API across functions #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New features
phase_tides
function for calculating tidal phases ("low-flow", high-flow", "high-ebb", "low-ebb") for each tide height in a timeseries. Ebb and low phases are calculated by running theeo_tides.model.model_tides
function twice, once for the requested timesteps, and again after subtracting a small time offset (by default, 15 minutes). If tides increased over this period, they are assigned as "flow"; if they decreased, they are assigned as "ebb". Tides are considered "high" if equal or greater than 0 metres tide height, otherwise "low".Major changes
xr.DataArray
orxr.Dataset
orodc.geo.geobox.GeoBox
; if an xarray object is passed, it must have a"time"
dimension; if GeoBox is passed, time must be provided by thetime
parameter.ds
param in all satellite data functions (tag_tides
,pixel_tides
,tide_stats
,pixel_tides
) has been renamed to a more generic namedata
(to account for now accepting eitherxarray.Dataset
,xarray.DataArray
or aodc.geo.geobox.GeoBox
inputs).time
parameters now accept inputs innp.ndarray,
pd.DatetimeIndex` or pd.Timestamp formatmodel_tides
now uses default cropping approach frompyTMD
, rather than applying a bespoke 1 degree buffer around the selected analysis areamodel_tides
refactored to use simpler approach to loading tide consistuents enabled inpyTMD==2.1.7