Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Separate draw_samples and draw_sequence #533
Separate draw_samples and draw_sequence #533
Changes from 1 commit
0f32556
daafc55
4501e77
91166cf
2fb542d
76276e1
9ee018f
63ab9e4
807c8e8
0bcbf57
ab4f2e3
09c580e
1363f2c
b7b725f
3f4afd4
6757303
2bd97b6
70b3d2c
652484d
e89d060
0309a42
3f56a89
69e9a1f
2a7cf7e
ae3b974
4706247
33b598e
38834ab
f67d642
a0c3692
6c22203
b39a25d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[draw_phase_area] Phase is constant if not modulated, I propose you take
phase_val
as the phase at tf-1 (otherwise I guess it means that we definitely have to provide all the slots of ChannelSchedule to ChannelSamples as TimeSlots)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this seems a reasonable result? I used
sampled_seq.channel_samples[ch].phase[slot.ti:slot.tf][-1]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the perspective of the phase area, it is great !
![image](https://private-user-images.githubusercontent.com/61453516/245411090-053a01be-b078-458d-a5fd-f843709b3581.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMwOTYwMDMsIm5iZiI6MTcyMzA5NTcwMywicGF0aCI6Ii82MTQ1MzUxNi8yNDU0MTEwOTAtMDUzYTAxYmUtYjA3OC00NThkLWE1ZmQtZjg0MzcwOWIzNTgxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA4VDA1NDE0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4MmQ0ZmRjNzEzZWVkN2UyOGZhZjY0YjcwZmFkNWE4ZTc2ODIwNzM2NWM4NWNiODU5YjEwNmJkZTY4Njc5OTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.S7vStCi5O4IuhkiH03ii91S4db9kEzXZjZtgeFyGIDc)
It is also working well from the phase value perspective, but I am noticing a difference between yours and the current version, your version is displaying all the phase whereas we are displaying only the phase shifts.
Nit: You can try
sampled_seq.channel_samples[ch].phase[slot.tf-1]
, it should work as well (and be simpler)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By using
phase_val = sampled_seq.channel_samples[ch].phase[slot.tf-1]
I was getting outofbound; I fixed by passingshown_duration
asextended_duration
to sample().The other issue (displaying all the phase) was a wrong condition, I think I've solved it in the next commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird, to me
sampled_seq.channel_samples[ch].phase[slot.ti:slot.tf][-1]
should be equal tosampled_seq.channel_samples[ch].phase[slot.tf-1]
- and it's weird that one raises an error without the other 😅There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are not equal in python; [A:B] get a slice from index A to index B OR len() if B > len() (try
[1,2][0:1000]
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, thanks for reminding me ;)