Home Forums Nazca GDS handling in nazca

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  weiming 7 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5382

    weiming
    Participant

    Dear Nazca team,

    I have a question about gds handling in nazca. I want to load a gds, read out all top cells and write to another gds. So far I am using a statement similar to

    bb_lib = nd.gds_import.GDSII_stream(filename=some file, layermap=some layers)
    #get the top cells from gds
    cellList = bb_lib.topcell()

    # write a specific cell out
    bb_lib.GDSII_write_cellcellname = cellList[1]

    I do get the error

        …self.GDSII_write_cell_and_under(f, cellname)

         AttributeError: ‘GDSII_stream’ object has no attribute ‘GDSII_write_cell_and_under’

    It seems to me that the function GDSII_write_cell_and_under is missing. Is there a better way for me to do the task?

    Version: 0.4.3.post2

    Thanks!

    #5385

    Xaveer
    Moderator

    Dear Weiming,

    You could use the following:

    import nazca as nd
    
    cells = nd.load_gds('input_abc.gds', asdict=True)
    
    # Assume this file has top cells 'a', 'b' and 'c'.
    
    # Only export 'a' and 'b'.
    export_cells = [cells['a'], cells['b']]
    
    nd.export_gds(export_cells, filename='export_ab.gds')

    Please note that the name of the exported cell can be different when it was already in use when importing the gds file. The actual cell name is in e.g. cells['a'].cell_name

    Xaveer

    #5386

    weiming
    Participant

    Hi Xaveer,

    thanks! That works perfectly.

    Regards,

    Weiming

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.