Skip to content

Clarify mesh conventions #2

@adematti

Description

@adematti

pmesh paint() and readout() seem to project particles in [0, boxsize] to [0, nmesh].
Yet, as defined in pmesh, x-coordinates larger than nmesh//2 are flipped to [- nmesh//2, 0].
Hence this function: https://github.com/adematti/mockfactory/blob/7df2a96bee83db561a64188a2c5491777852c2ce/mockfactory/gaussian_mock.py#L49
To keep current pmesh x-coordinates, one could also paint positions in [-boxsize/2, boxsize/2] (then the [-boxsize/2,0] part is shifted to [boxsize/2, boxsize] in the mesh array), e.g. bccp/nbodykit#659, but this is somewhat counter-intuitive (to me).
It'd be great to stick with one convention in the clustering pipeline.
@pmcdonal, any suggestion?

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