Skip to content

Refactor signal removal from background

I've renamed & restructured some new and a lot of existing code in cuda_postcoh_select_background for !148 (merged).

The renames, declaring variables as late as possible, initializing variables as early as possible, scoping variables as deep as possible, I think are all worthwhile.

On the final commit, I tried restructuring it a little. There's a few options here, but I tried making it that any time we'd be looping through a bunch of hist_trials, we jump to a function to perform the action. So cuda_postcoh_select_background is responsible for picking out the peaks, but doesn't go any more fine-grained than that.

It's worked out OK? But our arrays are flattened and allocated dynamically, so we need to pass around a bunch of parameters for array lengths and indexes :|

Merge request reports

Loading