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

remove square pulse in favour of constant #63

Merged
merged 1 commit into from
Jul 18, 2016
Merged

Conversation

caryan
Copy link
Contributor

@caryan caryan commented Jul 18, 2016

The names square or constant make assumptions about what is before or after and having a single pulse shape for "constant" pulses simplifies some TimeAmp checks. Leaving an alias from square -> constant should silently update ChannelParams files.

square or rectangular make assumptions about what is before or after
@coveralls
Copy link

coveralls commented Jul 18, 2016

Coverage Status

Coverage increased (+0.03%) to 73.469% when pulling cc890ca on remove-square into 397d2bd on master.

@@ -42,6 +33,8 @@ def constant(amp=1, length=0, samplingRate=1e9, **params):
numPts = np.round(length * samplingRate)
return amp * np.ones(numPts, dtype=np.complex)

# square is deprecated but alias square to constant
square = constant
Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes we wish we had the equivalent of Julia's @deprecated macro.

@blakejohnson blakejohnson merged commit 6e99be0 into master Jul 18, 2016
@blakejohnson blakejohnson deleted the remove-square branch July 18, 2016 14:37
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.

3 participants