Index by Coordinate#
Summary#
Assign one coordinate value per input point to a one-dimensional bin index.
Metadata#
Import path:
modacor.modules.base_modules.index_by_coordinate.IndexByCoordinateSource:
src/modacor/modules/base_modules/index_by_coordinate.pyModule ID: IndexByCoordinate
Module version: 20261001.1
Keywords: indexing, binning, coordinate, reduction
Required data keys#
None
Modifies#
bin_index: signal, units, axes
bin_edges: signal, units
Required arguments#
None
Default configuration#
{
"bin_edges": null,
"bin_max": null,
"bin_min": null,
"bin_units": null,
"coordinate_key": "Q",
"edges_key": "bin_edges",
"index_key": "bin_index",
"n_bins": null,
"spacing": null,
"with_processing_keys": null
}
Argument specification#
Argument |
Type |
Required |
Default |
Dependency role |
Description |
|---|---|---|---|---|---|
|
list or tuple or NoneType |
No |
- |
- |
Explicit bin edges in bin_units; mutually exclusive with generated-edge settings. |
|
float or int or NoneType |
No |
- |
- |
Generated upper edge in bin_units; inferred when omitted. |
|
float or int or NoneType |
No |
- |
- |
Generated lower edge in bin_units; inferred when omitted. |
|
str or NoneType |
No |
- |
- |
Units for configured limits or edges; defaults to coordinate units. |
|
str |
No |
Q |
processing_read_basedata_key |
BaseData coordinate used to assign bins. |
|
str |
No |
bin_edges |
processing_write_basedata_key |
Output BaseData key recording the physical bin edges. |
|
str |
No |
bin_index |
processing_write_basedata_key |
Output BaseData key for the integer index map. |
|
int or NoneType |
No |
- |
- |
Generated bin count; defaults to 100 when omitted. |
|
str or NoneType |
No |
- |
- |
Generated edge spacing, ‘linear’ or ‘log’; defaults to ‘linear’. |
|
str or list or NoneType |
No |
- |
- |
ProcessingData key(s) whose coordinate should be indexed. |
Notes#
Bins are left-inclusive and right-exclusive except for the included final right edge. Non-finite and out-of-range coordinates receive index -1. Masks are applied by downstream reducers.