pymultifracs.multiresquantity.MultiResolutionQuantity#
- class pymultifracs.multiresquantity.MultiResolutionQuantity(formalism: str = None, gamint: float = None, wt_name: str = None, nj: dict = <factory>, n_sig: int = None, values: dict = <factory>)#
Handles multi-resolution quantities in multifractal analysis.
It can be used to represent wavelet coefficients \(d_X(j, k)\) and wavelet leaders \(L_X(j, k)\).
- Parameters:
- formalism
str
Indicates the formalism used to obtain the multi resolution quantity. Can be any of ‘wavelet coef’, ‘wavelet leader’, or ‘wavelet p-leaders’.
- formalism
- Attributes:
- formalism
str
Formalism used. Can be any of ‘wavelet coef’, ‘wavelet leader’, or ‘wavelet p-leaders’.
- n_scales
int
Size of the scale range covered.
- nj
dict
(ndarray
) Contains the number of coefficients at the scale j. Arrays are of the shape (n_rep,)
- values
dict
(ndarray
) values[j] contains the coefficients at the scale j. Arrays are of the shape (nj, n_rep)
- n_rep
int
Number of realisations
- formalism
- classmethod from_dict(d)#
Method to instanciate a dataclass by passing a dictionary with extra keywords
- Parameters:
- d
dict
Dictionary containing at least all the parameters required by __init__, but can also contain other parameters, which will be ignored
- d
- Returns:
MultiResolutionQuantityBase
Properly initialized multi resolution quantity
Notes
Note
Normally, dataclasses can only be instantiated by only specifiying parameters expected by the automatically generated __init__ method. Using this method instead allows us to discard extraneous parameters, similarly to introducing a **kwargs parameter.
- get_nj()#
Returns nj as a list
- get_nj_interv(j1, j2)#
Returns nj as an array, for j in [j1,j2]