Resolve a modular selectivity penalty weight vector
resolve_sel_pen_wts.RdConverts a user-supplied selectivity penalty weight specification into the
complete named weight vector consumed by Get_sel_PE_loglik and
Get_Selex_Smoothness_Penalty. Preserves exact backward
compatibility with the older single on/off cont_tv_*_sel_penalty flag
(which only ever covered "yr_devs", "bin_curve", "yr_curve"
– the process-error-deviation-based penalty terms used when a fleet has a
continuous time-varying selectivity model active) when no explicit weights
are supplied. Six additional "smooth_*" terms are included for
Get_Selex_Smoothness_Penalty's modular terms, which operate
directly on a fleet's realized selectivity surface and so apply to
any selectivity functional form (not just the bicubic/cubic spline,
Selex_Model == 8, that originally motivated them) – for example,
a nonparametric (Selex_Model == 5) fleet with discrete time blocks
(mirroring an ADMB assessment's "selectivity change years") can use these
same terms to regularize curvature/stability across those blocks.
Arguments
- pen_wts
NULL, or a named numeric vector/list giving independent weights for any subset of"yr_devs","bin_curve","yr_curve","smooth_bin_curve","smooth_bin_diff","smooth_yr_diff","smooth_yr_curve","smooth_dome","smooth_mean_center". When supplied, any term not named is set to0(disabled) rather than falling back topenalty_flag– i.e. supplyingpen_wtsopts fully into the explicit, modular weight system rather than partially retaining the old implicit behavior.- penalty_flag
Logical. Used only when
pen_wtsisNULL: the legacy terms ("yr_devs","bin_curve","yr_curve") are set to1ifTRUE,0ifFALSE. The"smooth_*"terms are always0in this fallback, regardless ofpenalty_flag.