write_phf

photonforge.write_phf(filename, *args)

Save a phf file with components and technologies.

Parameters:
  • filename – File path to save.

  • *args – Instances of Component or Technology to store in the file.

Returns:

None.

Note

Component dependencies and technologies are automatically included in the file.

Example

>>> technology = basic_technology()
>>> component = Component("MAIN", technology=technology)
>>> write_phf("main.phf", component)  # includes component + technology
>>> write_phf("tech.phf", technology)  # only technology in file

See also

Y Splitter