From 68451cec036df8e15ab8feed016b1999980603d8 Mon Sep 17 00:00:00 2001 From: mcrucifix <michel.crucifix@uclouvain.be> Date: Thu, 19 Oct 2023 16:30:16 +0200 Subject: [PATCH] option for not hiding influence cone --- CHANGES | 1 + DESCRIPTION | 4 ++-- R/cwt_morlet.R | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 0900716..61d9547 100644 --- a/CHANGES +++ b/CHANGES @@ -1 +1,2 @@ 1.03 : added cross morlet +1.04 : added "mask" option to display influence cone in Morlet diff --git a/DESCRIPTION b/DESCRIPTION index 3a8cdb5..b103295 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: gtseries Type: Package Title: Time Series analysis for galcial cycles -Version: 1.03 -Date: 2015-02-12 +Version: 1.04 +Date: 2022-05-28 Author: Michel Crucifix Maintainer: Michel Crucifix <michel.crucifix@uclouvain.be> Description: More about what it does (maybe more than one line) diff --git a/R/cwt_morlet.R b/R/cwt_morlet.R index 02625e7..d000e0e 100644 --- a/R/cwt_morlet.R +++ b/R/cwt_morlet.R @@ -192,13 +192,14 @@ cwt_morlet <- function (A,inter=20,k0=5.6,amin=1,amax=Inf,calcmask=TRUE,scale=NA wave } -plot.wavelet <- function (wave,resx=400,resy=300,xlab="Time",ylab="Period",scaling_correction=0,col=col_wavelet,legend=FALSE,Mode=Mod,...) +plot.wavelet <- function (wave,resx=400,resy=300,xlab="Time",ylab="Period",scaling_correction=0,col=col_wavelet,legend=FALSE,Mode=Mod,plotMask=TRUE,...) { require(fields) xx <- attr(wave,"time") period <- attr(wave,"period") mask <- attr(wave,"mask") + if (!plotMask) mask[,] = 1 # do not hide influence cone aa <- attr(wave,"scale") thin_factor_xx <- max(ceiling(length(xx)/ resx),1) thin_factor_yy <- max(ceiling(length(aa)/ resy),1) -- GitLab