Closed stealthBanana closed 6 months ago
Hi, phase unwrapping is tricky. Without having thought about the details it might be that you ran into the problem described by Johannes Zaar who proposed spatial unwrapping. For what reason are you looking at the phase?
Hi,
I'm writing to you because I encountered a problem trying to extrapolate the phase angle of the frequency data provided by MEsh2HRTF, I'm trying to plot the unwrapped phase at each azimuth of the evaluation grid, however, in some cases, when unwrapping the phase the cyclicity of the signal is lost, meaning that the phase calculated at 0 and 360 degrees differ to a large amount. This issue appears when I plot the values at 0 deg elevation at a 3500Hz frequency.
The problem can be reproduced with the following code:
This is the resulting plot that I'm getting, the expected result would be that the phase at 0 and 360 degrees are the same value:
The SOFA file has been generated using the Mesh2HRTF tutorial head mesh and the export settings are:
BEM method: ML-FMM BEM
Source Type: Point source
Pictures: False
Reference: True
Compute HRIRs: True
c: 343.18
Evaluation Grids name: Rings_1_0m
Min. frequency: 3500
Max. frequency: 3500
The evaluation grid is a custom grid created with the
write_evaluation_grid.py
script, it has a node for each azimuth degree at 5 different elevations, -30, -15, 0, 15 and 30 degrees with 1m radius:The head mesh has been remeshed with the hrtf_mesh_grading algorithm and the point source has been placed 1cm off the ear.
Here I have attached the SOFA, blender file and evaluation grid. tutorial.zip