Repository navigation
PCEA: link (bcfishpass config) flags different BT rearing segments than bcfishpass (−8.2 km connection, +30.3 km other) #324
Description
If done: we know why link on the bcfishpass config flags different BT rearing segments than bcfishpass in PCEA, and either fix it or record it as an annotated divergence. If never: a segment-level replication gap stays unexplained. Today it is within the 5 % parity tolerance (+1.87 %).
Answer (2026-10-11): segmentation, annotated
link breaks streams at every 15 / 20 % gradient position; bcfishpass does not in groups where no species with a 15 / 20 % access model (CH, CM, CO, PK, SK, ST, WCT) is present — PCEA, FINA and PARS, which hold BT, DV, GR, RB (and PARS KO). The finer segments' average gradients flip BT spawn and rear tests both ways, and the flips join or cut rearing clusters. The same mechanism runs in FINA and PARS: on the rearing row, segmentation alone nets +26.22 (PCEA), −13.04 (FINA) and +9.81 km (PARS), and PARS's row is negative only through the width exception below. The table below is the rearing flag (connection lines in); *_bt_mechanism_net.csv has the rearing and rearing_stream scopes. Recorded as taxonomy class SEGMENTATION (and class B entries pars-bt-rearing-width-exception and pcea-bt-connection-width-exception), with no code change. Write-up: research/bcfp_segmentation_parity.md; evidence: data-raw/logs/rearing_diff_324/.
| BT rearing flag km, link − bcfp | rear gradient | connectivity | bcfp width exception | access | net | gross |
|---|---|---|---|---|---|---|
| PCEA | +21.72 | +8.19 | −9.59 | +1.80 | +22.11 | 86.2 |
| FINA | +12.21 | −25.31 | 0 | +0.23 | −12.88 | 73.7 |
| PARS | +19.28 | −9.27 | −24.78 | +0.94 | −13.83 | 112.6 |
| LKEL | +0.07 | +1.34 | 0 | +0.24 | +1.65 | 1.7 |
- The −8.2 km on connection lines is bcfishpass's rearing exception for order-1 lines with parent order ≥ 5 whose known width is below the minimum (NULL widths are never admitted): −8.37 km on two 1450 lines on an order-9 stem, offset by +0.17 km of link-only rearing on connection lines, for the row's −8.21 km. The bcfishpass bundle sets
rear_stream_order_bypass = no. - link's breaks hold all but one of bcfishpass's in PCEA (24,392 of 24,393; PARS 30,699 of 30,733). link has 68,118 more, all but 17 at gradient positions.
.lnk_pipeline_prep_minimal()breaks at every class position of every configured species (BT/ST accessible_km over-credit: access segmentation drops the accessibility frontier #223), whatever is present. bcfishpass builds the CH / ST models only where those species are present, and breaks at minimal positions (@620dbe4). - Spawning adds a width rule: bcfishpass spawns on width > 2.0 m, fresh on ≥ 2.0 m (PCEA 1.78, FINA 4.54, PARS 5.27 km of link-only BT spawning).
- Making the segments match bcfishpass's would re-segment every group. That change is not made here. Decided and filed (2026-10-11): Break streams only where a present species' access changes (both configs); bcfishpass config takes the order-1 exception #326 breaks streams only where a present species' access changes, in both configs (bcfishpass reduces each model's barriers to the downstream-most after its observation and habitat lifts; link reduced before them until BT/ST accessible_km over-credit: access segmentation drops the accessibility frontier #223, which then dropped the reduction), and gives the
bcfishpassconfig the order-1 exception and, optionally, strict>spawning. default config: rear order-1 streams off larger rivers on a measured width? #327 decidesdefault's order-1 position. The step-by-step comparison and history are inresearch/bcfp_segmentation_parity.md.
Measured (#319, data-raw/logs/lake_connection_319/, bcfishpass config vs local fresh.streams_vw_bcfp)
| PCEA BT rearing | link | bcfp | diff |
|---|---|---|---|
| lake connection lines (1450 in a lake polygon) | 367.7 | 375.9 | −8.2 km |
| everything else | 1,655.8 | 1,625.5 | +30.3 km |
| flag total (before #319) | 2,023.5 | 2,001.4 | +22.1 km |
FINA, PARS and LKEL match exactly on connection km. Upstream rules for BT rearing are pinned in research/habitat_thresholds.md ("One meaning of rearing_km", smnorris/bcfishpass@620dbe4).
First step
Diff the BT rearing flag segment by segment in PCEA between fresh and fresh.streams_vw_bcfp, joined on position (blue_line_key + measures). Then bucket the differences by edge type, waterbody and gradient / channel width. Relates to #319.
Prior work checked (2026-10-09): none explains it
research/parity_accessible_habitat_2026_07_03.mdmeasured this pair and passed it under the 5 % habitat tolerance, with no breakdown.research/accessible_km_divergence.mdis PCEA's access gap (+40 %, fixed by BT/ST accessible_km over-credit: access segmentation drops the accessibility frontier #223), not rearing.- PCEA mapping-code parity is 99.9–100 % (
research/bcfp_compare_mapping_code.md, measured 2026-05-11, before BT/ST accessible_km over-credit: access segmentation drops the accessibility frontier #223). Corrected 2026-10-11: that table predates BT/ST accessible_km over-credit: access segmentation drops the accessibility frontier #223, when PCEA BTaccessible_kmwas +40 % off, so it does not show access agrees. Accessible km do: 5,003.0 / 5,003.4, −0.01 % (data-raw/logs/lake_connection_319/parity_crosssection_after.txt). The difference is in the rearing flag. research/bcfp_divergence_taxonomy.ymlhas no PCEA entry. Its rearing entries have the opposite sign (hors-class-stream-order-bypass) or are other WSGs (SETN, BULK SK / fresh#190).
Activity
research: record #324 operator decisions; what #223 measured vs asserted
research: #324 decisions - break where bcfishpass does in both config…
research: where streams break, bcfishpass and link step by step (#324)
Point #324 status and research at the filed follow-up #326
Merge pull request #325 from NewGraphEnvironment/324-pcea-link-bcfish…
CLAUDE.md: bcfishpass's five access scripts; parity join blind to seg…