Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of bidirectionality in converting units from mm to nm #1106

Open
kelsonoram opened this issue Oct 17, 2022 · 1 comment
Open

Lack of bidirectionality in converting units from mm to nm #1106

kelsonoram opened this issue Oct 17, 2022 · 1 comment

Comments

@kelsonoram
Copy link

This issue is related to the weird position that nanometers finds itself in as both a unit of length and a unit that describes the energy of light. @ksunden and I found that there is no bidirectionality for converting between mm and nm.

wt.units.is_valid_conversion('mm','nm')
Out[20]: True

wt.units.is_valid_conversion('nm','mm')
Out[21]: False

A discussion should happen about how we want to handle this unit conversion going forward.

@darienmorrow
Copy link
Member

In the past this oddity was handled by separating nm wavelength from nm position. wt.units.is_valid_conversion('nm_p','mm_p') is valid.

I'll note that mm energy units to nm energy units should be a valid conversion. Everyone needs to be able to convert their kitchen microwave's wavelength to energy ( 2.45 GHz to 122 mm) :P

The primary question to answer is: should WrightTools assume that nm, mm, cm, m, etc are energy or distance units?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants