module documentation
Helper functions for naming files.
Most functions are fairly simple, but made to keep a unified and easy-to-handle way of setting filenames. Which should reduce number of errors by typos etc.
| Function | embed |
Embed gap information in filename (position and duration |
| Function | embed |
General function for embedding strings in the filename |
| Function | embed |
embed 'nogap' in filename |
| Function | get |
No summary |
| Function | get |
Generate a new filename if path exists, e.g.: |
| Function | model |
Get name of computed model-output based on state_dict-name |
| Function | threshold |
Get name of computed thresholds based on state_dict-name |
Embed gap information in filename (position and duration
| Parameters | |
filename:str | |
gapfloat | |
gapfloat | |
| Returns | |
str | |
General function for embedding strings in the filename
| Parameters | |
filename:str | original filename |
embeddings:Union[ | string or list of strings to embed in the filename |
| Returns | |
str | |
| Parameters | |
| mode | specify whether to use summed ANF or individual channels (defined |
| bin | specify width of the bins used to down-sample |
| Returns | |
Generate a new filename if path exists, e.g.:
When 'test.txt' exists, the function will check 'test-{n=1}.txt' and increment `n` until the filename doesn't exist.
| Parameters | |
filepath:str | |
| Returns | |
str | |