circuit.advanced
Currents and voltages of a raster circuit with sources and grounds, Circuitscape 6.1's advanced mode through landschaft's C++: each cell with a conductance a node joined to its 8 neighbours (4 asked) by the average conductance; current injected at the sources, drawn at the grounds (a conductance to ground, or a direct ground: inf); every component with both solved exactly. The node current is the larger of a cell's inflow and outflow.
| Input | Type | What it is |
conductancerequired | map | the conductance of each cell (no value: no node) |
sourcerequired | map | the current injected at each cell, amps |
groundrequired | map | the conductance to ground of each cell (inf: direct) |
| Output | Type | What it is |
current | map | the node current of each cell |
voltage | map | the voltage of each cell |
| Setting | Type | What it is |
four_neighbors | bool | the four orthogonal neighbours only |
circuit.circuitscape_ini
Run a Circuitscape INI file on rasters, as Circuitscape.compute(path) does (landschaft's circuitscape_ini): advanced, pairwise, one-to-all and all-to-one, with its polygons, mask, reclassification, included pairs and variable source strengths; the inputs read as Circuitscape reads them (ASCII grids in double, GeoTIFFs, text lists; paths from the working directory or next to the INI), the outputs written as it names them next to output_file (ASCII grids, or GeoTIFF with write_as_tif). solver, precision and parallelize have no effect: every solve is exact in double.
| Output | Type | What it is |
resistances | table | pairwise: a row per point and its resistances; one-to-all: id, value |
voltage | map | advanced: the voltages |
current | map | advanced: the currents |
cum | map | the cumulative current |
max | map | the largest current |
maps | stack | the pairs' (or points') voltage and current maps |
| Setting | Type | What it is |
pathrequired | text | the INI file |
write_outputs | bool | write the output files as Circuitscape (default true) |
batch | integer | one-to-all problems solved together (default 4 x the threads) |
circuit.network_advanced
Circuitscape's advanced mode on a network (data_type = network; landschaft's circuitscape_network_advanced): currents injected at nodes and grounds (a resistance of 0 a direct ground) on a graph of edges numbered from 1 (or 0, then every number shifted, as Circuitscape.jl). Duplicate edges add up. Every component with a source and a ground is solved.
| Input | Type | What it is |
graph | table | the edges: node, node, resistance (or conductance) |
sources | table | node, current |
grounds | table | node, resistance (or conductance) to ground |
| Output | Type | What it is |
voltages | table | node, voltage (0 where not solved) |
node_currents | table | node, current |
branch_currents | table | from, to, current |
| Setting | Type | What it is |
graph_file | text | or Circuitscape's edge list file |
graph_is_resistance | bool | the edge values are resistances (default true) |
sources_file | text | or Circuitscape's source file |
grounds_file | text | or Circuitscape's ground file |
ground_is_resistance | bool | the ground values are resistances (default true) |
remove_src_or_gnd | text | nodes that are both: keepall (default)... |
circuit.network_pairwise
Circuitscape's pairwise mode on a network (landschaft's circuitscape_network_pairwise): the effective resistance between every pair of focal nodes (-1: not connected), every component factorised once; included or excluded pairs from Circuitscape's file; with the map options every pair's node voltages, node and branch currents (JSON), and the currents summed over the pairs.
| Input | Type | What it is |
graph | table | the edges: node, node, resistance (or conductance) |
| Output | Type | What it is |
resistances | table | a row per focal node: its id, then its resistances |
cum_node_currents | table | with current_maps: node, current summed over the pairs |
cum_branch_currents | table | with current_maps: from, to, current |
maps | any | with the map options: each pair's values (JSON) |
| Setting | Type | What it is |
graph_file | text | or Circuitscape's edge list file |
graph_is_resistance | bool | the edge values are resistances (default true) |
focal_nodesrequired | any | the focal node numbers, or the path of Circuitscape's file |
included_pairs | text | Circuitscape's include / exclude pairs file |
voltage_maps | bool | every pair's node voltages |
current_maps | bool | every pair's currents, and their sums |
circuit.omniscape
Omnidirectional connectivity with Omniscape's moving-window circuits (Omniscape 0.7 through landschaft's C++): a target every block_size cells injects its block's source strength into the sources within radius, grounded at the target; the node currents of every window add up into the cumulative current. The flow potential (the same on a conductance of 1) and the current normalised by it (above 1: channelled; below: impeded) when asked. Sources from the resistance (its conductance) unless given; conditions keep the sources whose values match the target's.
| Input | Type | What it is |
resistancerequired | map | the resistance (or conductance), > 0; no value: no data |
source | map | the source strengths (default: from the resistance) |
condition1 | map | conditional connectivity: the first condition |
condition1_future | map | its future values (compare_to_future) |
condition2 | map | a second condition |
condition2_future | map | its future values |
| Output | Type | What it is |
current | map | the cumulative current (cum_currmap) |
flow_potential | map | the flow potential (flow_potential: true) |
normalized | map | the current over the flow potential (normalized_current) |
| Setting | Type | What it is |
radiusrequired | number | the window's radius, in cells |
block_size | number | targets every this many cells, odd (1) |
buffer | number | cells beyond the radius in each window (0) |
source_threshold | number | sources given: below this none (0) |
r_cutoff | number | sources from the resistance: none above it (inf) |
resistance_is_conductance | bool | the map holds conductances |
four_neighbors | bool | the four orthogonal neighbours only |
flow_potential | bool | the flow potential too |
normalized_current | bool | the normalised current too |
correct_artifacts | bool | undo the blocks' artifacts (true) |
mask_nodata | bool | no value where the resistance has none (true) |
reclass_table | any | [[value, new value], ...] (null: no data) |
compare_to_future | text | none (default), 1, 2 or both |
comparison1 | text | within (default) or equal |
comparison2 | text | within (default) or equal |
condition1_lower | number | within: the least difference (0) |
condition1_upper | number | within: the largest difference (0) |
condition2_lower | number | within: the least difference (0) |
condition2_upper | number | within: the largest difference (0) |
precision | text | double (default) or single |
circuit.omniscape_ini
Run an Omniscape INI file, as run_omniscape(path) does (landschaft's omniscape_ini): every option of Omniscape 0.7 with its defaults (radius, resistance_file and project_name required), paths from the working directory or next to the INI; the outputs written to project_name (_1, _2... when it exists) as Omniscape writes them: config.ini, cum_currmap, flow_potential, normalized_cum_currmap, classified_resistance (GeoTIFF or ASCII grids, no data -9999).
| Output | Type | What it is |
current | map | the cumulative current (cum_currmap) |
flow_potential | map | with calc_flow_potential |
normalized | map | with calc_normalized_current |
classified_resistance | map | with reclassify_resistance |
| Setting | Type | What it is |
pathrequired | text | the INI file |
write_outputs | bool | write the outputs to the project folder (default true) |
circuit.one_to_all
Circuitscape's one-to-all (or all-to-one) mode on rasters (landschaft's circuitscape_one_to_all): for every focal point in turn, 1 A (or its strength) injected there with every other point a direct ground (one-to-all), or the point grounded and the others injecting (all-to-one); the voltage over the strength at each point (one-to-all), the cumulative and largest current maps when asked. Circuitscape's quirks kept (strengths by position); all-to-one measures no resistances, so its table's value column is 0, as Circuitscape's: read its current maps.
| Input | Type | What it is |
habitatrequired | map | the resistance (or conductance); no value: no node |
pointsrequired | map | the focal points' ids (0 or no value elsewhere; cells of one id: a region) |
polygons | map | short-circuit regions: ids > 0, their cells one node |
mask | map | cells where it is not positive (or has no value) removed |
| Output | Type | What it is |
resistances | table | the effective resistances |
cum | map | the cumulative current (cum_map) |
max | map | the largest current of the pairs (max_map) |
| Setting | Type | What it is |
habitat_is_resistance | bool | resistances (default) or conductances |
four_neighbors | bool | the four orthogonal neighbours only |
avg_resistances | bool | neighbours joined by their resistances' average |
cum_map | bool | the cumulative current |
max_map | bool | the largest current |
focal_zero | bool | current 0 on the focal nodes in the maps |
reclass_table | any | [[value, new value], ...] applied to the habitat first |
all_to_one | bool | all-to-one instead of one-to-all |
strengths | any | [[id, strength], ...], by position as Circuitscape |
batch | integer | the problems solved together (default 4 x the threads; the last bits depend on it) |
circuit.pairwise
Circuitscape's pairwise mode on rasters (landschaft's circuitscape_pairwise): the effective resistance between every pair of focal points (-1: not connected), every component factorised once and its pairs solved together; the cumulative and the largest current maps when asked.
| Input | Type | What it is |
habitatrequired | map | the resistance (or conductance); no value: no node |
pointsrequired | map | the focal points' ids (0 or no value elsewhere; cells of one id: a region) |
polygons | map | short-circuit regions: ids > 0, their cells one node |
mask | map | cells where it is not positive (or has no value) removed |
| Output | Type | What it is |
resistances | table | the effective resistances |
cum | map | the cumulative current (cum_map) |
max | map | the largest current of the pairs (max_map) |
| Setting | Type | What it is |
habitat_is_resistance | bool | resistances (default) or conductances |
four_neighbors | bool | the four orthogonal neighbours only |
avg_resistances | bool | neighbours joined by their resistances' average |
cum_map | bool | the cumulative current |
max_map | bool | the largest current |
focal_zero | bool | current 0 on the focal nodes in the maps |
reclass_table | any | [[value, new value], ...] applied to the habitat first |
null_currents | bool | no value instead of 0 where no current (in the maps) |
log_transform | bool | log10 of the current maps |