hughesadam87 / PAME

Personal programs for fiber optic nanobiosensing simulations.
Other
5 stars 5 forks source link

XUNITS Simplification #26

Closed hughesadam87 closed 9 years ago

hughesadam87 commented 9 years ago

All materials should map to Nanometers as the canonical unit, and then don't have to both converting or non of that crap. Just store materials once. If lambdas change size/samples, then you do need to trigger lambdas changed event. HOWEVER, when units change, this should not trigger a lambdas changed event. Instead, plots should looks for xunit everytime they redraw. You can just call redraw on xunit changed or lambdas changed and it will take care of it. Don't have to bother with reversing material_files in update_data().

In main parms, a mapping to nanometers should be stored at all times and listened to. Therefore, changes to xstart, xend would trigger redraws of this, but beneath the surface, all being stored as nm downstream.

Benefits

- Lambdas changing when xunits change are superfulous and slow down updates to nanomaterials because `update_cross()` updates like 80 times, once for each new material.
hughesadam87 commented 9 years ago

THIS HAS TO BE DONE

Implicitly using distance in nanometers a lot of places (fiber, nanoparticles etc...) and that's probably the reason these calculations are wrong. Therefore, I need to use canonical nm!