Skip to content

Commit

Permalink
Deployed 5f1775d with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jimfinnis committed Jul 16, 2024
1 parent fb275be commit 211bab6
Show file tree
Hide file tree
Showing 16 changed files with 833 additions and 52 deletions.
15 changes: 12 additions & 3 deletions autodocs/expr/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ <h2 id="description">Description</h2>
set the node to the new expression and perform it. The input can accept any type of data
and the output type is determined when the node is run.</p>
<p>The four inputs are assigned to the variables a, b, c, and d. They are typically (but not necessarily) images
or scalar values.</p>
or numeric values.</p>
<p>The standard operators +,/,*,- and ^ all have their usual meanings. When applied to images they work in
a pixel-wise fashion, so if <strong>a</strong> is an image, <strong>2*a</strong> will double the brightness. If <strong>b</strong> is also an image,
<strong>a+b</strong> will add the two images, pixel by pixel. There are two non-standard operators: <strong>.</strong> for properties
Expand Down Expand Up @@ -251,7 +251,7 @@ <h3>Image/numeric operators:</h3>
</tr>
</tbody>
</table>
<p>All operators can act on images and scalars (numeric values),
<p>All operators can act on images, 1D vectors and scalars
with the exception of <strong>.</strong> and <strong>$</strong> which have images on the left-hand side and identifiers
or integers on the right-hand side.</p>
<p>Those operators marked with <strong>(can act on ROIs)</strong> can also act on pairs of ROIs (regions of interest, see below).</p>
Expand Down Expand Up @@ -293,11 +293,18 @@ <h3>Binary operations on image pairs</h3>
</table>
<p>This probably isn't what you wanted. Note that this is obviously not an issue when an operation is being performed
on bands in a single image.</p>
<h3>binary operators on images with regions of interest</h3>
<h3>Binary operators on images with regions of interest</h3>
<p>If one of the two images has an ROI, the operation is only performed on that ROI; the remaining area of output is
taken from the image without an ROI. If both images have an ROI an error will result - it is likely that this
is a mistake on the user's part, and doing something more "intelligent" might conceal this. The desired result
can be achieved using expr nodes on ROIs and an importroi node.</p>
<h3>Operations with vectors</h3>
<p>Some functions can generate vectors, such as <code>mean</code> for getting the means of the bands, and <code>vec</code> for generating
vectors by hand.</p>
<p>If an image is used in a binary operation with a vector on the other side, the vector must have the same number of
elements as there are bands in the image. The operation will be performed on each band. Consider a 3-band image
and the vector <code>[2,3,4]</code>. If we multiply them, the result will an image with the first band multiplied by 2,
the second band multiplied by 3, and the third band multiplied by 4. </p>
<h3>Operators on ROIs themselves (as opposed to images with ROIs)</h3>
<table>
<thead>
Expand Down Expand Up @@ -373,6 +380,8 @@ <h3>Band extraction</h3>
</tr>
</tbody>
</table>
<p>Band extraction can also be performed with vectors provided the vector elements are numeric (i.e. wavelengths):
<code>a $ vec(640,550,440)</code> is valid.</p>
<h3>Properties</h3>
<p>Properties are indicated by the <strong>.</strong> operator, e.g. <strong>a.w</strong> to find an
image's width.</p>
Expand Down
8 changes: 5 additions & 3 deletions autodocs/roiexpr/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,17 @@
<h1 id="roiexpr">roiexpr</h1>
<h2 id="description">Description</h2>
<p>This node allows a region of interest to be composed from several regions of interest using an expression and
imposed on an image. Several ROIs can be created within the node itself by using the "Add ROI" button.
imposed on an image.</p>
<p><strong>It is not a node for creating several ROIs at once - the output is always a single ROI</strong>.</p>
<p>ROIs can be created for use within the expression by using the "Add ROI" button.
These will be assigned to the variables a,b,c.. within the expression, and can be edited by:</p>
<ul>
<li>clicking on their label in the left-most column of the table (to select the entire row) and then clicking and dragging on the canvas,</li>
<li>double clicking on the description text in the table to open a numerical editor (not for poly or painted).</li>
</ul>
<p>Additional ROIs can be connected to the p, q, r inputs; these will be assigned to those variables within the expression.
The input image is available as the variable 'img', so it is possible
to access the image's original region of interest (or the union of all ROIs if it has more than one) by using roi(img).</p>
The input image's ROIs are combined into a single ROI and assigned to the variable 'i'.
The input image itself is available as the variable 'img'.</p>
<p>Other properties of the image are available and other calculations may be made, but the result of the expression must be an ROI.</p>
<p>Examples:</p>
<ul>
Expand Down
7 changes: 5 additions & 2 deletions devguide/classes.md~
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,15 @@ This is the fundamental numeric type, consisting of
* uncertainty value (standard deviation)
* DQ bits

It's usually used for scalars but can also hold array data. If it
does hold array data, the three elements must be the same shape.
It's usually used for scalars but can also hold array data - internally
ImageCubes (or parts of them) are converted into array Values for maths.
If it does hold array data, the three elements must be the same shape.

This type supports mathematical operations which propagate uncertainty
and DQ.

More on how Values work [here](values.md)

@@@info
**Note**: You may wonder why ImageCube and SubImageCube don't use
Value internally. The answer is simply historical reasons: they
Expand Down
4 changes: 3 additions & 1 deletion devguide/classes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@ <h2 id="pcotvaluevalue">pcot.value.Value</h2>
</ul>
<p>It's usually used for scalars but can also hold array data - internally
ImageCubes (or parts of them) are converted into array Values for maths.
If it does hold array data, the three elements must be the same shape.</p>
If it does hold array data, the three elements must be the same shape.
It's possible to create 1D vectors in an <em>expr</em> node using square brackets,
and some functions and operations return such vectors.</p>
<p>This type supports mathematical operations which propagate uncertainty
and DQ.</p>
<p>More on how Values work <a href="../values/">here</a></p>
Expand Down
40 changes: 40 additions & 0 deletions devguide/operators.md~
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Behaviour of binary and unary operators on Value and Datum

* **scalar** refers to a Value or NUMBER Datum with a single numeric value
* **vector** refers to a Value or NUMBER Datum with a 1D vector

## Datum within *expr* node

### Binary operators

|operator and types|behaviour|
|--------------|------|
|+|pixelwise addition|
|-|pixelwise subtraction|
|*|pixelwise multiplication|
|/|pixelwise division|
|^|pixelwise exponentiation|
|&|maximum of two values (essentially a fuzzy AND operator)|
|\||minimum of two values (essentially a fuzzy OR operator)|

### Behaviour for different types of operands

* **Scalar and Image**, **Image and Scalar**: the scalar is applied to every pixel in the image, so if `a` is an image,
then `a*2` multiplies every the value of every pixel in every band by 2, and `1/a`
reciprocates every pixel.

* **Vector and Image**, **Image and Vector**: The vector must have the same number of elements as there are bands
in the image. The corresponding element in the vector is applied to each band in the image, so if `a` is
a 3-band image, then `a*vec(1,2,3)` will multiply the pixel values in the channels by 1, 2 and 3 respectively.

* **Vector and Scalar, Scalar and Vector**: the scalar is applied to each element in the vector: `2*vec(1,2) = [2,4]`

* **Vector and Vector:** The operator is applied to the vectors element-wise: `vec(1,2) + vec(3,4) = [4,6]`

* **Scalar and Scalar:** does exactly what you think it does.

### More unusual binary operators

* **$ : band extraction -** - LHS must be image, RHS must be a wavelength or identifier or a vector of wavelengths: `a$R`, `a$640`, `a$vec(640,550,440)` will all work. You can also do `a$_0` to extract band
by index, but this won't work with vectors (reason - we could allow `a$5` to extract band 5, but what if we end up being able to process hyperspectral imagery where `a$440` could be either a wavelength
or a band?)
253 changes: 253 additions & 0 deletions devguide/operators/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">



<link rel="shortcut icon" href="../../img/favicon.ico">
<meta name="robots" content="noindex,nofollow">

<title>Behaviour of binary and unary operators on Value and Datum - PCOT Documentation</title>

<link href="../../css/bootstrap.min.css" rel="stylesheet">
<link href="../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css">
<link rel="stylesheet" href="../../css/lightbox.min.css">
<link rel="stylesheet" href="../../css/site.css">


<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<script src="../../js/lightbox-plus-jquery.min.js"></script>

</head>

<body>
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="../..">PCOT Documentation</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>

<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Getting Started <b class="caret"></b></a>
<ul class="dropdown-menu">

<li>
<a href="../../gettingstarted/" class="dropdown-item">Overview</a>
</li>

<li>
<a href="../../gettingstarted/installrun/" class="dropdown-item">Installing and running</a>
</li>

<li>
<a href="../../gettingstarted/concepts/" class="dropdown-item">PCOT concepts</a>
</li>

<li>
<a href="../../gettingstarted/tutorial/" class="dropdown-item">Tutorial</a>
</li>

<li>
<a href="../../gettingstarted/inputs/" class="dropdown-item">Loading other image formats</a>
</li>

<li>
<a href="../../gettingstarted/help/" class="dropdown-item">Getting help</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">User Guide <b class="caret"></b></a>
<ul class="dropdown-menu">

<li>
<a href="../../userguide/" class="dropdown-item">Overview</a>
</li>

<li>
<a href="../../userguide/principles/" class="dropdown-item">Operating principles</a>
</li>

<li>
<a href="../../userguide/canvas/" class="dropdown-item">The Canvas</a>
</li>

<li>
<a href="../../userguide/globalcontrols/" class="dropdown-item">Global Controls</a>
</li>

<li>
<a href="../../userguide/multifile/" class="dropdown-item">Reading images from multiple files</a>
</li>

<li>
<a href="../../userguide/expr/" class="dropdown-item">The "expr" node for mathematical expressions</a>
</li>

<li>
<a href="../../autodocs/" class="dropdown-item">Autodocs</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Developer's Guide <b class="caret"></b></a>
<ul class="dropdown-menu">

<li>
<a href="../" class="dropdown-item">Overview</a>
</li>

<li>
<a href="../library/" class="dropdown-item">Using PCOT as a library</a>
</li>

<li>
<a href="../plugins/" class="dropdown-item">Writing PCOT plugins</a>
</li>
</ul>
</li>
<li class="navitem">
<a href="../../roadmap/" class="nav-link">Roadmap</a>
</li>
<li class="navitem">
<a href="../../gettingstarted/issues/" class="nav-link">Known issues</a>
</li>
</ul>

<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
</ul>
</div>
</div>
</div>

<div class="container">
<div class="row">
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
<div class="navbar-header">
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
<span class="fa fa-angle-down"></span>
</button>
</div>


<div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
<ul class="nav flex-column">

<li class="nav-item" data-level="1"><a href="#behaviour-of-binary-and-unary-operators-on-value-and-datum" class="nav-link">Behaviour of binary and unary operators on Value and Datum</a>
<ul class="nav flex-column">
<li class="nav-item" data-level="2"><a href="#datum-within-expr-node" class="nav-link">Datum within expr node</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div></div>
<div class="col-md-9" role="main">

<h1 id="behaviour-of-binary-and-unary-operators-on-value-and-datum">Behaviour of binary and unary operators on Value and Datum</h1>
<ul>
<li><strong>scalar</strong> refers to a Value or NUMBER Datum with a single numeric value</li>
<li><strong>vector</strong> refers to a Value or NUMBER Datum with a 1D vector</li>
</ul>
<h2 id="datum-within-expr-node">Datum within <em>expr</em> node</h2>
<p>See the Expr node docs.</p></div>
</div>
</div>

<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script src="../../js/jquery-3.6.0.min.js"></script>
<script src="../../js/bootstrap.min.js"></script>
<script>
var base_url = "../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"></script>
<script src="../../search/main.js"></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>From here you can search these documents. Enter your search terms below.</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results" data-no-results-text="No results found"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>

</body>
</html>
Loading

0 comments on commit 211bab6

Please sign in to comment.