Difference between revisions of "ScatterSim:API"

From GISAXS
Jump to: navigation, search
(Created page with "== ScatterSim API == This page documents the general API for the ScatterSim code. === Structure === In general, the objects in the ScatterSim code used to generate simulation...")
 
Line 1: Line 1:
 
== ScatterSim API ==
 
== ScatterSim API ==
 +
(Work in progress)
 +
 +
 
This page documents the general API for the ScatterSim code.
 
This page documents the general API for the ScatterSim code.
  

Revision as of 15:29, 10 July 2017

ScatterSim API

(Work in progress)


This page documents the general API for the ScatterSim code.

Structure

In general, the objects in the ScatterSim code used to generate simulations are either:

  1. NanoObject : the base object
  2. CompositeNanoObject : an arrangement of NanoObject objects
  3. Lattice objects : NanoObjects that are assembled into a lattice.

NanoObjects or Composite NanoObjects

Each of these elements is initialized by calling their initialization class. To initialize a NanoObject or CompositeNanoObject, potential arguments must be supplied:

from ScatterSim.NanoObjects import SphereNanoObject
pargs = {"radius" : 10}
sphere = SphereNanoObject(pargs=pargs)

where pargs is a dictionary containing the parameters that describe the system. Here, a SphereNanoObject only requires a radius as a parameter. Other more complex objects, like CylinderNanoObject may require more parameters (such as height in this case).

Creating a new CompositeNanoObject

Sometimes the objects available are not enough and a more complex objects is needed. Objects may be compounded into more complex NanoObject objects by creating a new CompositeNanoObject.


Vectors