xdas.atoms.UpSample#

class xdas.atoms.UpSample(factor, scale=True, dim='last')[source]#

Integer upsampling by zero-insertion (and optional energy scaling).

Parameters:
  • factor (int) – Upsampling factor.

  • scale (bool, optional) – If True, scale inserted samples so energy is preserved.

  • dim (str or int, optional) – Dimension to upsample along. Defaults to "last".

__init__(factor, scale=True, dim='last')[source]#

Methods

__init__(factor[, scale, dim])

call(da, **flags)

Upsample da by inserting zeros between every original sample.

initialize(x, **flags)

Initialise the atom from a first chunks of data.

initialize_from_state()

Initialise the atom from its current state.

load_state(path)

Load the atom state from the NetCDF4 file at path.

reset()

Reset all state entries to ... (uninitialised sentinel).

save_state(path)

Serialise the current state to a NetCDF4 file at path.

set_state(state)

Restore the atom state from a previously saved state dict.

Attributes

initialized

True if every state key has been initialised (no ... sentinels remain).

state

Dict of the current state, including nested atom states.