% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spectra-ossl.R
\name{ossl_library_template}
\alias{ossl_library_template}
\title{Canonical schema for an `ossl_library` object}
\usage{
ossl_library_template(
  wavelengths = 350:2500,
  properties = c("clay_pct", "sand_pct", "silt_pct", "cec_cmol", "bs_pct", "ph_h2o",
    "oc_pct", "fe_dcb_pct", "caco3_pct")
)
}
\arguments{
\item{wavelengths}{Integer vector of wavelengths (default
\code{350:2500} nm for Vis-NIR/SWIR).}

\item{properties}{Character vector of property column names to seed
the empty \code{Yr} data.frame with.}
}
\value{
A list with \code{Xr} (a 0-row matrix of the right column
        dimension) and \code{Yr} (an empty data.frame with the
        requested columns).
}
\description{
\code{\link{predict_ossl_mbl}} and
\code{\link{predict_ossl_plsr_local}} take an \code{ossl_library}
argument that must be a list with two named elements:
}
\details{
\itemize{
  \item \code{Xr}: numeric matrix, rows = OSSL training spectra,
        columns = wavelengths. Must align (after preprocessing)
        with the column space used by the spectra you predict on.
  \item \code{Yr}: data.frame keyed by property name (e.g.
        \code{clay_pct}, \code{cec_cmol}), one row per training
        spectrum.
}

This function returns an empty template you can populate from a
real OSSL extract (e.g. via the \code{ossl-import} Python package
or the public S3 mirror at
\code{https://storage.googleapis.com/soilspec4gg-public/}).

soilKey does \strong{not} bundle OSSL data; until you populate this
template with real values, all `predict_ossl_*` calls fall back to
the deterministic synthetic predictor (which prints a warning).
}
