Fit the suite record-scaling factors
fitRecordFactor.RdSuite-level record scaling of the spectral-match workflow: one scale
coefficient per record (shape.recordFactor in the batch JSON
contract), solved as a bounded quadratic program against the target
band (global band-conditioned objective).
Usage
fitRecordFactor(
.x,
target,
records,
factorMin = 0,
factorMax = Inf,
bandWeight = 2,
deficitWeight = 1
)Arguments
- .x
data.table. Suite PSA long table with columns
RecordID,Tn,Sa,kind; thekind == "final"curves are scaled.- target
data.table. Target band with columns
Tn,Sa.low,Sa.mean,Sa.high, in the same units as.x.- records
character. RecordIDs of the completed records to scale (at least two).
- factorMin
numeric. Lower bound of the record factors (
shape.recordFactor.min). Default0.- factorMax
numeric. Upper bound of the record factors (
shape.recordFactor.max). DefaultInf.- bandWeight
numeric. Weight of the band-violation term. Default
2.- deficitWeight
numeric. Extra weight of the suite-mean deficit below the target. Default
1.