Skip to content

Fix Bruggeman EMA#173

Merged
MarJMue merged 7 commits intomasterfrom
Bruggeman-fix
Jun 19, 2024
Merged

Fix Bruggeman EMA#173
MarJMue merged 7 commits intomasterfrom
Bruggeman-fix

Conversation

@MarJMue
Copy link
Collaborator

@MarJMue MarJMue commented Jun 7, 2024

The selection of the correct root in the Jansson algorithm was faulty.

This PR fixes one bug in the algorithm, but some numerical problems persist.
Additionally, a new method got implemented which seems to be more stable.

ToDo:

  • Find out why the Jansson algorithm still fails on some samples.
  • Write more tests for mixture materials
  • Determine if the second method is a better default.

@MarJMue MarJMue self-assigned this Jun 7, 2024
@MarJMue MarJMue marked this pull request as ready for review June 18, 2024 21:28
@MarJMue MarJMue requested a review from domna June 18, 2024 21:29
@MarJMue
Copy link
Collaborator Author

MarJMue commented Jun 18, 2024

I have found the mistake for the new algorithm, and it seems to work in all cases I have tested.
(TIL sqrt(a/b) =/= sqrt(a) / sqrt(b) for complex numbers... Should have known better...)

I have subsequently disabled the old code path, as I could not find the error until now.

We might consider disabling the mixture tests or marking them as slow, as they take some time to finish.

@MarJMue MarJMue changed the title Fix for Bruggeman EMA root selection Fix Bruggeman EMA Jun 18, 2024
Copy link
Member

@domna domna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the comments and re-add them if we want to activate them in the future. I did not fully check the algorithm but I think you did enough successful checking already.

@MarJMue MarJMue merged commit adc607c into master Jun 19, 2024
@MarJMue MarJMue deleted the Bruggeman-fix branch June 19, 2024 09:44
MarJMue added a commit that referenced this pull request Jun 20, 2024
* Fix documentation typos
* Correct faulty comparison
* Implement Rouseel-Vanhellemont-Meas algorithm
* Fix RVM algorithm
* Disable Jansson code for now
* Include new tests for mixture materials
* Remove commented-out code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants