8
$\begingroup$

I've been using Mathematica for some years, yet I'm befuddled by this statement:

GaborWavelet[6]["FourierFactor"]

It appears to give the center frequency of the Fourier transform of the Gabor Wavelet, which I actually wanted. But if I hadn't seen this command in a piece of code, I never would have known the above command even existed in Mathematica. I can't find "FourierFactor" anywhere in the Mathematica documentation. Apparently, the "FourierFactor" is a property of the GaborWavelet. But I didn't know a property like this could be accessed with a command. I wonder what other properties the GaborWavelet might have? Can you explain?

$\endgroup$

1 Answer 1

13
$\begingroup$

Quite often, a Mathematica object can have properties, and typically you can find out what properties (or methods) are available by using "Properties" or "Methods". For example:

SparseArray[RandomReal[1, {3,3}]]["Methods"]

{"AdjacencyLists", "Background", "ColumnIndices", "Density", "MatrixColumns",
"MethodInformation", "Methods", "NonzeroPositions", "NonzeroValues",
"PatternArray", "PatternValues", "Properties", "RowPointers"}

It seems to be an oversight that "Methods" is not supported for GaboWavelet. However, these properties are typically implemented using SubValues, so you can do:

Select[StringQ] @ SubValues[GaborWavelet][[All, 1, 1, 1]]

{"OrthogonalQ", "BiorthogonalQ", "WaveletFunction", "FourierTransform",
"CompiledFourierTransform", "FourierFactor", "ConeOfInfluence"}

to find out what other properties are available.

$\endgroup$
2
  • 2
    $\begingroup$ The documentation about these properties seems to be lacking. Is a property like at Option? Can I change the "AdjacencyLists" of SparseArray, for example? When I go to the documentation for SparseArray, none of these properties are mentioned in the "properties & relations" section. $\endgroup$
    – Chris
    Sep 10, 2020 at 1:01
  • 1
    $\begingroup$ Seems that one needs to use GaborWavelet once before checking the subvalue e.g. GaborWavelet[1]; SubValues[GaborWavelet], at least in v12.1.1. $\endgroup$
    – xzczd
    Sep 10, 2020 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.