A structure definition is provided:
type, public :: EllipseT real(single) ::& xAmp,& yAmp,& phase,& ! radians shortSemiAxis,& longSemiAxis,& rotatedAngle ! radians character(10) :: unit ! eg 'pixels', 'detxy', 'tanxy' logical(bool) :: isCircle end type EllipseT
An overloaded subroutine is also provided to initialize a variable of this type:
interface initializeEllipseT subroutine initializeEllipseTScalar(ellipse) type(EllipseT), intent(out) :: ellipse end subroutine initializeEllipseTScalar subroutine initializeEllipseTVector(ellipse) type(EllipseT), intent(out) :: ellipse(:) end subroutine initializeEllipseTVector end interface
For scalar or vector ellipse the values set are:
ellipse%xAmp = 0.0 ellipse%yAmp = 0.0 ellipse%phase = 0.0 ellipse%shortSemiAxis = 0.0 ellipse%longSemiAxis = 0.0 ellipse%rotatedAngle = 0.0 ellipse%unit = 'none' ellipse%isCircle = .false.