DiffractionGrating
Bases: OpticalAperture_Type
Represents the XML element DiffractionGrating.
A Diffraction Grating is an optical component with a periodic structure that splits and diffracts light into several beams travelling in different directions.
getTypeName()
Returns the class type name.
Returns:
| Type | Description |
|---|---|
string
|
The class type name |
getXMLName()
Returns the XML element name corresponding to this class.
Returns:
| Type | Description |
|---|---|
string
|
The XML element name |
getNBOType()
Returns the NBO Type corresponding to this class.
Returns:
| Type | Description |
|---|---|
int
|
The NBO Type value |
getChildren()
Returns a list of all classes derived from this class.
Returns:
| Type | Description |
|---|---|
List[NBOBaseClass]
|
The list of derived classes |
getSubElements()
Returns a list of all child elements contained in this class.
Returns:
| Type | Description |
|---|---|
List[NBOBaseClass]
|
The list of child classes |
fromJsonFile(path)
Populates this object from a JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
string
|
The path to the JSON file |
required |
fromJsonString(json_string)
Populates this object from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_string
|
string
|
The JSON content as a string |
required |
fromXmlFile(path)
Populates this object from a XML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
string
|
The path to the XML file |
required |
fromXmlString(xml_string)
Populates this object from a XML string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xml_string
|
string
|
The XML content as a string |
required |
toXmlFile(filename)
Serializes this object to an XML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
string
|
The path to the output XML file |
required |
toXmlString()
Serializes this object to an XML string.
Returns:
| Type | Description |
|---|---|
string
|
A string containing the XML representation of this object |
setPeriod(value)
Sets the value of the Period attribute.
This field records the spacing between the centers of two adjacent slits (d).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
The value to set |
required |
getPeriod()
Returns the value of the Period attribute.
This field records the spacing between the centers of two adjacent slits (d).
Returns:
| Type | Description |
|---|---|
float
|
The value of the attribute |
setPeriodUnit(value)
Sets the value of the PeriodUnit attribute.
No description available in the XSD standard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
UnitsLength_Type
|
The value to set |
required |
getPeriodUnit()
Returns the value of the PeriodUnit attribute.
No description available in the XSD standard.
Returns:
| Type | Description |
|---|---|
UnitsLength_Type
|
The value of the attribute |
resetPeriodUnit()
Resets the PeriodUnit attribute to an unset state.
No description available in the XSD standard.
hasPeriodUnit()
Checks whether the optional PeriodUnit attribute is present.
No description available in the XSD standard.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setSpatialFrequency(value)
Sets the value of the SpatialFrequency attribute.
This field records the number of slits (or lines) per unit length (1/d). Typically it is measured in terms of number of slits per millimiter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
The value to set |
required |
getSpatialFrequency()
Returns the value of the SpatialFrequency attribute.
This field records the number of slits (or lines) per unit length (1/d). Typically it is measured in terms of number of slits per millimiter.
Returns:
| Type | Description |
|---|---|
float
|
The value of the attribute |
setTransmittive(value)
Sets the value of the Transmittive attribute.
This field records whether the periodic fine structure of this Diffraction Grating is Transmissive (True) and therefore refracts light, or is Reflective (False) and therefore reflects it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
boolean
|
The value to set |
required |
getTransmittive()
Returns the value of the Transmittive attribute.
This field records whether the periodic fine structure of this Diffraction Grating is Transmissive (True) and therefore refracts light, or is Reflective (False) and therefore reflects it.
Returns:
| Type | Description |
|---|---|
boolean
|
The value of the attribute |
resetTransmittive()
Resets the Transmittive attribute to an unset state.
This field records whether the periodic fine structure of this Diffraction Grating is Transmissive (True) and therefore refracts light, or is Reflective (False) and therefore reflects it.
hasTransmittive()
Checks whether the optional Transmittive attribute is present.
This field records whether the periodic fine structure of this Diffraction Grating is Transmissive (True) and therefore refracts light, or is Reflective (False) and therefore reflects it.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setModulationMode(value)
Sets the value of the ModulationMode attribute.
This field indicates what aspect of the light beam is modulated by this device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
ModulationModeList_Type
|
The value to set |
required |
getModulationMode()
Returns the value of the ModulationMode attribute.
This field indicates what aspect of the light beam is modulated by this device.
Returns:
| Type | Description |
|---|---|
ModulationModeList_Type
|
The value of the attribute |
resetModulationMode()
Resets the ModulationMode attribute to an unset state.
This field indicates what aspect of the light beam is modulated by this device.
hasModulationMode()
Checks whether the optional ModulationMode attribute is present.
This field indicates what aspect of the light beam is modulated by this device.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setRonchi(value)
Sets the value of the Ronchi attribute.
This field records whether this Diffraction Grating has a square wave profile, as defined by Ronchi (True) or a sine wave profile (False).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
boolean
|
The value to set |
required |
getRonchi()
Returns the value of the Ronchi attribute.
This field records whether this Diffraction Grating has a square wave profile, as defined by Ronchi (True) or a sine wave profile (False).
Returns:
| Type | Description |
|---|---|
boolean
|
The value of the attribute |
resetRonchi()
Resets the Ronchi attribute to an unset state.
This field records whether this Diffraction Grating has a square wave profile, as defined by Ronchi (True) or a sine wave profile (False).
hasRonchi()
Checks whether the optional Ronchi attribute is present.
This field records whether this Diffraction Grating has a square wave profile, as defined by Ronchi (True) or a sine wave profile (False).
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |