Skip to content

Computation power spectra with folding #218

Closed
@JegerBroxterman

Description

@JegerBroxterman

Hi,

The way the power spectra with folding are computed currently is by changing the positions of particles according to

box_over_fold_x = box_x / fold
inv_box_over_fold_x = 1.0 / box_over_fold_x
x_pos = (x_pos % box_over_fold_x) * inv_box_over_fold_x

with fold = 2.0^folding, i.e. (from swiftsimio readthedocs)
image

Should this not be
x_pos = (x_pos % box_over_fold_x) * fold ?

For example, without folding (folding = 0 and fold =1) the positions are now converted to
x_pos = (x_pos % (Lbox/1) ) * 1 / Lbox = x_pos / Lbox

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