Skip to content

bug in coarse channel frequency calculation #5

@lacker

Description

@lacker

I think there's a bug in the code that calculates the center frequencies of the coarse channels - https://github.com/UCBerkeleySETI/hpguppi_proc/blob/mark_r/src/hpguppi_coherent_bf_thread.c#L384

Basically this expression:

((n_chan_per_node-1)/2)

since it's an integer expression, it's doing integer arithmetic, which means truncating the result of a division. I think the intention of this code is to calculate the center of the channel and in that case it should be doing a floating point division.

There's a similar issue in the upchannelizing version of the code and perhaps elsewhere.

Metadata

Metadata

Assignees

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