MultiChannelMapping

class madspace.MultiChannelMapping(self: madspace._madspace_py.MultiChannelMapping, mappings: collections.abc.Sequence[madspace._madspace_py.Mapping])

Bases: Mapping

Applies one of several channel mappings to each slice of the batch.

A multi-channel integrand covers the phase space with several mappings \(G_i\), each flattening a different structure of the integrand [1]. This class combines them into a single Mapping. The batch is partitioned by the per-channel counts in the return_batch_sizes condition, each slice is passed through its channel mapping, and the results are concatenated. All channel mappings must share the same input, output and condition layout, which this class then exposes. See Sec. 2.1.1 of [1], following [2, 3].

batch is the leading batch dimension.

Inputs

  • the inputs of the channel mappings (identical across channels).

Conditions

  • the conditions of the channel mappings, plus

  • return_batch_sizes – the number of batch entries routed to each channel.

Outputs

  • the outputs of the channel mappings (identical across channels).

In addition every mapping returns a weight (float, shape (batch,)), the Jacobian of the transformation.

References

Parameters:

mappings – The channel mappings. All must have the same number of inputs, outputs and conditions.