Skip to content

Windows rounding error fixes

Compare
Choose a tag to compare
@lukasc-ubc lukasc-ubc released this 22 Jan 05:13
· 1193 commits to master since this release

Converting float (microns) to int (nanometers, dbu), use the new function:

from SiEPIC.extend import to_itype
to_itype(value, dbu)

e.g.,

from SiEPIC.extend import to_itype
to_itype(12.131, 0.001)
12131

simply dividing by 0.001 doesn't always return the correct answer.