From 5f3a0d27bc5cdb19a3c7b7973d83474903eb2339 Mon Sep 17 00:00:00 2001 From: Datseris Date: Wed, 5 Jan 2022 16:34:09 +0100 Subject: [PATCH] add the `gnv` and selectors to docs --- docs/src/index.md | 11 ++++++++++- src/core/coredefs.jl | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 68bb3de1..4ea41ff7 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -56,6 +56,7 @@ where in this averaging process each data point is weighted by the cosine of its You can create a `ClimArray` yourself, or you can load data from an `.nc` file with CF-conventions, see [NetCDF IO](@ref). ```@docs ClimArray(::AbstractArray, ::Tuple) +gnv ``` It is strongly recommended to use the dimensions we export (because we dispatch on them and use their information): ```@example @@ -72,4 +73,12 @@ DimensionalData ``` ## Available selectors -**TODO** \ No newline at end of file +| Selector | Description | +| :---------------------- | :------------------------------------------------------------------ | +| [`At(x)`] | get the index exactly matching the passed in value(s) | +| [`Near(x)`] | get the closest index to the passed in value(s) | +| [`Contains(x)`] | get indices where the value x falls within an interval | +| [`Where(f)`] | filter the array axis by a function of the dimension index values. | +| [`a..b`] | get all indices between two values, inclusively. | +| [`OpenInterval(a, b)`] | get all indices between `a` and `b`, exclusively. | +| [`Interval{A,B}(a, b)`] | get all indices between `a` and `b`, as `:closed` or `:open`. | diff --git a/src/core/coredefs.jl b/src/core/coredefs.jl index ca07ee19..82613fff 100644 --- a/src/core/coredefs.jl +++ b/src/core/coredefs.jl @@ -150,7 +150,8 @@ all basic handling of `ClimArray` is offered by `DimensionalData` (see below). `ClimArray` is created by passing in standard array data `A` and a tuple of dimensions `dims`. See [`ncread`](@ref) to automatically create a `ClimArray` -from a .nc file. +from a .nc file. For obtaining the raw numeric values of a `ClimArray` or any of its +dimensions, use the function [`gnv`](@ref). ## Example ```julia