utils.extract_parts#
Back to Module page
Summary#
Extracts the parts of the directory name based on the prefix and suffix
Signature#
def extract_parts(directory_name, prefix, suffix)
Name |
Type |
Default |
Description |
|---|---|---|---|
|
Subdirectory name to extract parts from |
||
|
Prefix to match the subdirectories for the given run and source type, can have wildcards (see BBH_PREFIXES etc., for examples). The prefix should match the part of the subdirectory name before the chirp mass id if the chirp mass id is absent, it makes it zero (like O1 BNS) The part after the chirp mass id is supposed to end with the subbank id |
||
|
Any desired suffix to demand at the end of the subdirectory’s name (cand type is the use case). Can be the empty string |
Output variables#
Return annotation |
Docstring type |
Description |
|---|---|---|
|
Docstring#
Extracts the parts of the directory name based on the prefix and suffix
:param directory_name: Subdirectory name to extract parts from
:param prefix:
Prefix to match the subdirectories for the given run and source type,
can have wildcards (see BBH_PREFIXES etc., for examples). The prefix
should match the part of the subdirectory name before the chirp mass id
if the chirp mass id is absent, it makes it zero (like O1 BNS)
The part after the chirp mass id is supposed to end with the subbank id
:param suffix:
Any desired suffix to demand at the end of the subdirectory's name
(cand type is the use case). Can be the empty string
:return: