Any2HRTF / Mesh2HRTF

Open software for the numerical calculation of head-related transfer functions
European Union Public License 1.2
113 stars 16 forks source link

Faster re-compute with new evaluation grid #85

Open iyobill opened 1 year ago

iyobill commented 1 year ago

Thanks for this great tool! I was wondering, is there a simple way to run a new evaluation grid for an already-completed Mesh2HRTF calculation? I understand that an evaluation grid can have any number of points in it but if I do want to go back to a previously computed instance with a new set of evaluation grid points I'd like not to have to re-compute the boundary element variable data since that takes a lot of time to do. Thanks for your time and effort.

ToDo

f-brinkmann commented 1 year ago

Yes, this should be possible in theory. If I'm not mistaken, it would at least require an additional NumCalc command line parameter and either a manual or scripted edit of the project folder (add grids and update NC.inp files) or a corresponding option in the Blender export script mesh2input.py.

I can't estimate the effort for the first step, but the second step would probably take more time than I currently have.

@schaastrommla - what do you think?

schaastrommla commented 1 year ago

I will have a closer look as soon as possible. In principle I see no problem, we just have to be careful not to overwrite already computed results. But it should be possible with one or two command line parameters.

SDX-LV commented 1 year ago

Hi, just in case you are looking into updating NumCalc - one more improvement that would help a lot with Evaluation Grids is:

Ideally when NumCalc loads each evaluation grid, it should re-number the node IDs to use numbers from for example 10^6 and up. Then there are 10^6 nodes reserved for the 3D mesh and all the evaluation grids will always get valid IDs which would be the same for left and right ear simulations.

To avoid error with the same node IDs in multiple Evaluation grids. Thanks!

f-brinkmann commented 1 year ago

@SDX-LV this issue is handeled here: #86. Might be cleaner than automatically renumbering the nodes, which would mean that the IDs in the output folders are different than the IDs in the EvaluationGrid folder

iyobill commented 1 year ago

Hi All,

Thanks for taking a look at this. Sounds like it is a definite possibility. Looking forward to hearing how it works out.

cheers, Bill

f-brinkmann commented 4 months ago

Update: A first version is now in https://github.com/Any2HRTF/Mesh2HRTF/tree/feature/run_numcalc_from_precomputed_boundary_data but requires manually manipulating the project folder. If anyone is interested in making the option available through the Python or Matlab API, I'm happy to discuss. I fear I won't find time for that soon. It would also be an option to only document the command line tool and merge release it as a feature...