bands: Quantify the statistical uncertainty in a denoised spectrum...

Description Usage Arguments Value References See Also Examples

View source: R/bands.R

Description

See the parametric bootstrap algorithm in Politsch et al. (2020a) for details.

Usage

1
bands(obj, param, level = 0.95)

Arguments

obj

An object of class "polarized_spectrum", produced by denoise_spectrum().

param

A string specifying which spectrum to compute variability bands for. One of c("I","Q","U","Q_norm","U_norm").

level

The level of the pointwise variability bands. Defaults to level = 0.95.

Value

A list of obj$n_segments tibbles, each with the column set c("wavelength","bootstrap_lower_band","bootstrap_upper_band").

References

  1. Politsch et al. (2020a). Trend filtering – I. A modern statistical tool for time-domain astronomy and astronomical spectroscopy. MNRAS, 492(3), p. 4005-4018.

  2. Politsch et al. (2020b). Trend Filtering – II. Denoising astronomical signals with varying degrees of smoothness. MNRAS, 492(3), p. 4019-4032.

See Also

denoise_spectrum()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
library(dplyr)
data(polarized_spectrum_WR_star)

wavelength <- seq(
  from = sci$axDat$crval[1],
  by = sci$axDat$cdelt[1],
  length = sci$axDat$len[1]
)

flux <- as_tibble(sci$imDat)
variance <- as_tibble(var$imDat) %>% select(1:3)
mask <- as_tibble(bpm$imDat)

spec_denoised <- denoise_spectrum(
  wavelength,
  flux,
  variance,
  mask,
  compute_uncertainties = TRUE
)

spec_bands <- bands(spec_denoised, param = "Q_norm")

capolitsch/SALTdenoiseR documentation built on Jan. 21, 2022, 1:30 a.m.