tidy3d icon indicating copy to clipboard operation
tidy3d copied to clipboard

Change default units

Open tylerflex opened this issue 3 years ago • 2 comments
trafficstars

THz picoseconds

Might be something for next release only, but marking it.

tylerflex avatar Jan 29 '22 17:01 tylerflex

I guess better do it earlier rather than later. Come to think of it there shouldn't be much that needs to change on the backend either once the constants are redefined... I'll give it a try.

momchil-flex avatar Jan 29 '22 20:01 momchil-flex

Might be a big change, so let's flesh it out a bit more before digging in:

So the thought here would be perhaps to define a mapping in tidy3d.constants for

LENGTH = MICROMETER
FREQUENCY = TERAHERTZ

etc and then use this to redefine all of the tidy3d constants?

Just noting what would need to also change on the front end.

  • [ ] Change units in the Field() automatically based on the default unit values.
  • [ ] Change all notebooks, docstrings, examples.
  • [ ] Redefine constants in tidy3d.constants
  • [ ] Change any conversion that happens, say, in the fitter (Hz -> eV)
  • [ ] Material library? Frequency ranges?

tylerflex avatar Jan 29 '22 20:01 tylerflex

@momchil-flex are we considering this still? it would be quite a big change but if we're going to do it, should be before 2.0. I'm leaning towards just living with our current units. Thoughts? Close if you agree

tylerflex avatar Feb 09 '23 15:02 tylerflex

I agree, this should have been done a long time ago if ever, too many other things now.

momchil-flex avatar Feb 09 '23 19:02 momchil-flex