Commits
341 341 | return [str(p) for p in param] |
342 342 | |
343 343 | |
344 344 | def check_fftthresh(fftthresh): |
345 345 | """ |
346 346 | The fftthresh must be one of the following: |
347 347 | (1) positive value (float, integer or string) |
348 348 | (2) 'top' + positive integer value |
349 349 | (3) positive float value + 'sigma' |
350 350 | """ |
351 - | |
352 351 | has_invalid_type = False |
353 352 | val_not_positive = False |
354 353 | |
355 354 | if isinstance(fftthresh, bool): |
356 355 | # Checking for bool must precede checking for integer |
357 356 | has_invalid_type = True |
358 357 | elif isinstance(fftthresh, int) or isinstance(fftthresh, float): |
359 358 | if (fftthresh <= 0.0): |
360 359 | val_not_positive = True |
361 360 | elif isinstance(fftthresh, str): |