SVS QA

library(spant)
library(ggplot2)
knitr::opts_chunk$set(echo = FALSE)
theme_set(theme_bw())

r params$label

Mean spectra

par(mfcol = c(1, 2))
plot(zf(params$data$mean_corr), xlim = c(4, 0.2), restore_def_par = FALSE,
     main = "Freq & phase corrected")
plot(zf(params$data$mean_uncorr), xlim = c(4, 0.2), main = "Uncorrected")

Quality metrics

Median single shot SNR : r round(params$data$summary_diags['ss_median_spec_snr'], 1)

Linewidth of mean spectrum (post FP correction) : r round(params$data$summary_diags['mean_corr_spec_lw'], 3) ppm

SNR of mean spectrum (post FP correction) : r round(params$data$summary_diags['mean_corr_spec_snr'], 1)

Linewidth of mean spectrum (no correction) : r round(params$data$summary_diags['mean_uncorr_spec_lw'], 3) ppm

SNR of mean spectrum (no correction) : r round(params$data$summary_diags['mean_uncorr_spec_snr'], 1)

Frequency shift range : r round(params$data$summary_diags['shift_hz_range'], 1) Hz

Dynamic lipid fluctuation range : r round(100 * params$data$summary_diags['dlfr'], 1)% tCr intensity

Dynamic frequency shifts

diag_table <- params$data$diag_table
    ggplot(diag_table, aes(x = time_sec, y = shifts_hz)) + geom_line() + 
      xlab("Time (s)") + ylab("Shift (Hz)")

Dynamic linewidths

diag_table <- params$data$diag_table
p <- ggplot(diag_table, aes(x = time_sec, y = lw_ppm)) + geom_line() +
  xlab("Time (s)") + ylab("tNAA linewidth (ppm)") +
  theme(legend.position = "none")
if (!anyNA(diag_table$lw_ppm)) {
  p <- p + geom_line(aes(x = time_sec, y = lw_ppm_smo), linewidth = 1.5,
                     colour = "red")
}
print(p)

Spectrograms

corr_spec   <- crop_spec(params$data$corrected)
uncorr_spec <- crop_spec(params$data$uncorrected)
par(mfcol = c(1, 2))
image(corr_spec, xlim = c(4, 0.2), restore_def_par = FALSE,
      main = "Freq & phase corrected", plot_dim = "time_sec", vline = NULL,
      vline_col = "red", vline_lty = 1)
image(uncorr_spec, xlim = c(4, 0.2), main = "Uncorrected",
      vline = NULL, plot_dim = "time_sec", vline_col = "red", vline_lty = 1)

Mean subtracted spectrograms

par(mfcol = c(1, 2))
image(params$data$mrs_mean_sub, xlim = c(4, 0.2), restore_def_par = FALSE,
      main = "Smoothed", plot_dim = "time_sec")
image(params$data$mrs_mean_sub_bc, xlim = c(4, 0.2),
      main = "Smoothed and baseline corrected", plot_dim = "time_sec")


Try the spant package in your browser

Any scripts or data that you put into this service are public.

spant documentation built on Sept. 11, 2024, 9:13 p.m.