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

Patched TSR wrapping to use Bw_cont and added TSR unit test. #194

Merged
merged 3 commits into from
Oct 9, 2015

Conversation

psigen
Copy link
Member

@psigen psigen commented Sep 29, 2015

This PR addresses #190 by changing the wrapping function to be bounds-aware. This allows wrapping into the Bw interval for checks, and wrapping into the [-pi, pi) interval for samples, and also fixes various bugs with zero-measure intervals wrapping incorrectly.

The PR also adds a unit test for TSRs, although it is very simple right now.

@psigen psigen changed the title Patched TSR wrapping to use Bw_cont and added a unit test. Patched TSR wrapping to use Bw_cont and added TSR unit test. Sep 29, 2015
@mkoval mkoval added the bug label Oct 6, 2015
Bw_interval = numpy.minimum(Bw_interval, 2*pi)

Bw_cont[3:6, 0] = wrap_to_interval(Bw_cont[3:6, 0])
Bw_cont[3:6, 1] = Bw_cont[3:6, 0] + Bw_interval
Copy link
Member

Choose a reason for hiding this comment

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

This can produce values in the range [ -pi, 3*pi ]. Is that intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

How does this happen?

@mkoval
Copy link
Member

mkoval commented Oct 6, 2015

This pull request most likely does not fix the contains function if Bw wraps around pi. However, it does fix a major regression in sample that was causing issues with the block_sorting and table_clearing demos, so I am merging it.

I'll create another issue to track the contains issue.

@psigen
Copy link
Member Author

psigen commented Oct 6, 2015

👍 I think we need to carefully figure out a way to keep Bw_cont and Bw in sync and only use one for the checks going forward.

@mkoval
Copy link
Member

mkoval commented Oct 9, 2015

I logged the contains issue in #199, so I am merging this.

mkoval added a commit that referenced this pull request Oct 9, 2015
Patched TSR wrapping to use Bw_cont and added TSR unit test.
@mkoval mkoval merged commit b08ee7e into master Oct 9, 2015
@mkoval mkoval deleted the bugfix/tsr_wrapping branch October 9, 2015 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants