class SubstrateSampleField(SampleFieldBase): def __init__(self): super().__init__() self.field_material = MaterialField() self.addField(self.field_material) self.field_angle = AngleField() self.addField(self.field_angle) def title(self): return "Substrate" def description(self): return "An infinitely thick sample" def setAvailableMaterials(self, materials): self.field_material.setAvailableMaterials(materials) self.field_material.setMaterials(materials) def samples(self): builder = SubstrateSampleBuilder() for material in self.field_material.materials(): builder.add_material(material) for tilt_deg in self.field_angle.tiltsDegree(): builder.add_tilt_deg(tilt_deg) for azimuth_deg in self.field_angle.azimuthsDegree(): builder.add_azimuth_deg(azimuth_deg) return super().samples() + builder.build()
def __init__(self): super().__init__() self.field_material = MaterialField() self.addField(self.field_material) self.field_angle = AngleField() self.addField(self.field_angle)
def __init__(self): super().__init__() self.field_layers = LayerBuilderField() self.addField(self.field_layers) self.field_substrate = SubstrateField() self.addField(self.field_substrate) self.field_angle = AngleField() self.addField(self.field_angle)
def __init__(self): super().__init__() self.field_substrate = SubstrateField() self.addField(self.field_substrate) self.field_inclusion = InclusionField() self.addField(self.field_inclusion) self.field_angle = AngleField() self.addField(self.field_angle)
class VerticalLayerSampleField(SampleFieldBase): def __init__(self): super().__init__() self.field_left = LeftSubstrateField() self.addField(self.field_left) self.field_layers = LayerBuilderField() self.addField(self.field_layers) self.field_right = RightSubstrateField() self.addField(self.field_right) self.field_dimension = DimensionField() self.addField(self.field_dimension) self.field_angle = AngleField() self.addField(self.field_angle) def title(self): return "Vertical layered sample" def description(self): return "YZ planes sandwiched between two infinite substrates" def setAvailableMaterials(self, materials): self.field_left.setAvailableMaterials(materials) self.field_layers.setAvailableMaterials(materials) self.field_right.setAvailableMaterials(materials) def samples(self): builder = VerticalLayerSampleBuilder() for material in self.field_left.materials(): builder.add_left_material(material) for layer_builder in self.field_layers.layerBuilders(): builder.add_layer_builder(layer_builder) for material in self.field_right.materials(): builder.add_right_material(material) for depth_m in self.field_dimension.depthsMeter(): builder.add_depth_m(depth_m) for tilt_deg in self.field_angle.tiltsDegree(): builder.add_tilt_deg(tilt_deg) for azimuth_deg in self.field_angle.azimuthsDegree(): builder.add_azimuth_deg(azimuth_deg) return super().samples() + builder.build()
def __init__(self): super().__init__() self.field_left = LeftSubstrateField() self.addField(self.field_left) self.field_layers = LayerBuilderField() self.addField(self.field_layers) self.field_right = RightSubstrateField() self.addField(self.field_right) self.field_dimension = DimensionField() self.addField(self.field_dimension) self.field_angle = AngleField() self.addField(self.field_angle)
class InclusionSampleField(SampleFieldBase): def __init__(self): super().__init__() self.field_substrate = SubstrateField() self.addField(self.field_substrate) self.field_inclusion = InclusionField() self.addField(self.field_inclusion) self.field_angle = AngleField() self.addField(self.field_angle) def title(self): return "Inclusion" def description(self): return "An half-sphere inclusion in a substrate" def setAvailableMaterials(self, materials): self.field_substrate.setAvailableMaterials(materials) self.field_inclusion.setAvailableMaterials(materials) def samples(self): builder = InclusionSampleBuilder() for material in self.field_substrate.materials(): builder.add_substrate_material(material) for material in self.field_inclusion.materials(): builder.add_inclusion_material(material) for diameter_m in self.field_inclusion.diametersMeter(): builder.add_inclusion_diameter_m(diameter_m) for tilt_deg in self.field_angle.tiltsDegree(): builder.add_tilt_deg(tilt_deg) for azimuth_deg in self.field_angle.azimuthsDegree(): builder.add_azimuth_deg(azimuth_deg) return super().samples() + builder.build()
class HorizontalLayerSampleField(SampleFieldBase): def __init__(self): super().__init__() self.field_layers = LayerBuilderField() self.addField(self.field_layers) self.field_substrate = SubstrateField() self.addField(self.field_substrate) self.field_angle = AngleField() self.addField(self.field_angle) def title(self): return "Horizontal layered sample" def description(self): return "A multi-layer sample" def setAvailableMaterials(self, materials): self.field_layers.setAvailableMaterials(materials) self.field_substrate.setAvailableMaterials(materials) def samples(self): builder = HorizontalLayerSampleBuilder() for layer_builder in self.field_layers.layerBuilders(): builder.add_layer_builder(layer_builder) for material in self.field_substrate.materials(): builder.add_substrate_material(material) for tilt_deg in self.field_angle.tiltsDegree(): builder.add_tilt_deg(tilt_deg) for azimuth_deg in self.field_angle.azimuthsDegree(): builder.add_azimuth_deg(azimuth_deg) return super().samples() + builder.build()