Skip to content

Enhancement: Matlab or Python like axis slicing #9

@soamaven

Description

@soamaven

Instead of specifying a single index as an argument to these options, you can also specify a range of indices in a Matlab-like notation: start:step:end or start:end (step defaults to 1). This loops over that slice index, from start to end in steps of step, producing a sequence of output PNG files (with the slice index appended to the filename, before the .png).

Matlab (and python) support shorthand for all indices along a dimension (mainly the :: style syntax) as well as "end" shorthand (end in Matlab and -1 in python).

Supporting this would be helpful, e.g. when scripting h5topng with MEEP, and simulations will run until different times. If this is already implemented, it is not obvious how to use this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions