Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bda overload to return an implementation #307

Merged
merged 2 commits into from
May 23, 2024

Conversation

sjperkins
Copy link
Member

  • Tests added / passed

    $ py.test -v -s africanus

    If the pre-commit tests fail, install and
    run the pre-commit hooks in your development
    virtuale environment:

    $ pip install pre-commit
    $ pre-commit install
    $ pre-commit run -a
  • Fully documented, including HISTORY.rst for all changes
    and one of the docs/*-api.rst files for new API

    To build the docs locally:

    pip install -r requirements.readthedocs.txt
    cd docs
    READTHEDOCS=True make html

row_avg.uvw,
row_avg.weight,
row_avg.sigma,
# None, # chan_data.chan_freq,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why chan_freq is not returned?

Copy link
Member Author

@sjperkins sjperkins May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. Part of the reason is that it technically transforms to (row, chan) dimensionality as the frequencies and channel widths can also vary per row. This sort of data is available on the meta object, higher up in this namedtuple construction. There's a chan_width member with (row, chan) dimensionality. However, there isn't a chan_freq member. Do you need it? I suppose it wouldn't be necessary if one were only doing time BDA.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I don't need it for this reason but just wanted to make sure it's not an oversight.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should add that when doing time only BDA you shoudn't need uvw to be expanded as rowchan. This actually uses quite a bit of memory. It's not a train smash for now but it might be worth adding a time only BDA function in the future that doesn't do this

Copy link
Collaborator

@landmanbester landmanbester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I've tested this on some simulations and at least the time only case seems to work as expected. Thanks @sjperkins with that we now have BDA support in pfb

@sjperkins sjperkins merged commit 64a6c60 into master May 23, 2024
@sjperkins sjperkins deleted the fix-bda-averaging-call branch May 23, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants