Package pulse.problem.laser
Class TrapezoidalPulse
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.problem.laser.PulseTemporalShape
-
- pulse.problem.laser.TrapezoidalPulse
-
- All Implemented Interfaces:
Serializable,Descriptive,Reflexive
public class TrapezoidalPulse extends PulseTemporalShape
A trapezoidal pulse shape, which combines a rise segment, a constant-power segment, and a fall segment. The rise and fall ratios can be changed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TrapezoidalPulse()Constructs a trapezoidal pulse using a default segmentation principle.TrapezoidalPulse(TrapezoidalPulse another)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PulseTemporalShapecopy()doubleevaluateAt(double time)Calculates power using a piecewise function, which corresponds to either a linearly changing, a constant laser power or zero.intgetRequiredDiscretisation()NumericPropertygetTrapezoidalFall()NumericPropertygetTrapezoidalRise()Set<NumericPropertyKeyword>listedKeywords()By default, this will search the children of thisPropertyHolderto collect the types of their listed numeric parameters recursively.voidset(NumericPropertyKeyword type, NumericProperty property)An abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)NumericProperties in subclasses ofAccessible.voidsetTrapezoidalFall(NumericProperty p)voidsetTrapezoidalRise(NumericProperty p)-
Methods inherited from class pulse.problem.laser.PulseTemporalShape
getPrefix, getPulseWidth, init, setPulseWidth, toString
-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getDescriptor, getListeners, ignoreSiblings, initListeners, isListedNumericType, isListedParameter, listedTypes, numericData, parameterListChanged, removeListeners, setPrefix, updateProperties, updateProperty
-
Methods inherited from class pulse.util.Accessible
accessibleChildren, genericProperties, genericProperty, numericProperties, numericProperty, property, update, update
-
Methods inherited from class pulse.util.UpwardsNavigable
addHierarchyListener, getHierarchyListeners, getParent, identify, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Constructor Detail
-
TrapezoidalPulse
public TrapezoidalPulse()
Constructs a trapezoidal pulse using a default segmentation principle. The reader is referred to the.xmlfile containing the default values ofTRAPEZOIDAL_RISE_PERCENTAGEandTRAPEZOIDAL_FALL_PERCENTAGE. The maximum laser power is adjusted to ensure the area of the shape is equal to unity.
-
TrapezoidalPulse
public TrapezoidalPulse(TrapezoidalPulse another)
-
-
Method Detail
-
evaluateAt
public double evaluateAt(double time)
Calculates power using a piecewise function, which corresponds to either a linearly changing, a constant laser power or zero.- Specified by:
evaluateAtin classPulseTemporalShape- Parameters:
time- the time measured from the start of the laser pulse.- Returns:
- a double value, representing the pulse function at
time
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
Description copied from class:PropertyHolderBy default, this will search the children of this
PropertyHolderto collect the types of their listed numeric parameters recursively.- Overrides:
listedKeywordsin classPropertyHolder- Returns:
- a set of
NumericPropertyKeywordinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder.
-
getTrapezoidalRise
public NumericProperty getTrapezoidalRise()
-
getTrapezoidalFall
public NumericProperty getTrapezoidalFall()
-
setTrapezoidalRise
public void setTrapezoidalRise(NumericProperty p)
-
setTrapezoidalFall
public void setTrapezoidalFall(NumericProperty p)
-
set
public void set(NumericPropertyKeyword type, NumericProperty property)
Description copied from class:AccessibleAn abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)
NumericProperties in subclasses ofAccessible. Typically this involves aswitchstatement that goes through the different options for thetypeand invokes differentset(...)methods to update the matchingNumericPropertywithproperty.- Specified by:
setin classAccessible- Parameters:
type- the type, which must be equal by definition toproperty.getType().property- the property, which contains new information.
-
copy
public PulseTemporalShape copy()
- Specified by:
copyin classPulseTemporalShape
-
getRequiredDiscretisation
public int getRequiredDiscretisation()
- Specified by:
getRequiredDiscretisationin classPulseTemporalShape
-
-