Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
T
tseries
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de conteneur
Registre de modèles
Opération
Environnements
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Conditions générales et politique de confidentialité
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Michel Crucifix
tseries
Validations
7ee6ae53
Valider
7ee6ae53
rédigé
Il y a 7 mois
par
Michel Crucifix
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
tonecombinations
parent
a813aba6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
DESCRIPTION
+1
-3
1 ajout, 3 suppressions
DESCRIPTION
R/toneCombinations.R
+4
-2
4 ajouts, 2 suppressions
R/toneCombinations.R
man/attributeTones.Rd
+13
-1
13 ajouts, 1 suppression
man/attributeTones.Rd
avec
18 ajouts
et
6 suppressions
DESCRIPTION
+
1
−
3
Voir le fichier @
7ee6ae53
...
@@ -10,8 +10,6 @@ Description: Collection of time series analysis tools, focused on spectral decom
...
@@ -10,8 +10,6 @@ Description: Collection of time series analysis tools, focused on spectral decom
License: MIT licence
License: MIT licence
LazyLoad: yes
LazyLoad: yes
RoxygenNote: 7.3.2
RoxygenNote: 7.3.2
Imports: Rdpack, sfsmisc, cmna, gsignal, pracma
Imports: Rdpack, sfsmisc, cmna, gsignal, pracma
, RcppAlgos
RdMacros: Rdpack
RdMacros: Rdpack
Depends:
R (>= 2.10)
LazyData: true
LazyData: true
Ce diff est replié.
Cliquez pour l'agrandir.
R/toneCombinations.R
+
4
−
2
Voir le fichier @
7ee6ae53
...
@@ -94,9 +94,11 @@ generate_name <- function(invec,char="s", labels = NULL){
...
@@ -94,9 +94,11 @@ generate_name <- function(invec,char="s", labels = NULL){
#' @param infreq : input frequencies
#' @param infreq : input frequencies
#' @param omegas : reference frequencies (a numeric vector which may contain explicit row names)
#' @param omegas : reference frequencies (a numeric vector which may contain explicit row names)
#' @param fractions : 1, 2, or 3 depending on willing to include singe, double or triple periods
#' @param fractions : 1, 2, or 3 depending on willing to include singe, double or triple periods
#' @param keepPositives : argument passed to `toneCombinations`
#' @param tol1 : acceptable tolerance for being considered as a certain attribution
#' @param tol1 : acceptable tolerance for being considered as a certain attribution
#' (if several frequencies match the criteria, the closest will be taken)
#' (if several frequencies match the criteria, the closest will be taken)
#' @param tol2 : acceptable tolerance for being considered as a likely or plausible
#' @param tol2 : acceptable tolerance for being considered as a likely or plausible
#' @seealso toneCombinations
#' @export attributeTones
#' @export attributeTones
#'
#'
#' @examples
#' @examples
...
@@ -112,9 +114,9 @@ generate_name <- function(invec,char="s", labels = NULL){
...
@@ -112,9 +114,9 @@ generate_name <- function(invec,char="s", labels = NULL){
#' plot(outfreqs, outamps, type='h')
#' plot(outfreqs, outamps, type='h')
#' text(outfreqs, outamps+0.1, attributions)
#' text(outfreqs, outamps+0.1, attributions)
#'
#'
attributeTones
<-
function
(
infreq
,
omegas
,
fractions
=
1
,
tol1
=
1
.e
-6
,
tol2
=
1
.e
-4
)
{
attributeTones
<-
function
(
infreq
,
omegas
,
fractions
=
1
,
tol1
=
1
.e
-6
,
tol2
=
1
.e
-4
,
keepPositives
=
TRUE
)
{
attributions
<-
rep
(
""
,
length
(
infreq
))
attributions
<-
rep
(
""
,
length
(
infreq
))
combis
<-
toneCombinations
(
omegas
,
fractions
=
fractions
)
combis
<-
toneCombinations
(
omegas
,
fractions
=
fractions
,
keepPositives
)
for
(
i
in
seq
(
infreq
)){
for
(
i
in
seq
(
infreq
)){
deltas
<-
abs
(
infreq
[
i
]
-
combis
)
deltas
<-
abs
(
infreq
[
i
]
-
combis
)
bestSuspect
<-
which.min
(
abs
(
infreq
[
i
]
-
combis
))
bestSuspect
<-
which.min
(
abs
(
infreq
[
i
]
-
combis
))
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
man/attributeTones.Rd
+
13
−
1
Voir le fichier @
7ee6ae53
...
@@ -4,7 +4,14 @@
...
@@ -4,7 +4,14 @@
\alias{attributeTones}
\alias{attributeTones}
\title{Attribution of combination of tones}
\title{Attribution of combination of tones}
\usage{
\usage{
attributeTones(infreq, omegas, fractions = 1, tol1 = 1e-06, tol2 = 1e-04)
attributeTones(
infreq,
omegas,
fractions = 1,
tol1 = 1e-06,
tol2 = 1e-04,
keepPositives = TRUE
)
}
}
\arguments{
\arguments{
\item{infreq}{: input frequencies}
\item{infreq}{: input frequencies}
...
@@ -17,6 +24,8 @@ attributeTones(infreq, omegas, fractions = 1, tol1 = 1e-06, tol2 = 1e-04)
...
@@ -17,6 +24,8 @@ attributeTones(infreq, omegas, fractions = 1, tol1 = 1e-06, tol2 = 1e-04)
(if several frequencies match the criteria, the closest will be taken)}
(if several frequencies match the criteria, the closest will be taken)}
\item{tol2}{: acceptable tolerance for being considered as a likely or plausible}
\item{tol2}{: acceptable tolerance for being considered as a likely or plausible}
\item{keepPositives}{: argument passed to `toneCombinations`}
}
}
\description{
\description{
Based on a vector of frequencies (`infreq`), and a vector of referenc
Based on a vector of frequencies (`infreq`), and a vector of referenc
...
@@ -37,3 +46,6 @@ plot(outfreqs, outamps, type='h')
...
@@ -37,3 +46,6 @@ plot(outfreqs, outamps, type='h')
text(outfreqs, outamps+0.1, attributions)
text(outfreqs, outamps+0.1, attributions)
}
}
\seealso{
toneCombinations
}
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter