spyrit.misc.sampling.define_order

spyrit.misc.sampling.define_order(n: int, order: str, pdf: bool = False)[source]

Creation of a Hadamard pattern order

Parameters:
  • n (int) – Dimension. (Patterns of size n by n)

  • order (string) – Type of order.

  • pdf (bool, optional) – If True the function returns a normalised PDF such that the sum of the values of the output tensor is equal to one. If False the output is the ranking associated to each pattern. The default is False.

Returns:

torch.tensor – tensor of size n by n containing the PDF or ranks.