Skip to content

Commit

Permalink
change examples to relative paths
Browse files Browse the repository at this point in the history
thanks @normanrz
  • Loading branch information
bogovicj committed Aug 28, 2024
1 parent d311848 commit b5ed81a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions latest/examples/transformations/bijection.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"coordinateTransformations" : [
{
"type": "bijection",
"forward": { "type" : "coordinates", "path" : "/forward_coordinates" },
"inverse": { "type" : "coordinates", "path" : "/inverse_coordinates" },
"forward": { "type" : "coordinates", "path" : "forward_coordinates" },
"inverse": { "type" : "coordinates", "path" : "inverse_coordinates" },
"input": "src",
"output": "tgt"
}
Expand Down
4 changes: 2 additions & 2 deletions latest/examples/transformations/bijection_verbose.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "bijection",
"forward": { "type" : "coordinates", "path" : "/forward_coordinates", "input" : "src", "output" : "tgt" },
"inverse": { "type" : "coordinates", "path" : "/inverse_coordinates", "input" : "tgt", "output" : "src" },
"forward": { "type" : "coordinates", "path" : "forward_coordinates", "input" : "src", "output" : "tgt" },
"inverse": { "type" : "coordinates", "path" : "inverse_coordinates", "input" : "tgt", "output" : "src" },
"input": "src",
"output": "tgt"
}
5 changes: 4 additions & 1 deletion latest/examples/transformations/inverseOf.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"coordinateTransformations" : [
{
"type": "inverseOf",
"transformation" : { "type": "displacements", "path": "/path/to/displacements" },
"transformation" : {
"type": "displacements",
"path": "path/to/displacements"
},
"input" : "moving",
"output" : "fixed"
}
Expand Down
31 changes: 14 additions & 17 deletions latest/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,11 @@ Every array has a default coordinate system whose parameters need not be explici
in the container, its axes have `"type":"array"`, are unitless, and have default "name"s. The ith axis has `"name":"dim_i"`
(these are the same default names used by [xarray](https://docs.xarray.dev/en/stable/user-guide/terminology.html)).
<div class=example>
For example, a 3D array at path `/my/data/array` defines the coordinate system:
For example, a 3D array at path `my/data/array` defines the coordinate system:

```json
{
"name" : "/my/data/array",
"name" : "my/data/array",
"axes" : [
{"name": "dim_0", "type": "array"},
{"name": "dim_1", "type": "array"},
Expand All @@ -491,7 +491,7 @@ chunks. As described in the [zarr array metadata](https://zarr.readthedocs.io/en
the last dimension of an array in "C" order are stored contiguously on disk or in-memory when directly loaded.

<div class=example>
For example, if `/my/data/array/.zarray` contains:
For example, if `my/data/array/.zarray` contains:

```json
{
Expand Down Expand Up @@ -655,7 +655,7 @@ details).

<div class=example>

The sequence transformation's input corresponds to an array coordinate system at path "/my/array".
The sequence transformation's input corresponds to an array coordinate system at path "my/array".

```json
"coordinateSystems" : [
Expand All @@ -674,7 +674,7 @@ The sequence transformation's input corresponds to an array coordinate system at
},
{
"type" : "sequence",
"input" : "/my/array",
"input" : "my/array",
"output" : "outSeq",
"transformations" : [
{ "type": "scale", "scale" : [ 0.5, 0.6 ] },
Expand All @@ -687,7 +687,7 @@ The sequence transformation's input corresponds to an array coordinate system at
"output" : "outInv",
"transformation" : {
"type": "displacements",
"path": "/path/to/displacements"
"path": "path/to/displacements"
}
},
{
Expand Down Expand Up @@ -726,7 +726,7 @@ transformation type, for example:
"type": "inverseOf",
"transformation" : {
"type": "displacements",
"path": "/path/to/displacements",
"path": "path/to/displacements",
}
}
```
Expand Down Expand Up @@ -1021,7 +1021,6 @@ transformation (if it exists).


<div class=example>
For example

<pre class=include-code>
path: examples/transformations/inverseOf.json
Expand Down Expand Up @@ -1098,7 +1097,7 @@ In this example, the array located at `"displacementField"` MUST have three dime
correspond to an axis with `type : displacement`, the other two dimensions MUST be axes that are identical to
the axes of the `"in"` coordinate system.

```
```json
"coordinateSystems" : [
{ "name" : "in", "axes" : [{"name" : "y"}, {"name":"x"}] },
{ "name" : "out", "axes" : [{"name" : "y"}, {"name":"x"}] }
Expand All @@ -1115,7 +1114,7 @@ the axes of the `"in"` coordinate system.

The array at location should have a coordinate system such as:

```
```json
"coordinateSystems" : [
{ "name" : "in", "axes" : [
{"name":"y"}, {"name":"x"},
Expand Down Expand Up @@ -1173,7 +1172,7 @@ For `displacements`:
* `input` and `output` MUST have an equal number of dimensions.

For example, in 1D:
```
```json
{
"name" : "a coordinate field transform",
"type": "coordinates",
Expand All @@ -1187,7 +1186,7 @@ For example, in 1D:
where we assume input spaces "i" and "x" are defined elsewhere.
Example metadata for the array data at path `coordinates` above:

```
```json
{
"coordinateSystems" : [
{
Expand Down Expand Up @@ -1218,7 +1217,7 @@ x =


A 1D example displacement field:
```
```json
{
"name" : "a displacement field transform",
"type": "displacements",
Expand All @@ -1232,11 +1231,11 @@ A 1D example displacement field:
where we assume input spaces "i" and "x" are defined elsewhere.
Example metadata for the array data at path `displacements` above:

```
```json
{
"coordinateSystems" : [
{
"name" : "a coordinate field transform",
"name" : "a displacement field transform",
"axes" : [
{ "name": "x", "type": "space", "unit" : "nanometer" },
{ "name": "d", "type": "displacement", "discrete": true }
Expand Down Expand Up @@ -1342,8 +1341,6 @@ appropriate dimensionality.

<div class=example>

For example

<pre class=include-code>
path: examples/transformations/bijection.json
highlight: json
Expand Down

0 comments on commit b5ed81a

Please sign in to comment.