Coder Social home page Coder Social logo

coordinate precision about gdspy HOT 6 CLOSED

heitzmann avatar heitzmann commented on August 19, 2024
coordinate precision

from gdspy.

Comments (6)

enuinc avatar enuinc commented on August 19, 2024

I used another GDS reader and can confirm that the data is stored in the integer. It seems gdspy multiplies whatever values stored in GDS file with the so called DBUperUU, which is 0.001 in my case

I would like to confirm if my understand is correct or not.

Thanks
enuinc

from gdspy.

heitzmann avatar heitzmann commented on August 19, 2024

@enuinc That's correct, Gdspy presents data in user units, not the integers written in the GDSII file.

If you need to change the units when you import a GDSII file (because you are using different user units in different files, for example), it's easier to use the unit argument in GdsLibrary.read_gds.

You might also be interested in this specification.

from gdspy.

enuinc avatar enuinc commented on August 19, 2024

@heitzmann Thanks for the reply. I have two additional questions

  1. Is there a function in gdspy to give me the dbu and uu value in a gds file?
  2. In addition, can gdspy output the polygons in dbu instead uu?

Thanks
enuinc

from gdspy.

heitzmann avatar heitzmann commented on August 19, 2024

@enuinc

  1. Not at this moment, but it should be somewhat easy to implement...
  2. If you know the size of dbu in meters, passing that value to unit will result in coordinates in dbu (nevertheless, datatype will still be float, not int)

Is there a specific use case you're thinking of?

from gdspy.

enuinc avatar enuinc commented on August 19, 2024

@heitzmann

I have a code that take the GDS coordinate and convert them to physical unit when needed. it will be quite a bit work to change various places in the code to take the physical unit directly. right now, it is fine as I can just assume I always work for nm unit and make a hard-coded conversion.

Thanks
enuinc

from gdspy.

heitzmann avatar heitzmann commented on August 19, 2024

@enuinc In da2e56b, GdsLibarry.read_gds adds support to 'import' the units from the GDSII file. GdsLibrary.precision is the file's dbu and GdsLibrary.unit is dbu/uu.

from gdspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.