| empi2tf | R Documentation |
Creates a time-frequency map using atoms from the Matching Pursuit algorithm.
The created map can be: 1) displayed on the screen, 2) saved in .png file,
or 3) saved as an .RData object.
empi2tf(
db.file = NULL,
db.list = NULL,
channel,
mode = "sqrt",
freq.divide = 1,
increase.factor = 1,
shortening.factor.x = 2,
shortening.factor.y = 2,
display.crosses = TRUE,
display.atom.numbers = FALSE,
display.grid = FALSE,
crosses.color = "white",
palette = "my custom palette",
rev = TRUE,
out.mode = "plot",
path = NULL,
file.name = NULL,
size = c(512, 512),
draw.ellipses = FALSE,
plot.signals = TRUE,
write.atoms = FALSE
)
db.file |
The SQLite file created after executing the |
db.list |
The list created after executing the |
channel |
Channel from the SQLite file to process. |
mode |
|
freq.divide |
Specifies how many times the displayed frequency in the T-F map
should be decreased. For example, if the sampling frequency is |
increase.factor |
Factor of increasing the number of pixels in the f-axis, the most sensible are non-negative integers (e.g. 2, 4, 5, 8). |
shortening.factor.x |
Usually, for better visualization of atoms, a value of 2 will be appropriate. |
shortening.factor.y |
Usually, for better visualization of atoms, a value of 2 will be appropriate. |
display.crosses |
Whether small crosses should be displayed in the canters of atoms. |
display.atom.numbers |
Whether atom numbers should be displayed in the canters of atoms. |
display.grid |
Whether to draw grid lines. |
crosses.color |
Colour of small crosses. |
palette |
Palette from the list returned by |
rev |
|
out.mode |
One of the following:
|
path |
Path where |
file.name |
Name of the |
size |
|
draw.ellipses |
Only for testing. User can set it to |
plot.signals |
Whether the original and reconstructed signals should also be displayed. |
write.atoms |
If |
Depending on the out.mode parameter the function returns:
Time-Frequency map plotted on the screen
Time-Frequency map saved in a .png file
Time-Frequency map saved as .RData file
Regardless of the above, the function returns the following:
all the Gabor functions
reconstructed signal
original signal
sampling frequency
grid size in t axis
grid size in f axis
epoch size in samples
length of the signal in seconds
time-frequency map
time-frequency map after resampling
(if out.mode="RData" or if out.mode="RData2", otherwise, NULL is returned)
channel number processed
frequency divide
file <- system.file("extdata", "sample1.db", package = "MatchingPursuit")
out <- empi2tf(
db.file = file,
channel = 1,
mode = "sqrt",
freq.divide = 4,
increase.factor= 4,
display.crosses = TRUE,
display.atom.numbers = FALSE,
out.mode = "plot",
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.