CoolFace
Datasetpublic

sammlapp/Alberta_SBT_2016_REVI_Localized

Red-eyed Vireo localized songs Creators: Sam Lapp (sam.lapp@pitt.edu) [1], Scott J. Wilson [2], Erin Bayne [3], and Justin Kitzes [1] Affiliations: [1] University of Pittsburgh, [2] Government of Alberta, [3] University of Alberta Version 1.1 Date Updated: 2026-09-22 DOI: not yet assigned General characteristics audio format: 10 second .FLAC clips starting 4 seconds before localized events dimensions localized: 2number of localization arrays: 13array geometry:… See the full description on the dataset page: https://huggingface.co/datasets/sammlapp/Alberta_SBT_2016_REVI_Localized.

sourceHugging Faceupdated 3d agoView on Hugging Face
0likes97downloads
utils.py41 linesDownload Raw Back to scripts
1import re2import ast3import pandas as pd4import numpy as np5 6 7def parse_list_of_lists(cell):8    # Replace newline characters and convert the cell string to a list of lists9    cell = (10        re.sub(r"\s+", ",", cell.replace("\n", ""))11        .replace("[,", "[")12        .replace(",,", ",")13    )14    # cell = cell.strip(', ')15    return ast.literal_eval(cell)16 17 18def load_event_df(path):19    """load CSV containing localized events, parsing columns that contain lists"""20    df = pd.read_csv(21        path,22        index_col=0,23        converters={24            "receiver_files": parse_list_of_lists,25            "receiver_locations": parse_list_of_lists,26            "tdoas": parse_list_of_lists,27            "cc_maxs": parse_list_of_lists,28            "receiver_start_time_offsets": parse_list_of_lists,29            "distance_residuals": parse_list_of_lists,30            "location_estimate": parse_list_of_lists,31        },32        parse_dates=["start_timestamp"],33    )34    df["residual_rms"] = np.sqrt(35        df["distance_residuals"].apply(lambda x: np.mean(np.square(x)))36    )37    df["x"] = np.array(list(df.location_estimate.values))[:, 0]38    df["y"] = np.array(list(df.location_estimate.values))[:, 1]39 40    return df41