freqTLS copyright and provenance notes

freqTLS is released under GPL (>= 3), as declared in DESCRIPTION. This file records code and
patterns adapted from other GPL-compatible packages, and the licence of the
vendored benchmark data. Any further reuse must be recorded here, with the source
file and the nature of the adaptation, before the change is treated as complete
(AGENTS.md design rule 9).

== Provenance ==

freqTLS is the frequentist sibling of bayesTLS, forked from the profileTLS
package at commit 6f963a9 (v0.3.3), which it supersedes; profileTLS is now a
private, archived predecessor. Both are GPL (>= 3).

== Engineering patterns adapted from drmTMB (GPL-3) ==

Source: https://github.com/itchyshin/drmTMB (local sibling package).

- src/init.c: the Boolean.h pre-include guard that lets the package compile
  cleanly under R 4.5's Apple clang is adapted from drmTMB::src/init.c.
- src/profile_tls.cpp: the same Boolean.h pre-include guard
  (cf. drmTMB::src/drmTMB.cpp:1-14); the beta-binomial lgamma density form
  (cf. drmTMB::src/drmTMB.cpp:1319-1328); and the branch-free CppAD::CondExp
  probability clamp and the beta-binomial shape floor
  (cf. drmTMB::src/drmTMB.cpp:1302-1314).
- src/profile_tls_numeric.h: the series-vs-direct CondExp switching for a stable
  log1p(exp()) is adapted from drmTMB::src/drm_numeric.h.
- R/formula.R: the shape of the brms/drmTMB-style formula parser -- variadic
  capture of per-sub-parameter formulas via substitute(), the small
  formula-walking primitives (LHS/RHS extraction, additive flattening), and
  random-effect-bar detection -- is adapted from drmTMB's drm_formula() /
  parse_drm_formula_entry() (cf. drmTMB::R/parse-formula.R). freqTLS writes
  its own grammar: the time() / temp() axis markers, the five fixed
  sub-parameter handles (low, up, log_k, CTmax, log_z), the successes |
  trials(total) and cbind() response idioms. The initial port used
  intercept-only shapes and shared CTmax/log_z designs; freqTLS subsequently
  implemented independent shape designs and the limited random-intercept
  structures documented in the current package.
- The agent-kit, dev-log discipline, and the optimizer/profile plumbing patterns
  implemented in R/fit_engine.R, R/profile.R, and R/confint.R follow drmTMB's
  governance and R/profile.R patterns.

freqTLS writes independent code for the 4PL thermal-load-sensitivity
likelihood and its direct CTmax/z parameterisation; only the numerical-stability
and registration patterns above are adapted.

== Confidence-Eye geometry adapted from gllvmTMB (GPL-3) ==

Source: https://github.com/JenniNiku/gllvmTMB (or the local sibling package).

- R/plotting.R (Phase 4): the Confidence-Eye lens geometry in the helper
  tls_eye_polygon_df() adapts gllvmTMB's .eye_polygon_df(width_max = 0.70) from
  gllvmTMB/R/loading-uncertainty-helpers.R (the Gaussian-width lens taper and the
  CI-half-width fallback for a missing SE), and plot_confidence_eye() adapts the
  structure of gllvmTMB's plot_loadings_confidence_eye() from
  gllvmTMB/R/plot-loadings-confidence-eye.R (pale geom_polygon lens at alpha 0.35,
  hollow geom_point at shape 21, the reliability fill palette, and the honest
  fallback that refuses to draw a lens when no finite (lower, upper) interval
  exists -- here keyed off the profile conf.status so a non-closing profile
  renders a hollow point only). freqTLS writes its own forward-prediction and
  survival/TDT/surface plots; only the lens geometry and eye structure are
  adapted.

== Bundled data and generated evidence ==

The file-by-file source, rights holder, licence or permission status,
transformation, consumer, and CRAN ship/block decision are recorded in
the repository-only docs/design/47-data-license-ledger.md. That build-excluded
ledger is the release gate; a licence
on one upstream package or repository must not be generalized to a component
with a more specific licence.

The brown-shrimp and life-stage zebrafish CSVs were obtained from bayesTLS,
whose package distribution is CC BY 4.0. The model-ready .rda files apply the
cleaning documented in R/data.R. The Drosophila suzukii assay data are from
Orsted et al. (2024), Zenodo record 10602268, CC BY 4.0. The oxygen-gradient
zebrafish data are from Saruhashi et al. (2026), Zenodo record 20075355,
CC BY 4.0. The cereal-aphid data are from Li et al. (2023), Dryad
10.5061/dryad.mcvdnck4j, CC0 1.0. Two unused environmental traces derived from
Open-Meteo/ERA5 and an Orsted et al. NicheMapR/NCEP workflow were reviewed for
this release. The available records did not establish a complete redistribution
chain for every underlying environmental-data provider, so neither trace is
installed. They remain only in the build-excluded
data-raw/licensing-pending/environmental-traces tree pending compatible primary
terms or written permission. No installed vignette, example, or cache consumes
them.

The snow-gum PSII data are not CC BY 4.0. Arnold et al. (2026),
doi:10.64898/2026.04.09.717599, release the source material under CC BY-NC 4.0.
Written permission or compatible relicensing for unrestricted redistribution is
pending. Therefore the snow-gum raw CSVs, derived snowgum_psii.rda, and its
case-study source are retained only under the build-excluded
data-raw/licensing-pending tree. Snow-gum rows were removed from the installed
benchmark cache on 2026-07-11. Attribution does not remove the non-commercial
restriction.

The Kristineberg hourly station extract has no explicit redistribution licence
in the source page reviewed for this release, and that page asks users to
contact the station before publication use. It must be excluded from the CRAN source
tarball unless the University of Gothenburg / Sven Loven Centre provides
written redistribution permission and any required attribution terms. The
extract and its provenance note are retained only under the build-excluded
data-raw/licensing-pending tree.

The remaining .rds files are outputs produced by freqTLS maintainers from
package simulations or fits. They are covered by the freqTLS package licence
except where a cache incorporates third-party data; the component ledger records
those dependencies explicitly. freqTLS code remains GPL (>= 3); third-party
data retain their stated licences.

The cross-case-study cache `inst/extdata/case_study_summary_cache.rds` is built
by `data-raw/build_case_study_summary_cache.R` from the shipped brown-shrimp,
life-stage zebrafish, and Drosophila suzukii datasets. It stores freqTLS profile
and documented bootstrap-fallback summaries plus version, configuration, and
input-checksum metadata. The cache compilation is package-generated evidence;
the three input datasets retain their CC BY 4.0 attribution and terms recorded
in the component ledger.
