File timeseries.py
has 1902 lines of code (exceeds 1000 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2014-2020)
#
# This file is part of GWpy.
#
- Create a ticketCreate a ticket
TimeSeries
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class TimeSeries(TimeSeriesBase):
"""A time-domain data array.
Parameters
----------
- Create a ticketCreate a ticket
Function filter
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def filter(self, *filt, **kwargs):
"""Filter this `TimeSeries` with an IIR or FIR filter
Parameters
----------
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function spectral_variance
has 14 arguments (exceeds 8 allowed). Consider refactoring. Open
def spectral_variance(self, stride, fftlength=None, overlap=None,
- Create a ticketCreate a ticket
Function q_transform
has 14 arguments (exceeds 8 allowed). Consider refactoring. Open
def q_transform(self,
- Create a ticketCreate a ticket
Function resample
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def resample(self, rate, window='hamming', ftype='fir', n=None):
"""Resample this Series to a new rate
Parameters
----------
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function q_transform
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def q_transform(self,
qrange=qtransform.DEFAULT_QRANGE,
frange=qtransform.DEFAULT_FRANGE,
gps=None,
search=.5,
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function average_fft
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def average_fft(self, fftlength=None, overlap=0, window=None):
"""Compute the averaged one-dimensional DFT of this `TimeSeries`.
This method computes a number of FFTs of duration ``fftlength``
and ``overlap`` (both given in seconds), and returns the mean
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function whiten
has 9 arguments (exceeds 8 allowed). Consider refactoring. Open
def whiten(self, fftlength=None, overlap=0, method=DEFAULT_FFT_METHOD,
- Create a ticketCreate a ticket
Function taper
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def taper(self, side='leftright', duration=None, nsamples=None):
"""Taper the ends of this `TimeSeries` smoothly to zero.
Parameters
----------
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"