Browse Source

Projektbericht erweitert

master
seyffejn 4 years ago
parent
commit
bcc77e4544

+ 37
- 26
TinnitusAnalyse/.idea/workspace.xml View File

@@ -4,6 +4,8 @@
<list default="true" id="5b3f2136-e422-4072-84be-e86e40fa2d55" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/MyTinnitusFreeSong.wav" beforeDir="false" afterPath="$PROJECT_DIR$/MyTinnitusFreeSong.wav" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Projektbericht/~$ojektbericht.docx" beforeDir="false" afterPath="$PROJECT_DIR$/Projektbericht/~$ojektbericht.docx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Projektbericht/~WRL0004.tmp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/SoundGenerator.py" beforeDir="false" afterPath="$PROJECT_DIR$/SoundGenerator.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/TinnitusAnalyse_GUI.py" beforeDir="false" afterPath="$PROJECT_DIR$/TinnitusAnalyse_GUI.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/TinnitusDaten.csv" beforeDir="false" afterPath="$PROJECT_DIR$/TinnitusDaten.csv" afterDir="false" />
@@ -17,11 +19,11 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/TinnitusAnalyse_GUI.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret line="234" column="42" selection-start-line="234" selection-start-column="42" selection-end-line="234" selection-end-column="42" />
<state relative-caret-position="82">
<caret line="231" column="64" selection-start-line="231" selection-start-column="64" selection-end-line="231" selection-end-column="64" />
<folding>
<element signature="e#0#30#0" expanded="true" />
</folding>
@@ -38,11 +40,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/SoundGenerator.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="583">
<caret line="257" selection-start-line="257" selection-end-line="257" />
<state relative-caret-position="275">
<caret line="382" column="34" selection-start-line="376" selection-start-column="8" selection-end-line="392" selection-end-column="18" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
@@ -50,6 +52,15 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python35/Lib/site-packages/scipy/signal/signaltools.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-636">
<caret line="1694" column="4" selection-start-line="1694" selection-start-column="4" selection-end-line="1694" selection-end-column="4" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
@@ -105,9 +116,9 @@
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="2520" />
<option name="y" value="-21" />
<component name="ProjectFrameBounds" extendedState="7">
<option name="x" value="313" />
<option name="y" value="-25" />
<option name="width" value="1294" />
<option name="height" value="1407" />
</component>
@@ -273,7 +284,7 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="2552" y="-8" width="1696" height="1026" extended-state="6" />
<frame x="-8" y="-8" width="2576" height="1416" extended-state="7" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" weight="0.25" />
@@ -281,7 +292,7 @@
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" weight="0.47368422" />
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.4731099" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.3998441" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
@@ -339,13 +350,6 @@
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python35/Lib/site-packages/scipy/signal/signaltools.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="28492">
<caret line="1694" column="4" selection-start-line="1694" selection-start-column="4" selection-end-line="1694" selection-end-column="4" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python35/Lib/tkinter/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-3474">
@@ -360,25 +364,32 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/TinnitusAnalyse_GUI.py">
<entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python35/Lib/site-packages/scipy/signal/signaltools.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret line="234" column="42" selection-start-line="234" selection-start-column="42" selection-end-line="234" selection-end-column="42" />
<folding>
<element signature="e#0#30#0" expanded="true" />
</folding>
<state relative-caret-position="-636">
<caret line="1694" column="4" selection-start-line="1694" selection-start-column="4" selection-end-line="1694" selection-end-column="4" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/SoundGenerator.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="583">
<caret line="257" selection-start-line="257" selection-end-line="257" />
<state relative-caret-position="275">
<caret line="382" column="34" selection-start-line="376" selection-start-column="8" selection-end-line="392" selection-end-column="18" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/TinnitusAnalyse_GUI.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="82">
<caret line="231" column="64" selection-start-line="231" selection-start-column="64" selection-end-line="231" selection-end-column="64" />
<folding>
<element signature="e#0#30#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

BIN
TinnitusAnalyse/BeispielMusikDateien/whitenoise.wav View File


BIN
TinnitusAnalyse/MyTinnitusFreeSong.wav View File


BIN
TinnitusAnalyse/Projektbericht/Projektbericht.docx View File


BIN
TinnitusAnalyse/Projektbericht/~$ojektbericht.docx View File


BIN
TinnitusAnalyse/Projektbericht/~WRL0004.tmp → TinnitusAnalyse/Projektbericht/~WRL0244.tmp View File


+ 18
- 18
TinnitusAnalyse/SoundGenerator.py View File

@@ -260,7 +260,7 @@ class Sound:
b, a = signal.iirfilter(order, cutoff_frequencies, rp=max_ripple_passband, btype='bandstop', ftype='butter',
fs=self.music_samplerate) # Diese Funktion erstellt den IIR-Bandpassfilter (links)

music_links = signal.lfilter(b, a, self.music_data[:, 0]) # diese Funktion filtert die Audiodaten
music_links = signal.lfilter(b, a, self.music_data[:, 0]) # diese Funktion wendet den Filter an

# FIR Filterversuch
# b = signal.firwin(order, cutoff_frequencies, pass_zero="bandstop", fs=self.music_samplerate, width=bandwidth,
@@ -374,20 +374,20 @@ class Sound:

print("Speichern beendet.")
self.filterfortschritt = 5, 0 #Nach erfolgreichem Filtern Fortschritt zur Bestätigung auf 5 setzen
# # Plot (hilfreich für Filterentwurf)
# freq, h = signal.freqz(b, a, fs=self.music_samplerate)
# fig, ax = plt.subplots(2, 1, figsize=(8, 6))
# ax[0].plot(freq, 20 * np.log10(abs(h)), color='blue')
# ax[0].set_title("Frequency Response")
# ax[0].set_ylabel("Amplitude (dB)", color='blue')
# ax[0].set_xlim([0, 10000])
# ax[0].set_ylim([-120, 10])
# ax[0].grid()
# ax[1].plot(freq, np.unwrap(np.angle(h)) * 180 / np.pi, color='green')
# ax[1].set_ylabel("Angle (degrees)", color='green')
# ax[1].set_xlabel("Frequency (Hz)")
# ax[1].set_xlim([0, 10000])
# ax[1].set_yticks([-90, -60, -30, 0, 30, 60, 90])
# ax[1].set_ylim([-90, 90])
# ax[1].grid()
# plt.show()
# Plot (hilfreich für Filterentwurf)
freq, h = signal.freqz(b, a, fs=self.music_samplerate)
fig, ax = plt.subplots(2, 1, figsize=(8, 6))
ax[0].plot(freq, 20 * np.log10(abs(h)), color='blue')
ax[0].set_title("Frequency Response")
ax[0].set_ylabel("Amplitude (dB)", color='blue')
ax[0].set_xlim([0, 10000])
ax[0].set_ylim([-120, 10])
ax[0].grid()
ax[1].plot(freq, np.unwrap(np.angle(h)) * 180 / np.pi, color='green')
ax[1].set_ylabel("Angle (degrees)", color='green')
ax[1].set_xlabel("Frequency (Hz)")
ax[1].set_xlim([0, 10000])
ax[1].set_yticks([-90, -60, -30, 0, 30, 60, 90])
ax[1].set_ylim([-90, 90])
ax[1].grid()
plt.show()

+ 1
- 1
TinnitusAnalyse/TinnitusAnalyse_GUI.py View File

@@ -230,7 +230,7 @@ def unten_button_filtere_tinnitus_aus_musik():
"Audiodatei unter dem Namen MyTinnitusFreeSong.wav erstellt", "white", "green")
else:
print("Fehler bei Filterfunktion. Siehe Compiler-Meldungen")
feedback("Fehlgeschlagener Filterversuch. Ein SWAT-Team gut ausgebildeter Affen ist unterwegs!", "red", "white")
feedback("Fehlgeschlagener Filterversuch. Kontaktiere Entwickler und schreibe eventuell auf was genaud du gemacht hast", "red", "white")
except:
feedback("Fehlgeschlagener Filterversuch. Drücke zuerst den Speichern Knopf"
"Stelle sicher, dass die Lautstärke mindestens einer Seite über 0"

+ 10
- 12
TinnitusAnalyse/TinnitusDaten.csv View File

@@ -1,16 +1,14 @@
Vorname;Mustermann
Nachname;Max
linke Frequenz;8420.0
linke Lautstärke;0.5
linkes Rauschen Lautstärke;0.015
linkes Rauschen untere Grenzfrequenz;7440.0
linkes Rauschen obere Grenzfrequenz;11910.0
rechte Frequenz;0.0
rechte Lautstärke;0.0
Vorname;asd
Nachname;asd
linke Frequenz;5040.0
linke Lautstärke;0.08
linkes Rauschen Lautstärke;0.0
linkes Rauschen untere Grenzfrequenz;10.0
linkes Rauschen obere Grenzfrequenz;20000.0
rechte Frequenz;5040.0
rechte Lautstärke;0.11
rechtes Rauschen Lautstärke;0.0
rechtes Rauschen untere Grenzfrequenz;10.0
rechtes Rauschen obere Grenzfrequenz;20000.0
Kommentar;Lediglich auf dem linken Ohr höre ich einen hohen Piepston
und ein leises Rauschen (vergleichbar mit einem laufenden
Kühlschrank)
Kommentar;


BIN
TinnitusAnalyse/__pycache__/SoundGenerator.cpython-35.pyc View File


Loading…
Cancel
Save