bilby.gw.detector.strain_data.NotchList

class bilby.gw.detector.strain_data.NotchList(notch_list)[source]

Bases: list

__init__(notch_list)[source]

A list of notches

Parameters:
notch_list: list

A list of length-2 tuples of the (max, min) frequency for the notches.

Raises:
ValueError

If the list is malformed.

__call__(*args, **kwargs)

Call self as a function.

Methods

__init__(notch_list)

A list of notches

append(object, /)

Append object to the end of the list.

check_frequency(freq)

Check if freq is inside the notch list

clear(/)

Remove all items from list.

copy(/)

Return a shallow copy of the list.

count(value, /)

Return number of occurrences of value.

extend(iterable, /)

Extend list by appending elements from the iterable.

index(value[, start, stop])

Return first index of value.

insert(index, object, /)

Insert object before index.

pop([index])

Remove and return item at index (default last).

remove(value, /)

Remove first occurrence of value.

reverse(/)

Reverse IN PLACE.

sort(*[, key, reverse])

Sort the list in ascending order and return None.

append(object, /)

Append object to the end of the list.

check_frequency(freq)[source]

Check if freq is inside the notch list

Parameters:
freq: float

The frequency to check

Returns:
True/False:

If freq inside any of the notches, return True, else False

clear(/)

Remove all items from list.

copy(/)

Return a shallow copy of the list.

count(value, /)

Return number of occurrences of value.

extend(iterable, /)

Extend list by appending elements from the iterable.

index(value, start=0, stop=sys.maxsize, /)

Return first index of value.

Raises ValueError if the value is not present.

insert(index, object, /)

Insert object before index.

pop(index=-1, /)

Remove and return item at index (default last).

Raises IndexError if list is empty or index is out of range.

remove(value, /)

Remove first occurrence of value.

Raises ValueError if the value is not present.

reverse(/)

Reverse IN PLACE.

sort(*, key=None, reverse=False)

Sort the list in ascending order and return None.

The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained).

If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values.

The reverse flag can be set to sort in descending order.