library(variableStars) library(data.table) library(ggplot2) library(ggsci) library(microbenchmark) library(RColorBrewer)
# Generate first pattern dt.spectrum <- data.frame( "frequency" = seq(from=0, to=10, by=1) , "amplitude" = 10 ) # Get max amplitude maxAmplitude <- dt.spectrum[which.max(dt.spectrum$amplitude), ] # Plot amplitudes plot_spectrum(min(dt.spectrum$frequency)-1, max(dt.spectrum$frequency)+1, dt.spectrum)
Experiment execution
result <- process( dt.spectrum$frequency, dt.spectrum$amplitude, filter = "uniform", gRegimen = 0, minDnu = 15, maxDnu = 95, dnuValue = -1, dnuGuessError = 10, dnuEstimation = TRUE, numFrequencies = 30, debug = TRUE )
dt <- prepare_periodicities_dataset(result$fresAmps) # Plot frecuency and amplitude ggplot(aes(x = fInv, y = b, group=label, colour=label), data = dt) + #geom_point(alpha=0.2) + geom_line(alpha=0.8) + ggtitle(expression(paste("Periodicities (",d^-1,")"))) + xlab(expression(paste("Periodicities (",mu,"hz)"))) + ylab("Amplitude") + theme_bw() + scale_color_lancet() + xlim(0, 4) #dt[which.max(dt$b),]
plot_echelle(dt <- data.frame( "x" = result$echelle$modDnuStacked, "y" = result$echelle$freMas, "h" = result$echelle$amplitudes ))
# Generate first pattern dt.spectrum <- data.frame( "frequency" = seq(from=0, to=10, by=1) , "amplitude" = 10 ) # Generate second pattern as the biased first dt.spectrum.bias <- data.frame(dt.spectrum) dt.spectrum.bias$frequency <- dt.spectrum.bias$frequency + 0.25 dt.spectrum.bias$amplitude <- 5 #All together dt.spectrum <- rbind(dt.spectrum, dt.spectrum.bias) # Get max amplitude maxAmplitude <- dt.spectrum[which.max(dt.spectrum$amplitude), ] # Plot amplitudes plot_spectrum(min(dt.spectrum$frequency)-1, max(dt.spectrum$frequency)+1, dt.spectrum)
Experiment execution
result <- process( dt.spectrum$frequency, dt.spectrum$amplitude, filter = "uniform", gRegimen = 0, minDnu = 15, maxDnu = 95, dnuValue = -1, dnuGuessError = 10, dnuEstimation = TRUE, numFrequencies = 30, debug = TRUE )
# Plot frecuency and amplitude ggplot(aes(x = fInv, y = b, group=label, colour=label), data = prepare_periodicities_dataset(result$fresAmps)) + #geom_point(alpha=0.2) + geom_line(alpha=0.8) + ggtitle(expression(paste("Periodicities (",d^-1,")"))) + xlab(expression(paste("Periodicities (",mu,"hz)"))) + ylab("Amplitude") + theme_bw() + scale_color_lancet() + xlim(0, 5)
plot_echelle(dt <- data.frame( "x" = result$echelle$modDnuStacked, "y" = result$echelle$freMas, "h" = result$echelle$amplitudes ))
# Generate first pattern dt.spectrum <- data.frame( "frequency" = seq(from=0, to=10, by=0.25) , "amplitude" = 10 ) dt.spectrum$amplitude <- dt.spectrum$amplitude + rnorm(nrow(dt.spectrum),0,1.0) # Generate second pattern as the biased first dt.spectrum.bias <- data.frame(dt.spectrum) dt.spectrum.bias$frequency <- dt.spectrum.bias$frequency + 0.15 dt.spectrum.bias$amplitude <- 5 + rnorm(nrow(dt.spectrum.bias),0,1.0) #All together dt.spectrum <- rbind(dt.spectrum, dt.spectrum.bias) # Get max amplitude maxAmplitude <- dt.spectrum[which.max(dt.spectrum$amplitude), ] # Plot amplitudes plot_spectrum(min(dt.spectrum$frequency)-1, max(dt.spectrum$frequency)+1, dt.spectrum)
Experiment execution
result <- process( dt.spectrum$frequency, dt.spectrum$amplitude, filter = "uniform", gRegimen = 0, minDnu = 15, maxDnu = 95, dnuValue = -1, dnuGuessError = 10, dnuEstimation = TRUE, numFrequencies = 30, debug = TRUE )
# Plot frecuency and amplitude ggplot(aes(x = fInv, y = b, group=label, colour=label), data = prepare_periodicities_dataset(result$fresAmps)) + #geom_point(alpha=0.2) + geom_line(alpha=0.8) + ggtitle(expression(paste("Periodicities (",d^-1,")"))) + xlab(expression(paste("Periodicities (",mu,"hz)"))) + ylab("Amplitude") + theme_bw() + scale_color_lancet() + xlim(0, 5)
plot_echelle(dt <- data.frame( "x" = result$echelle$modDnuStacked, "y" = result$echelle$freMas, "h" = result$echelle$amplitudes ))
# Generate first pattern dt.spectrum <- data.frame( "frequency" = seq(from=0, to=10, by=0.25) + rnorm(nrow(dt.spectrum.bias),0,0.1) , "amplitude" = 10 ) # Generate second pattern as the biased first dt.spectrum.bias <- data.frame(dt.spectrum) dt.spectrum.bias$frequency <- dt.spectrum.bias$frequency + rnorm(nrow(dt.spectrum.bias),0,0.1) dt.spectrum.bias$amplitude <- 5 + rnorm(nrow(dt.spectrum.bias),0,1.0) #All together dt.spectrum <- rbind(dt.spectrum, dt.spectrum.bias) # Get max amplitude maxAmplitude <- dt.spectrum[which.max(dt.spectrum$amplitude), ] # Plot amplitudes plot_spectrum(min(dt.spectrum$frequency)-1, max(dt.spectrum$frequency)+1, dt.spectrum)
Experiment execution
result <- process( dt.spectrum$frequency, dt.spectrum$amplitude, filter = "uniform", gRegimen = 0, minDnu = 15, maxDnu = 95, dnuValue = -1, dnuGuessError = 10, dnuEstimation = TRUE, numFrequencies = 30, debug = TRUE )
# Plot frecuency and amplitude ggplot(aes(x = fInv, y = b, group=label, colour=label), data = prepare_periodicities_dataset(result$fresAmps)) + #geom_point(alpha=0.2) + geom_line(alpha=0.8) + ggtitle(expression(paste("Periodicities (",d^-1,")"))) + xlab(expression(paste("Periodicities (",mu,"hz)"))) + ylab("Amplitude") + theme_bw() + scale_color_lancet() + xlim(0, 5)
plot_echelle(dt <- data.frame( "x" = result$echelle$modDnuStacked, "y" = result$echelle$freMas, "h" = result$echelle$amplitudes ))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.