Provides a rough estimate on the light loss and corresponding range of scale values to consider during optimization. A percentile parameter can be provided to remove outliers. It is recommended to first use `st_screen_twl()` to remove poor quality days.

stk_calibrate(
  df,
  percentile = 100,
  floor = 1.5,
  distribution = FALSE,
  verbose = TRUE
)

Arguments

df

a skytrackr dataframe

percentile

percentile of the diurnal data (abvoe the floor value) used in calculating daily statistics (default = 100)

floor

threshold to remove low (nighttime) values

distribution

provide the full distribution across the track of scale factors (default = FALSE, providing only a range as a global constraint)

verbose

Give detailed feedback (TRUE or FALSE, default = TRUE)

Value

An estimated range of scale values to be used in optimization. Values are not log transformed.

Examples


# Estimate the upper scale value for fitting routine
upper_scale_value <- cc876 |> stk_calibrate()
#> 
#> ── Estimating suggested scale values ───────────────────────────────────────────
#> 
#> ! Upper bound is lower than the light model's normal maximum range (10).
#>  Suggesting 10 instead of the calculated 7.
#> → The suggested scale range is c(0.9,10)!
#>  Note, these estimates are approximations! Always inspect your data (e.g. by
#>   using stk_filter()) and consider using the stk_screen_twl() to remove days
#>   with poor twilight and other characteristics. When using the 'individual'
#>   light model you might have to relax the upper scaling value.