-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployed 5f1775d with MkDocs version: 1.5.3
- Loading branch information
Showing
16 changed files
with
833 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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">×</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">×</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> |
Oops, something went wrong.