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

Fixing unhandled corner case in Frequency #700

Merged
merged 3 commits into from
Jun 17, 2022

Conversation

jhillairet
Copy link
Member

The following should avoid the issues #492 and #91: with Frequency.f properties and Frequency.npoints immutable, users should not be able to modify the frequency points.

The recommended workflow to change the frequency is to use the resampling/interpolating methods, and not directly manipulating the frequency properties.

- remove npoints setter
- remove f setter
- add sweep_type property (sweep_type deduced from f, no more kept from the init)
- also fixing resampling using an integer value, error undetected (added tests)
@github-actions github-actions bot added the Documentation Request/Improvement of the documentation label Jun 12, 2022
@jhillairet jhillairet marked this pull request as ready for review June 12, 2022 11:24
@jhillairet
Copy link
Member Author

notebook tests pass (on my fork), so it's should be OK to be merged. Waiting some days for additional comments if any.

@FranzForstmayr
Copy link
Collaborator

Should we deprecate this "feature" first and removing the functionality one release later?

@jhillairet
Copy link
Member Author

jhillairet commented Jun 13, 2022 via email

@jhillairet jhillairet added this to the v0.23.0 milestone Jun 14, 2022
@jhillairet jhillairet merged commit e200700 into scikit-rf:master Jun 17, 2022
@jhillairet jhillairet deleted the dev/immutable_Frequency branch June 17, 2022 18:52
@jhillairet
Copy link
Member Author

I'll made another PR to make a warning

@jhillairet jhillairet restored the dev/immutable_Frequency branch June 18, 2022 09:26
@jhillairet jhillairet deleted the dev/immutable_Frequency branch June 18, 2022 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Request/Improvement of the documentation fix Bug Fix Media Network
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhandled corner case in Frequency.f.setter Changing networks frequency directly results in wrong data
2 participants