polyphys.manage.types#
polyphys.manage.types#
This types module provides type definitions and type
aliases to support clarity, type safety, and documentation for the data
structures and classes used within the PolyPhys package.
Custom types here represent domain-specific concepts such as PropertyT,
EntityT, and DirectionT, which clarify the usage of fundamental
types like str, int, and bool. PhaseT and StageT are the phase and
stage vocabularies that make_database()
checks its arguments against, and NormalizerT the ways a density profile
may be normalized.
Composite types such as tuples and dictionaries (TimeSeriesT, NonScalarHistT, etc.) group related information for structured data handling.
This module also defines type aliases for input sources and simulation metadata.
Module Attributes
A parser instance, an instance of a |
|
A parser class, a subclass of |
|
A file-system path, a |
|
An iterable of paths. |
|
The paths of one group, such as the files that share a basename, e.g. |
|
An iterable of path groups, e.g. |
|
An iterable of paths or of path groups, for user-facing functions. |
|
A Cartesian axis, 0, 1, or 2 for x, y, or z. |
|
How |
|
A direction of a histogram or profile, |
|
The name of an artifact at the |
|
A species label, such as |
|
The geometry of a simulation box, a periodic |
|
A particle group, such as |
|
Whether a quantity has bin edges. |
|
A level of the artifact lineage. |
|
How the segments of a whole combine; |
|
A phase directory of a project, in the order the data flows through them; |
|
How a density profile is normalized, by the value of its first bin ( |
|
A Cartesian plane, |
|
A lineage level that the probe writes, |
|
The name of a physical property, such as |
|
A stage of a phase directory; |
|
The topology of a chain, such as |
|
The name of an artifact at the |
|
Bin edges keyed by name. |
|
A direction and a particle group. |
|
An ensemble's name and its data. |
|
Frequencies keyed by name. |
|
A direction, a species, and a particle group. |
|
Binding statistics of H-NS proteins keyed by name. |
|
A property, a species, a particle group, and an axis. |
|
A property, a species, and a particle group. |
|
A property, a species, and a particle group. |
|
The data of wholes keyed by whole name. |
|
An open file, a |
Classes
The name of an artifact at the |
|
A species label, such as |
|
A particle group, such as |
|
Whether a quantity has bin edges. |
|
The name of a physical property, such as |
|
The topology of a chain, such as |
|
The name of an artifact at the |
- polyphys.manage.types.AnyPathIter#
An iterable of paths or of path groups, for user-facing functions.
alias of
Iterable[str|PathLike[str]] |Iterable[Sequence[str|PathLike[str]]]
- polyphys.manage.types.BinT#
How
fixedsize_bins()fits a range to whole bins,'ordinary','nonnegative', or'periodic'.alias of
Literal[‘ordinary’, ‘nonnegative’, ‘periodic’]
- polyphys.manage.types.DirectionT#
A direction of a histogram or profile,
'x','y','z', the radial'r', or the azimuthal'theta'.alias of
Literal[‘x’, ‘y’, ‘z’, ‘r’, ‘theta’]
- polyphys.manage.types.EdgeT#
A direction and a particle group.
- polyphys.manage.types.EnsembleName#
The name of an artifact at the
ensemblelevel.
- polyphys.manage.types.EnsembleT#
An ensemble’s name and its data.
- polyphys.manage.types.EntityT#
A species label, such as
'Mon'or'Crd'.
- polyphys.manage.types.GeometryT#
The geometry of a simulation box, a periodic
'cubic'box or a'cylindrical'one, periodic along its axis.alias of
Literal[‘cubic’, ‘cylindrical’]
- polyphys.manage.types.GroupT#
A particle group, such as
'bug'or'all'.
- polyphys.manage.types.HasEdgeT#
Whether a quantity has bin edges.
- polyphys.manage.types.HistogramT#
A direction, a species, and a particle group.
alias of
tuple[Literal[‘x’, ‘y’, ‘z’, ‘r’, ‘theta’],str,str]
- polyphys.manage.types.HnsStatdictT#
Binding statistics of H-NS proteins keyed by name.
- polyphys.manage.types.InputType#
An open file, a
gzip.GzipFile, a text file, or any file object.
- polyphys.manage.types.LineageT#
A level of the artifact lineage.
alias of
Literal[‘segment’, ‘whole’, ‘ensemble_long’, ‘ensemble’, ‘space’]
- polyphys.manage.types.NonScalarHistT#
A property, a species, a particle group, and an axis.
- polyphys.manage.types.NonScalarMatT#
A property, a species, and a particle group.
- polyphys.manage.types.NormalizerT#
How a density profile is normalized, by the value of its first bin (
r = 0, the cylinder axis or the chain’s center of mass), its last bin (the far field along z or in a periodic cube), or its maximum; by a number; or by a function of the scaled profile that returns the value.alias of
Literal[‘first’, ‘last’, ‘max’] |float|Callable[[DataFrame],float]
- polyphys.manage.types.ParserClassT#
A parser class, a subclass of
ParserBase.alias of
type[ParserBase]
- class polyphys.manage.types.ParserInstanceT#
A parser instance, an instance of a
ParserBasesubclass.alias of TypeVar(‘ParserInstanceT’, bound=
ParserBase)
- polyphys.manage.types.PathGroup#
The paths of one group, such as the files that share a basename, e.g.
tuple[Path, ...].
- polyphys.manage.types.PathGroupIter#
An iterable of path groups, e.g.
list[tuple[Path, ...]].
- polyphys.manage.types.Pathish = str | os.PathLike[str]#
A file-system path, a
stror anos.PathLikeofstr.
- polyphys.manage.types.PhaseT#
A phase directory of a project, in the order the data flows through them;
make_database()accepts exactly these.alias of
Literal[‘simsAll’, ‘simsCont’, ‘logs’, ‘trjs’, ‘probes’, ‘analysis’, ‘viz’, ‘galaxy’, ‘allInOne’]
- polyphys.manage.types.PlaneT#
A Cartesian plane,
'xy','yz', or'zx'.alias of
Literal[‘xy’, ‘yz’, ‘zx’]
- polyphys.manage.types.PrimitiveLineageT#
A lineage level that the probe writes,
'segment'or'whole'.alias of
Literal[‘segment’, ‘whole’]
- polyphys.manage.types.PropertyT#
The name of a physical property, such as
'gyrT'.
- polyphys.manage.types.StageT#
A stage of a phase directory;
make_database()accepts exactly these.alias of
Literal[‘segment’, ‘wholeSim’, ‘ens’, ‘ensAvg’, ‘space’, ‘galaxy’]
- polyphys.manage.types.TimeSeriesT#
A property, a species, and a particle group.
- polyphys.manage.types.TopologyT#
The topology of a chain, such as
'linear'or'ring'.
- polyphys.manage.types.WholeName#
The name of an artifact at the
wholelevel.
- polyphys.manage.types.WholeRelationT#
How the segments of a whole combine;
whole_from_segments()sums'histogram'segments, joins'tseries'segments, and checks that'bin_edge'segments agree.alias of
Literal[‘histogram’, ‘tseries’, ‘bin_edge’]