Python scripts for plotting audiograms and related data from Interacoustics Equinox audiometer and Otoaccess software.

Overview

audiometry

Python scripts for plotting audiograms and related data from Interacoustics Equinox 2.0 audiometer and Otoaccess software. Maybe similar scripts exist, but I haven't found them and wrote one myself.

To run, this assumes you have a directory with .xml files that were exported from the Otoaccess software. Ours are named [subj_id]_[date]_audiometry.xml. If you name them this way, the function main() will show the subject ID as the title of each subplot.

The function parse_audiometry() takes in an xml file and outputs a dictionary audiometry that is organized by ear ('Left' and 'Right'). Each side contains another dictionary with the frequency of pure tones played and the measured thresholds in dB HL. For example:

>>> from audiometry import parse_audiometry
>>> audiogram = parse_audiometry('/path/to/subjid_20211101_audiometry.xml')
>>> print(audiogram)
{'Left': {250: 15, 500: 20, 1000: 10, 2000: 5, 4000: 5, 8000: 5},
 'Right': {250: 15, 500: 15, 1000: 10, 2000: 10, 4000: 10, 8000: 0}}

To plot this, you can use the function plot_audiogram():

>>> from audiometry import plot_audiogram, parse_audiometry
>>> from matplotlib import pyplot as plt
>>> plt.ion()
>>> audiogram = parse_audiometry('/path/to/subjid_20211101_audiometry.xml')
>>> fig = plt.figure(1)
>>> plot_audiogram(audiogram, fig=fig, banana='Both', classification=True)
>>> plt.title('subj_id')
>>> plt.savefig('Example_audiogram.png')
>>> plt.show()

Quick Start

You can also just do this to get audiograms for all files in a directory. Might look ugly, YMMV. Assumes you have all your *.xml files in a directory called /path/to/audiograms.

>>> import audiometry
>>> from matplotlib import pyplot as plt
>>> plt.ion()
>>> audiometry.main('/path/to/audiograms')

In progress

Getting out QuickSIN data in addition to pure tone data is in progress but not yet implemented.

Email Liberty Hamilton ([email protected]) with any questions.

You might also like...
🎨 Python Echarts Plotting Library
🎨 Python Echarts Plotting Library

pyecharts Python ❤️ ECharts = pyecharts English README 📣 简介 Apache ECharts (incubating) 是一个由百度开源的数据可视化,凭借着良好的交互性,精巧的图表设计,得到了众多开发者的认可。而 Python 是一门富有表达

:small_red_triangle: Ternary plotting library for python with matplotlib
:small_red_triangle: Ternary plotting library for python with matplotlib

python-ternary This is a plotting library for use with matplotlib to make ternary plots plots in the two dimensional simplex projected onto a two dime

A Python library for plotting hockey rinks with Matplotlib.
A Python library for plotting hockey rinks with Matplotlib.

Hockey Rink A Python library for plotting hockey rinks with Matplotlib. Installation pip install hockey_rink Current Rinks The following shows the cus

termplotlib is a Python library for all your terminal plotting needs.
termplotlib is a Python library for all your terminal plotting needs.

termplotlib termplotlib is a Python library for all your terminal plotting needs. It aims to work like matplotlib. Line plots For line plots, termplot

MPL Plotter is a Matplotlib based Python plotting library built with the goal of delivering publication-quality plots concisely.
MPL Plotter is a Matplotlib based Python plotting library built with the goal of delivering publication-quality plots concisely.

MPL Plotter is a Matplotlib based Python plotting library built with the goal of delivering publication-quality plots concisely.

Analysis and plotting for motor/prop/ESC characterization, thrust vs RPM and torque vs thrust
Analysis and plotting for motor/prop/ESC characterization, thrust vs RPM and torque vs thrust

esc_test This is a Python package used to plot and analyze data collected for the purpose of characterizing a particular propeller, motor, and ESC con

3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK)
3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK)

PyVista Deployment Build Status Metrics Citation License Community 3D plotting and mesh analysis through a streamlined interface for the Visualization

A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews
A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews

hvPlot A high-level plotting API for the PyData ecosystem built on HoloViews. Build Status Coverage Latest dev release Latest release Docs What is it?

Bokeh Plotting Backend for Pandas and GeoPandas
Bokeh Plotting Backend for Pandas and GeoPandas

Pandas-Bokeh provides a Bokeh plotting backend for Pandas, GeoPandas and Pyspark DataFrames, similar to the already existing Visualization feature of

Owner
Hamilton Lab at UT Austin
Hamilton Lab at UT Austin
Plotting data from the landroid and a raspberry pi zero to a influx-db

landroid-pi-influx Plotting data from the landroid and a raspberry pi zero to a influx-db Dependancies Hardware: Landroid WR130E Raspberry Pi Zero Wif

null 2 Oct 22, 2021
An open-source plotting library for statistical data.

Lets-Plot Lets-Plot is an open-source plotting library for statistical data. It is implemented using the Kotlin programming language. The design of Le

JetBrains 820 Jan 6, 2023
An open-source plotting library for statistical data.

Lets-Plot Lets-Plot is an open-source plotting library for statistical data. It is implemented using the Kotlin programming language. The design of Le

JetBrains 509 Feb 17, 2021
Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax.

PyDexter Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax. Setup $ pip install PyDexter

D3xter 31 Mar 6, 2021
A simple code for plotting figure, colorbar, and cropping with python

Python Plotting Tools This repository provides a python code to generate figures (e.g., curves and barcharts) that can be used in the paper to show th

Guanying Chen 134 Jan 2, 2023
NorthPitch is a python soccer plotting library that sits on top of Matplotlib

NorthPitch is a python soccer plotting library that sits on top of Matplotlib.

Devin Pleuler 30 Feb 22, 2022
matplotlib: plotting with Python

Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Check out our home page for more inform

Matplotlib Developers 16.7k Jan 8, 2023
🎨 Python Echarts Plotting Library

pyecharts Python ❤️ ECharts = pyecharts English README ?? 简介 Apache ECharts (incubating) 是一个由百度开源的数据可视化,凭借着良好的交互性,精巧的图表设计,得到了众多开发者的认可。而 Python 是一门富有表达

pyecharts 13.1k Jan 3, 2023
:small_red_triangle: Ternary plotting library for python with matplotlib

python-ternary This is a plotting library for use with matplotlib to make ternary plots plots in the two dimensional simplex projected onto a two dime

Marc 611 Dec 29, 2022
matplotlib: plotting with Python

Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Check out our home page for more inform

Matplotlib Developers 13.1k Feb 18, 2021