toFrequencyReport

fun KSLDatabase.toFrequencyReport(expName: String, name: String? = null, title: String = if (name == null) "Frequencies — $expName" else "Frequency — $name ($expName)", showPlot: Boolean = true): ReportNode.Document(source)

Builds a ReportNode.Document for the stored integer-frequency data of one experiment.

When name is supplied, the document covers that one frequency response; when it is null (the default), the document covers every frequency response recorded for the experiment (via dbSimulationFrequencies).

Zero-code path:

val db = KSLDatabase("pharmacy.db")
db.toFrequencyReport("Experiment 1", "NQUponArrival").showInBrowser()
db.toFrequencyReport("Experiment 1").writeMarkdown() // every frequency

Return

the assembled ReportNode.Document

Parameters

expName

the experiment to report

name

a single frequency response, or null for all of them

title

document title; defaults to "Frequencies — " (or "Frequency — ()" for one)

showPlot

when true (default) include the frequency plots