Core Module

class mmpp.core.ScanResult(path, attributes, error=None)[source]

Bases: object

Data class for storing scan results from a single zarr folder.

Parameters:
path: str
attributes: dict[str, Any]
error: Optional[str] = None
__init__(path, attributes, error=None)
Parameters:
class mmpp.core.ZarrJobResult(path, attributes)[source]

Bases: object

Enhanced zarr job result with integrated Pyzfn functionality.

Parameters:
__init__(path, attributes)[source]

Initialize ZarrJobResult with path and attributes.

Parameters:

pathstr

Path to the zarr folder

attributesDict[str, Any]

Metadata attributes

param path:

type path:

str

param attributes:

type attributes:

dict[str, Any]

property z: Group

Get the zarr group (lazy loaded).

property name: str

Get the name of the zarr folder.

property script: Syntax | None

Check if there’s a .mx3* file in the parent directory with the same name as the zarr simulation. If found, return syntax-highlighted content using rich.

Returns:

Syntax-highlighted script or None if no file found

Return type:

Optional[Syntax]

display_script()[source]

Display syntax-highlighted .mx3 script in console.

Return type:

None

__getitem__(item)[source]

Get zarr dataset or group by key.

Parameters:

item (str)

Return type:

Union[Array, Group]

__setitem__(key, value)[source]

Set zarr dataset or attribute.

Parameters:
Return type:

None

__getattr__(name)[source]

Get zarr attribute or dataset by name.

Parameters:

name (str)

Return type:

Union[Array, Group, int, float, str]

property pp

Pretty print the zarr tree.

property p: None

Print the zarr tree.

rm(dset)[source]

Remove a group or dataset.

Return type:

None

Parameters:

dsetstr

Name of dataset or group to remove

param dset:

type dset:

str

is_finished()[source]

Check if simulation is finished.

Return type:

bool

is_running()[source]

Check if simulation is still running.

Return type:

bool

mkdir(name)[source]

Create nested directories.

Return type:

None

Parameters:

namestr

Directory path to create

param name:

type name:

str

get_raw(dset, slices=slice(None, None, None))[source]

Get raw zarr dataset or data using direct indexing. Handles datasets with special characters (like minus) in names.

Return type:

Union[Array, ndarray]

Parameters:

dsetstr

Dataset name (can contain special characters)

slicesArraySlice, optional

Array slicing specification (default: all data)

Returns:

: Union[zarr.Array, np.ndarray]

Raw zarr dataset or numpy array if sliced

Example:

# For dataset names with special characters like “m_z5-8” data = result.get_raw(“m_z5-8”)[:] # or with slicing data = result.get_raw(“m_z5-8”, slice(0, 100))

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

get_raw_data(dset, slices=slice(None, None, None))[source]

Get raw data as numpy array from dataset with special characters.

Return type:

ndarray

Parameters:

dsetstr

Dataset name (can contain special characters)

slicesArraySlice, optional

Array slicing specification (default: all data)

Returns:

: np.ndarray

Numpy array with original dtype

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

get_raw_f32(dset, slices=slice(None, None, None))[source]

Get raw data as float32 array from dataset with special characters.

Return type:

ndarray

Parameters:

dsetstr

Dataset name (can contain special characters)

slicesArraySlice, optional

Array slicing specification (default: all data)

Returns:

: npf32

Float32 numpy array

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

get_raw_c64(dset, slices=slice(None, None, None))[source]

Get raw data as complex64 array from dataset with special characters.

Return type:

ndarray

Parameters:

dsetstr

Dataset name (can contain special characters)

slicesArraySlice, optional

Array slicing specification (default: all data)

Returns:

: npc64

Complex64 numpy array

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

list_datasets()[source]

List all available datasets in the zarr group. Useful for finding datasets with special characters.

Return type:

list[str]

Returns:

: List[str]

List of dataset names

find_datasets(pattern)[source]

Find datasets matching a pattern (supports wildcards).

Return type:

list[str]

Parameters:

patternstr

Pattern to match (supports * and ? wildcards)

Returns:

: List[str]

List of matching dataset names

param pattern:

type pattern:

str

get_dset(dset)[source]

Get zarr dataset.

Return type:

Array

Parameters:

dsetstr

Dataset name

Returns:

: zarr.Array

The zarr dataset

param dset:

type dset:

str

get_f32(dset, slices)[source]

Get float32 array from dataset.

Return type:

ndarray

Parameters:

dsetstr

Dataset name

slicesArraySlice

Array slicing specification

Returns:

: npf32

Float32 numpy array

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

get_c64(dset, slices)[source]

Get complex64 array from dataset.

Return type:

ndarray

Parameters:

dsetstr

Dataset name

slicesArraySlice

Array slicing specification

Returns:

: npc64

Complex64 numpy array

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

get_np1d(dset_str, slices)[source]

Get 1D numpy array from dataset.

Parameters:
Return type:

ndarray

get_np2d(dset_str, slices)[source]

Get 2D numpy array from dataset.

Parameters:
Return type:

ndarray

get_np3d(dset_str, slices)[source]

Get 3D numpy array from dataset.

Parameters:
Return type:

ndarray

get_np4d(dset_str, slices)[source]

Get 4D numpy array from dataset.

Parameters:
Return type:

ndarray

get_np5d(dset_str, slices)[source]

Get 5D numpy array from dataset.

Parameters:
Return type:

ndarray

get_np4dc(dset_str, slices)[source]

Get 4D complex array from modes dataset.

Parameters:
Return type:

ndarray

property mpl: MMPPlotter
property matplotlib: MMPPlotter

Get matplotlib plotter for this single result (alias for mpl).

property fft: FFT

Get FFT analyzer for this single result.

calculate_fft_data(**kwargs)[source]

Direct method for FFT calculation.

get_largest_m_dataset()[source]

Automatically find the m dataset with the largest time dimension.

Return type:

str

Returns:

: str

Name of the largest m dataset (e.g., “m_z5-8”, “m_z11-12”, or fallback “m”)

mmpp.core.find_largest_m_dataset(zarr_path)[source]

Automatically find the m dataset with the largest time dimension.

Return type:

str

Parameters:

zarr_pathstr

Path to zarr file

Returns:

: str

Name of the largest m dataset (e.g., “m_z5-8”, “m_z11-12”, or fallback “m”)

param zarr_path:

type zarr_path:

str

class mmpp.core.MMPP(base_path, max_workers=8, database_name='mmpy_database', debug=False)[source]

Bases: object

Multi-threaded scanner for zarr folders with pandas database creation and search functionality.

This class scans directories recursively for .zarr folders, extracts metadata using Pyzfn, and creates a searchable pandas database.

Parameters:
  • base_path (str)

  • max_workers (int)

  • database_name (str)

  • debug (bool)

__init__(base_path, max_workers=8, database_name='mmpy_database', debug=False)[source]

Initialize the MMPP.

Parameters:

base_pathstr

Base directory path to scan for zarr folders OR direct path to .zarr file

max_workersint, optional

Maximum number of worker threads for scanning (default: 8)

database_namestr, optional

Name of the database file (without extension, default: “mmpy_database”)

debugbool, optional

Enable debug logging (default: False)

param base_path:

type base_path:

str

param max_workers:

type max_workers:

int

param database_name:

type database_name:

str

param debug:

type debug:

bool

__len__()[source]

Return number of zarr results available.

Return type:

int

__getitem__(index)[source]

Get zarr result by index or batch operations by slice.

Return type:

Union[ZarrJobResult, BatchOperations]

Parameters:

indexUnion[int, slice]

Index of the result to get or slice for batch operations

Returns:

: Union[ZarrJobResult, BatchOperations]

Single zarr result for integer index or batch operations for slice

param index:

type index:

Union[int, slice]

__iter__()[source]

Make MMPP iterable.

property mpl: MMPPlotter

Get matplotlib plotter for all results.

property matplotlib: MMPPlotter

Get matplotlib plotter for all results (alias for mpl).

property fft: FFT

Get FFT analyzer for all results.

scan(force=False)[source]

Scan the base directory for zarr folders and create/update the database.

Return type:

DataFrame

Parameters:

forcebool, optional

If True, force rescan even if database exists (default: False)

Returns:

: pd.DataFrame

The resulting database DataFrame

param force:

type force:

bool

force_rescan()[source]

Force a complete rescan of the directory structure.

Return type:

DataFrame

Returns:

: pd.DataFrame

The resulting database DataFrame

get_parsing_examples(zarr_path)[source]

Get examples of how a specific path would be parsed. Useful for debugging path parsing.

Return type:

dict[str, Any]

Parameters:

zarr_pathstr

Path to analyze

Returns:

: Dict[str, Any]

Dictionary showing parsing results for each component

param zarr_path:

type zarr_path:

str

find(**kwargs)[source]

Find zarr folders that match the given criteria. Now returns a PlotterProxy with plotting capabilities.

Return type:

Union[PlotterProxy, list[ZarrJobResult]]

Parameters:

**kwargsAny

Attribute criteria to match (e.g., PBCx=1, Nx=1296, solver=3)

Returns:

: PlotterProxy

Proxy object containing ZarrJobResult objects with plotting capabilities

param kwargs:

type kwargs:

Any

find_paths(**kwargs)[source]

Find zarr folder paths that match the given criteria.

Return type:

list[str]

Parameters:

**kwargsAny

Attribute criteria to match (e.g., PBCx=1, Nx=1296)

Returns:

: List[str]

List of paths to zarr folders matching the criteria

param kwargs:

type kwargs:

Any

find_by_path_param(**kwargs)[source]

Find zarr folders that match path-extracted parameters specifically.

Return type:

list[ZarrJobResult]

Parameters:

**kwargsAny

Path parameter criteria to match (e.g., solver=3, f0=2.15e+09)

Returns:

: List[ZarrJobResult]

List of ZarrJobResult objects matching the criteria

param kwargs:

type kwargs:

Any

find_by_path_param_paths(**kwargs)[source]

Find zarr folder paths that match path-extracted parameters specifically.

Return type:

list[str]

Parameters:

**kwargsAny

Path parameter criteria to match (e.g., solver=3, f0=2.15e+09)

Returns:

: List[str]

List of paths to zarr folders matching the criteria

param kwargs:

type kwargs:

Any

get_job(path)[source]

Get a specific job by its path.

Return type:

Optional[ZarrJobResult]

Parameters:

pathstr

Path to the zarr folder

Returns:

: Optional[ZarrJobResult]

ZarrJobResult object or None if not found

param path:

type path:

str

get_all_jobs()[source]

Get all jobs as ZarrJobResult objects.

Return type:

list[ZarrJobResult]

Returns:

: List[ZarrJobResult]

List of all ZarrJobResult objects in the database

get_database()[source]

Get the current database DataFrame.

Return type:

Optional[DataFrame]

Returns:

: Optional[pd.DataFrame]

The database DataFrame or None if not loaded

get_unique_values(column)[source]

Get unique values for a specific column.

Return type:

list[Any]

Parameters:

columnstr

Column name

Returns:

: List[Any]

List of unique values in the column

param column:

type column:

str

get_summary()[source]

Get a summary of the database.

Return type:

dict[str, Any]

Returns:

: Dict[str, Any]

Summary information about the database

get_path_parameters(zarr_path)[source]

Get parameters extracted from a specific zarr path.

Return type:

dict[str, Any]

Parameters:

zarr_pathstr

Path to the zarr folder

Returns:

: Dict[str, Any]

Dictionary of parameters extracted from the path

param zarr_path:

type zarr_path:

str

get_path_parameter_summary()[source]

Get a summary of all path-extracted parameters and their unique values.

Return type:

dict[str, list[Any]]

Returns:

: Dict[str, List[Any]]

Dictionary mapping parameter names to lists of unique values

list_data(limit=10)[source]

Display a formatted list of all data in the database.

Return type:

None

Parameters:

limitint, optional

Maximum number of entries to display (default: 10, use -1 for all)

param limit:

type limit:

int

__repr__()[source]

Rich representation of MMPP object when printed.

Return type:

str

show(max_rows=1000, height=400)[source]

Show interactive pandas DataFrame viewer.

Return type:

None

Parameters:

max_rowsint, optional

Maximum number of rows to display (default: 1000)

heightint, optional

Height of the table in pixels (default: 400)

param max_rows:

type max_rows:

int

param height:

type height:

int

set_interactive_mode(enabled=True)[source]

Enable or disable interactive display mode.

Return type:

None

Parameters:

enabledbool, optional

Whether to enable interactive mode (default: True)

param enabled:

type enabled:

bool

install_display_deps()[source]

Print installation instructions for interactive display dependencies.

Return type:

None

chunks(batch_size)[source]

Generate chunks of results for batch processing.

Parameters:

batch_sizeint

Number of results per chunk

Yields:

BatchOperations

Batch operations object for each chunk

param batch_size:

type batch_size:

int

mmpp.core.mmpp(base_path, force=False, **kwargs)[source]

Convenience function to create and initialize a MMPP.

Return type:

MMPP

Parameters:

base_pathstr

Base directory path to scan

forcebool, optional

If True, force rescan even if database exists (default: False)

**kwargsAny

Additional arguments passed to MMPP constructor

Returns:

: MMPP

Initialized processor instance

param base_path:

type base_path:

str

param force:

type force:

bool

param kwargs:

type kwargs:

Any

Main Classes

MMPP

class mmpp.core.MMPP(base_path, max_workers=8, database_name='mmpy_database', debug=False)[source]

Bases: object

Multi-threaded scanner for zarr folders with pandas database creation and search functionality.

This class scans directories recursively for .zarr folders, extracts metadata using Pyzfn, and creates a searchable pandas database.

Parameters:
  • base_path (str)

  • max_workers (int)

  • database_name (str)

  • debug (bool)

__init__(base_path, max_workers=8, database_name='mmpy_database', debug=False)[source]

Initialize the MMPP.

Parameters:

base_pathstr

Base directory path to scan for zarr folders OR direct path to .zarr file

max_workersint, optional

Maximum number of worker threads for scanning (default: 8)

database_namestr, optional

Name of the database file (without extension, default: “mmpy_database”)

debugbool, optional

Enable debug logging (default: False)

param base_path:

type base_path:

str

param max_workers:

type max_workers:

int

param database_name:

type database_name:

str

param debug:

type debug:

bool

__len__()[source]

Return number of zarr results available.

Return type:

int

__getitem__(index)[source]

Get zarr result by index or batch operations by slice.

Return type:

Union[ZarrJobResult, BatchOperations]

Parameters:

indexUnion[int, slice]

Index of the result to get or slice for batch operations

Returns:

: Union[ZarrJobResult, BatchOperations]

Single zarr result for integer index or batch operations for slice

param index:

type index:

Union[int, slice]

__iter__()[source]

Make MMPP iterable.

property mpl: MMPPlotter

Get matplotlib plotter for all results.

property matplotlib: MMPPlotter

Get matplotlib plotter for all results (alias for mpl).

property fft: FFT

Get FFT analyzer for all results.

scan(force=False)[source]

Scan the base directory for zarr folders and create/update the database.

Return type:

DataFrame

Parameters:

forcebool, optional

If True, force rescan even if database exists (default: False)

Returns:

: pd.DataFrame

The resulting database DataFrame

param force:

type force:

bool

force_rescan()[source]

Force a complete rescan of the directory structure.

Return type:

DataFrame

Returns:

: pd.DataFrame

The resulting database DataFrame

get_parsing_examples(zarr_path)[source]

Get examples of how a specific path would be parsed. Useful for debugging path parsing.

Return type:

dict[str, Any]

Parameters:

zarr_pathstr

Path to analyze

Returns:

: Dict[str, Any]

Dictionary showing parsing results for each component

param zarr_path:

type zarr_path:

str

find(**kwargs)[source]

Find zarr folders that match the given criteria. Now returns a PlotterProxy with plotting capabilities.

Return type:

Union[PlotterProxy, list[ZarrJobResult]]

Parameters:

**kwargsAny

Attribute criteria to match (e.g., PBCx=1, Nx=1296, solver=3)

Returns:

: PlotterProxy

Proxy object containing ZarrJobResult objects with plotting capabilities

param kwargs:

type kwargs:

Any

find_paths(**kwargs)[source]

Find zarr folder paths that match the given criteria.

Return type:

list[str]

Parameters:

**kwargsAny

Attribute criteria to match (e.g., PBCx=1, Nx=1296)

Returns:

: List[str]

List of paths to zarr folders matching the criteria

param kwargs:

type kwargs:

Any

find_by_path_param(**kwargs)[source]

Find zarr folders that match path-extracted parameters specifically.

Return type:

list[ZarrJobResult]

Parameters:

**kwargsAny

Path parameter criteria to match (e.g., solver=3, f0=2.15e+09)

Returns:

: List[ZarrJobResult]

List of ZarrJobResult objects matching the criteria

param kwargs:

type kwargs:

Any

find_by_path_param_paths(**kwargs)[source]

Find zarr folder paths that match path-extracted parameters specifically.

Return type:

list[str]

Parameters:

**kwargsAny

Path parameter criteria to match (e.g., solver=3, f0=2.15e+09)

Returns:

: List[str]

List of paths to zarr folders matching the criteria

param kwargs:

type kwargs:

Any

get_job(path)[source]

Get a specific job by its path.

Return type:

Optional[ZarrJobResult]

Parameters:

pathstr

Path to the zarr folder

Returns:

: Optional[ZarrJobResult]

ZarrJobResult object or None if not found

param path:

type path:

str

get_all_jobs()[source]

Get all jobs as ZarrJobResult objects.

Return type:

list[ZarrJobResult]

Returns:

: List[ZarrJobResult]

List of all ZarrJobResult objects in the database

get_database()[source]

Get the current database DataFrame.

Return type:

Optional[DataFrame]

Returns:

: Optional[pd.DataFrame]

The database DataFrame or None if not loaded

get_unique_values(column)[source]

Get unique values for a specific column.

Return type:

list[Any]

Parameters:

columnstr

Column name

Returns:

: List[Any]

List of unique values in the column

param column:

type column:

str

get_summary()[source]

Get a summary of the database.

Return type:

dict[str, Any]

Returns:

: Dict[str, Any]

Summary information about the database

get_path_parameters(zarr_path)[source]

Get parameters extracted from a specific zarr path.

Return type:

dict[str, Any]

Parameters:

zarr_pathstr

Path to the zarr folder

Returns:

: Dict[str, Any]

Dictionary of parameters extracted from the path

param zarr_path:

type zarr_path:

str

get_path_parameter_summary()[source]

Get a summary of all path-extracted parameters and their unique values.

Return type:

dict[str, list[Any]]

Returns:

: Dict[str, List[Any]]

Dictionary mapping parameter names to lists of unique values

list_data(limit=10)[source]

Display a formatted list of all data in the database.

Return type:

None

Parameters:

limitint, optional

Maximum number of entries to display (default: 10, use -1 for all)

param limit:

type limit:

int

__repr__()[source]

Rich representation of MMPP object when printed.

Return type:

str

show(max_rows=1000, height=400)[source]

Show interactive pandas DataFrame viewer.

Return type:

None

Parameters:

max_rowsint, optional

Maximum number of rows to display (default: 1000)

heightint, optional

Height of the table in pixels (default: 400)

param max_rows:

type max_rows:

int

param height:

type height:

int

set_interactive_mode(enabled=True)[source]

Enable or disable interactive display mode.

Return type:

None

Parameters:

enabledbool, optional

Whether to enable interactive mode (default: True)

param enabled:

type enabled:

bool

install_display_deps()[source]

Print installation instructions for interactive display dependencies.

Return type:

None

chunks(batch_size)[source]

Generate chunks of results for batch processing.

Parameters:

batch_sizeint

Number of results per chunk

Yields:

BatchOperations

Batch operations object for each chunk

param batch_size:

type batch_size:

int

ZarrJobResult

class mmpp.core.ZarrJobResult(path, attributes)[source]

Bases: object

Enhanced zarr job result with integrated Pyzfn functionality.

Parameters:
__init__(path, attributes)[source]

Initialize ZarrJobResult with path and attributes.

Parameters:

pathstr

Path to the zarr folder

attributesDict[str, Any]

Metadata attributes

param path:

type path:

str

param attributes:

type attributes:

dict[str, Any]

property z: Group

Get the zarr group (lazy loaded).

property name: str

Get the name of the zarr folder.

property script: Syntax | None

Check if there’s a .mx3* file in the parent directory with the same name as the zarr simulation. If found, return syntax-highlighted content using rich.

Returns:

Syntax-highlighted script or None if no file found

Return type:

Optional[Syntax]

display_script()[source]

Display syntax-highlighted .mx3 script in console.

Return type:

None

__getitem__(item)[source]

Get zarr dataset or group by key.

Parameters:

item (str)

Return type:

Union[Array, Group]

__setitem__(key, value)[source]

Set zarr dataset or attribute.

Parameters:
Return type:

None

__getattr__(name)[source]

Get zarr attribute or dataset by name.

Parameters:

name (str)

Return type:

Union[Array, Group, int, float, str]

__repr__()[source]

Return repr(self).

Return type:

str

__str__()[source]

Return str(self).

Return type:

str

property pp

Pretty print the zarr tree.

property p: None

Print the zarr tree.

rm(dset)[source]

Remove a group or dataset.

Return type:

None

Parameters:

dsetstr

Name of dataset or group to remove

param dset:

type dset:

str

is_finished()[source]

Check if simulation is finished.

Return type:

bool

is_running()[source]

Check if simulation is still running.

Return type:

bool

mkdir(name)[source]

Create nested directories.

Return type:

None

Parameters:

namestr

Directory path to create

param name:

type name:

str

get_raw(dset, slices=slice(None, None, None))[source]

Get raw zarr dataset or data using direct indexing. Handles datasets with special characters (like minus) in names.

Return type:

Union[Array, ndarray]

Parameters:

dsetstr

Dataset name (can contain special characters)

slicesArraySlice, optional

Array slicing specification (default: all data)

Returns:

: Union[zarr.Array, np.ndarray]

Raw zarr dataset or numpy array if sliced

Example:

# For dataset names with special characters like “m_z5-8” data = result.get_raw(“m_z5-8”)[:] # or with slicing data = result.get_raw(“m_z5-8”, slice(0, 100))

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

get_raw_data(dset, slices=slice(None, None, None))[source]

Get raw data as numpy array from dataset with special characters.

Return type:

ndarray

Parameters:

dsetstr

Dataset name (can contain special characters)

slicesArraySlice, optional

Array slicing specification (default: all data)

Returns:

: np.ndarray

Numpy array with original dtype

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

get_raw_f32(dset, slices=slice(None, None, None))[source]

Get raw data as float32 array from dataset with special characters.

Return type:

ndarray

Parameters:

dsetstr

Dataset name (can contain special characters)

slicesArraySlice, optional

Array slicing specification (default: all data)

Returns:

: npf32

Float32 numpy array

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

get_raw_c64(dset, slices=slice(None, None, None))[source]

Get raw data as complex64 array from dataset with special characters.

Return type:

ndarray

Parameters:

dsetstr

Dataset name (can contain special characters)

slicesArraySlice, optional

Array slicing specification (default: all data)

Returns:

: npc64

Complex64 numpy array

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

list_datasets()[source]

List all available datasets in the zarr group. Useful for finding datasets with special characters.

Return type:

list[str]

Returns:

: List[str]

List of dataset names

find_datasets(pattern)[source]

Find datasets matching a pattern (supports wildcards).

Return type:

list[str]

Parameters:

patternstr

Pattern to match (supports * and ? wildcards)

Returns:

: List[str]

List of matching dataset names

param pattern:

type pattern:

str

get_dset(dset)[source]

Get zarr dataset.

Return type:

Array

Parameters:

dsetstr

Dataset name

Returns:

: zarr.Array

The zarr dataset

param dset:

type dset:

str

get_f32(dset, slices)[source]

Get float32 array from dataset.

Return type:

ndarray

Parameters:

dsetstr

Dataset name

slicesArraySlice

Array slicing specification

Returns:

: npf32

Float32 numpy array

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

get_c64(dset, slices)[source]

Get complex64 array from dataset.

Return type:

ndarray

Parameters:

dsetstr

Dataset name

slicesArraySlice

Array slicing specification

Returns:

: npc64

Complex64 numpy array

param dset:

type dset:

str

param slices:

type slices:

Union[slice, tuple, int]

get_np1d(dset_str, slices)[source]

Get 1D numpy array from dataset.

Parameters:
Return type:

ndarray

get_np2d(dset_str, slices)[source]

Get 2D numpy array from dataset.

Parameters:
Return type:

ndarray

get_np3d(dset_str, slices)[source]

Get 3D numpy array from dataset.

Parameters:
Return type:

ndarray

get_np4d(dset_str, slices)[source]

Get 4D numpy array from dataset.

Parameters:
Return type:

ndarray

get_np5d(dset_str, slices)[source]

Get 5D numpy array from dataset.

Parameters:
Return type:

ndarray

get_np4dc(dset_str, slices)[source]

Get 4D complex array from modes dataset.

Parameters:
Return type:

ndarray

property mpl: MMPPlotter
property matplotlib: MMPPlotter

Get matplotlib plotter for this single result (alias for mpl).

property fft: FFT

Get FFT analyzer for this single result.

calculate_fft_data(**kwargs)[source]

Direct method for FFT calculation.

get_largest_m_dataset()[source]

Automatically find the m dataset with the largest time dimension.

Return type:

str

Returns:

: str

Name of the largest m dataset (e.g., “m_z5-8”, “m_z11-12”, or fallback “m”)

Data Classes

class mmpp.core.ScanResult(path, attributes, error=None)[source]

Bases: object

Data class for storing scan results from a single zarr folder.

Parameters:
path: str
attributes: dict[str, Any]
error: Optional[str] = None
__init__(path, attributes, error=None)
Parameters: