MikeSWang / Triumvirate

A Python/C++ package for three-point clustering measurements in LSS analyses
https://mikeswang.github.io/Triumvirate/
GNU General Public License v3.0
19 stars 4 forks source link

[FEAT] Automatic numerical parameters (e.g. box size and grid cell number) #21

Closed MikeSWang closed 3 months ago

MikeSWang commented 1 year ago

Is the requested feature related to an issue?

No.

Summary

Allow the box size and grid cell number to be unset and automatically calculated based on alternative parameters.

Alternatives

N/A

Implementation

An additional expansion factor (as a ratio of the particle coordinate spans) can be added for automatic box sizes. Based on the box sizes and an additional requested Nyquist cutoff (wavenumber or separation), the grid cell numbers are calculated.

Additional context

This saves the user from having to examine the catalogue files in advance to determine the appropriate box sizes.

MikeSWang commented 3 months ago

De-scoped proposal

Allow only the box size to be unset and automatically calculated based on alternative parameters.

The grid cell number will not be automatically determined. It is tied to the introduction of a Nyquist cutoff parameter, which is somewhat (but not entirely) degenerate with the bin range. Too much complexity is introduced at this stage. The user should bear the responsibility for setting such parameters for now.

Future proposal

If the grid cell number is automatically determined, a default binning choice based on the fundamental wavenumber/cell size and the Nyquist cutoff can be deduced.

MikeSWang commented 3 months ago

The de-scoped proposal is implemented in b8d278d86cfbf3c58ecd2a724c03069cb2321b2c and will be included in releases v0.6.0+.

MikeSWang commented 3 months ago

Updated proposal

Also allow only the grid cell number to be automatically calculated based on alternative parameters.

Rejected proposal

No default binning choice based on the fundamental wavenumber/cell size and the Nyquist cutoff will be implemented through parameter files. The C++/Python interface has already included an overloaded method for the binning class. The binning range and number parameters remain mandatory in parameter files.

MikeSWang commented 3 months ago

The original proposal is fully implemented in 06e8fab5773043b90a4ab5e6c1e13bf92279c891 and will be included in releases v0.6.0+.