signal.chirp(method='hyp') disallows hyperbolic upsweep #3285

Closed
pijyoi opened this Issue Feb 5, 2014 · 1 comment

Comments

Projects
None yet
4 participants

pijyoi commented Feb 5, 2014

The phase formula used in fact works for both cases:

  1. downsweep: f0 > f1 > 0.0
  2. upsweep: f1 > f0 > 0.0
    However the code (and comments) enforces the downsweep case.
Member

WarrenWeckesser commented Feb 5, 2014

You are right, it should be able to handle both cases. I'll create a pull request to fix this in the next day or so.

@WarrenWeckesser WarrenWeckesser added a commit to WarrenWeckesser/scipy that referenced this issue Feb 6, 2014

@WarrenWeckesser WarrenWeckesser ENH: signal: Allow upsweeps of frequency in the 'hyperbolic' chirp.
The restriction that f0 > f1 > 0 has been removed.  The only requirement
is that f0 and f1 are not zero.  Negative frequencies can be given.
(Even f0 and f1 with opposite signs are allowed, but this is not expected
to be a useful case.)  The degenerate case with f0 == f1 is now also
handled.

Two small changes not directly related to the above change:
* Changed "geometric" to "logarithmic" in the argument of the ValueError
  that can be raised when method="logaithmic".
* Added `t = asarray(t)` in the function _chirp_phase, so the 't' argument
  of `chirp` is now `array_like`.

Closes gh-3285.
2384e67

@WarrenWeckesser WarrenWeckesser added a commit to WarrenWeckesser/scipy that referenced this issue Feb 6, 2014

@WarrenWeckesser WarrenWeckesser ENH: signal: Allow upsweeps of frequency in the 'hyperbolic' chirp.
The restriction that f0 > f1 > 0 has been removed.  The only requirement
is that f0 and f1 are not zero.  Negative frequencies can be given.
(Even f0 and f1 with opposite signs are allowed, but this is not expected
to be a useful case.)  The degenerate case with f0 == f1 is now also
handled.

Two small changes not directly related to the above change:
* Changed "geometric" to "logarithmic" in the argument of the ValueError
  that can be raised when method="logaithmic".
* Added `t = asarray(t)` in the function _chirp_phase, so the 't' argument
  of `chirp` is now `array_like`.

Closes gh-3285.
889f451

rgommers added this to the 0.14.0 milestone Feb 23, 2014

rgommers closed this in #3293 Feb 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment