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:
formalismstr

Indicates the formalism used to obtain the multi resolution quantity. Can be any of ‘wavelet coef’, ‘wavelet leader’, or ‘wavelet p-leaders’.

Attributes:
formalismstr

Formalism used. Can be any of ‘wavelet coef’, ‘wavelet leader’, or ‘wavelet p-leaders’.

n_scalesint

Size of the scale range covered.

njdict(ndarray)

Contains the number of coefficients at the scale j. Arrays are of the shape (n_rep,)

valuesdict(ndarray)

values[j] contains the coefficients at the scale j. Arrays are of the shape (nj, n_rep)

n_repint

Number of realisations

classmethod from_dict(d)#

Method to instanciate a dataclass by passing a dictionary with extra keywords

Parameters:
ddict

Dictionary containing at least all the parameters required by __init__, but can also contain other parameters, which will be ignored

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]