Stellarator-Tools
intpol Module Reference

Implements interferometry/polarimetry diagnostic. Defines the base class of the type intpol_class. More...

Data Types

interface  intpol_class
 Base class representing a interferometer signal. More...
 
interface  intpol_pol_class
 Base class representing a polarimetry signal. More...
 
type  intpol_int_context
 Struture to hole all memort needed to be sent to the integration callback function. More...
 
type  intpol_pol_context
 Struture to hole all memort needed to be sent to the integration callback function. More...
 
type  intpol_gp_int_context_i
 Structure to hold all memory needed to be sent to the guassian process callback function of a point. More...
 
type  intpol_gp_pol_context_i
 Structure to hold all memory needed to be sent to the guassian process callback function of a point. More...
 
type  intpol_gp_int_context_s
 Structure to hold all memory needed to be sent to the guassian process callback function for signal. More...
 
type  intpol_gp_pol_context_s
 Structure to hold all memory needed to be sent to the guassian process callback function for signal. More...
 
type  intpol_gp_int_context_x
 Structure to hold all memory needed to be sent to the guassian process callback function for position. More...
 
type  intpol_gp_pol_context_x
 Structure to hold all memory needed to be sent to the guassian process callback function for position. More...
 

Functions/Subroutines

class(intpol_class) function, pointer intpol_construct (chord_paths)
 Interface to get the guassian process kernel values. More...
 
class(intpol_pol_class) function, pointer intpol_pol_construct (wavelength, in_degrees, chord_paths)
 Construct a intpol_class object representing a polarimetry diagnostic. More...
 
subroutine intpol_destruct (this)
 Deconstruct a intpol_class object. More...
 
subroutine intpol_pol_destruct (this)
 Deconstruct a intpol_class object. More...
 
real(rprec) function, dimension(4) intpol_get_modeled_signal (this, a_model, sigma, last_value)
 Calculates the interferometry signal. More...
 
real(rprec) function, dimension(4) intpol_pol_get_modeled_signal (this, a_model, sigma, last_value)
 Calculates the polarimetry signal. More...
 
character(len=data_name_length) function intpol_get_type (this)
 Gets a discription of the intpol type. More...
 
real(rprec) function intpol_get_gp_i (this, a_model, i, flags)
 Gets the guassian process kernel for an inteferometry signal and a position. More...
 
real(rprec) function intpol_get_gp_s (this, a_model, signal, flags)
 Gets the guassian process kernel for an inteferometry signal and a signal. More...
 
real(rprec) function intpol_get_gp_x (this, a_model, x_cart, flags)
 Gets the guassian process kernel for a inteferometry signal and a cartesian position. More...
 
real(rprec) function intpol_pol_get_gp_i (this, a_model, i, flags)
 Gets the guassian process kernel for an polarimetry signal and a position. More...
 
real(rprec) function intpol_pol_get_gp_s (this, a_model, signal, flags)
 Gets the guassian process kernel for an polarimetry signal and a signal. More...
 
real(rprec) function intpol_pol_get_gp_x (this, a_model, x_cart, flags)
 Gets the guassian process kernel for a polarimetry signal and a cartesian position. More...
 

Variables

real(rprec), parameter intpol_polar_constant = 2.62E-13_dp
 Constant term for the polarimety.
 

Detailed Description

Implements interferometry/polarimetry diagnostic. Defines the base class of the type intpol_class.

Super Class:
diagnostic

Function/Subroutine Documentation

◆ intpol_construct()

class (intpol_class) function, pointer intpol::intpol_construct ( real (rprec), dimension(:,:)  chord_paths)

Interface to get the guassian process kernel values.

Construct a intpol_class object representing a interferometer diagnostic.

Allocates memory and initializes a intpol_class object.

Parameters
[in]chord_pathsThe nodes of a multi point segment integration path.
Returns
A pointer to a constructed intpol_class object.

◆ intpol_destruct()

subroutine intpol::intpol_destruct ( type (intpol_class), intent(inout)  this)

Deconstruct a intpol_class object.

Deallocates memory and uninitializes a intpol_class object.

Parameters
[in,out]thisA intpol_class instance.

◆ intpol_get_gp_i()

real (rprec) function intpol::intpol_get_gp_i ( class (intpol_class), intent(in)  this,
class (model_class), pointer  a_model,
integer, intent(in)  i,
integer, intent(in)  flags 
)

Gets the guassian process kernel for an inteferometry signal and a position.

Calculates the guassian process kernel between the signal and the position. Density kernels are provided by model::model_get_gp_ne.

Parameters
[in]thisA intpol_class instance.
[in]a_modelA model instance.
[in]iIndex of the position for the kernel.
[in]flagsState flags to send to the kernel.
Returns
Kernel value for the position and the signal.

◆ intpol_get_gp_s()

real (rprec) function intpol::intpol_get_gp_s ( class (intpol_class), intent(in)  this,
class (model_class), pointer  a_model,
class (signal_class), pointer  signal,
integer, intent(in)  flags 
)

Gets the guassian process kernel for an inteferometry signal and a signal.

Calculates the guassian process kernel between the signal and a signal. Calls back to the signal module to call the other signal. This is the first signal.

Parameters
[in]thisA intpol_class instance.
[in]a_modelA model instance.
[in]signalA signal_class instance.
[in]flagsState flags to send to the kernel.
Returns
Kernel value for the signal and the signal.

◆ intpol_get_gp_x()

real (rprec) function intpol::intpol_get_gp_x ( class (intpol_class), intent(in)  this,
class (model_class), pointer  a_model,
real (rprec), dimension(3), intent(in)  x_cart,
integer, intent(in)  flags 
)

Gets the guassian process kernel for a inteferometry signal and a cartesian position.

Calculates the guassian process kernel between the signal and the position. This is the second signal.

Parameters
[in]thisA intpol_class instance.
[in]a_modelA model instance.
[in]x_cartThe cartesian position of to get the kernel at.
[in]flagsState flags to send to the kernel.
Returns
Kernel value for the signal and the signal.

◆ intpol_get_modeled_signal()

real (rprec) function, dimension(4) intpol::intpol_get_modeled_signal ( class (intpol_class), intent(inout)  this,
class (model_class), pointer  a_model,
real (rprec), dimension(4), intent(out)  sigma,
real (rprec), dimension(4), intent(in)  last_value 
)

Calculates the interferometry signal.

Calculates the modeled signal by integrating along the chord path. The integration function is provided by int_function.

Parameters
[in,out]thisA intpol_class instance.
[in]a_modelA model instance.
[out]sigmaThe modeled sigma.
[in]last_valueLast good value in case the signal did not change.
Returns
The model value.

◆ intpol_get_type()

character (len=data_name_length) function intpol::intpol_get_type ( class (intpol_class), intent(in)  this)

Gets a discription of the intpol type.

Returns a description of the intpol type for use when writting output files.

Parameters
[in]thisA intpol_class instance.
Returns
A string describing the intpol type.

◆ intpol_pol_construct()

class (intpol_pol_class) function, pointer intpol::intpol_pol_construct ( real (rprec), intent(in)  wavelength,
logical, intent(in)  in_degrees,
real (rprec), dimension(:,:)  chord_paths 
)

Construct a intpol_class object representing a polarimetry diagnostic.

Allocates memory and initializes a intpol_class object.

Parameters
[in]wavelengthWavelength of the polarimetry beam.
[in]in_degreesSpecifies if the sigals is degrees or radians. True specifies degree while false specifies radians.
[in]chord_pathsThe nodes of a multi point segment integration path.
Returns
A pointer to a constructed intpol_class object.

◆ intpol_pol_destruct()

subroutine intpol::intpol_pol_destruct ( type (intpol_pol_class), intent(inout)  this)

Deconstruct a intpol_class object.

Deallocates memory and uninitializes a intpol_class object.

Parameters
[in,out]thisA intpol_class instance.

◆ intpol_pol_get_gp_i()

real (rprec) function intpol::intpol_pol_get_gp_i ( class (intpol_pol_class), intent(in)  this,
class (model_class), pointer  a_model,
integer, intent(in)  i,
integer, intent(in)  flags 
)

Gets the guassian process kernel for an polarimetry signal and a position.

Calculates the guassian process kernel between the signal and the position. Density kernels are provided by model::model_get_gp_ne.

Parameters
[in]thisA intpol_pol_class instance.
[in]a_modelA model instance.
[in]iIndex of the position for the kernel.
[in]flagsState flags to send to the kernel.
Returns
Kernel value for the position and the signal.

◆ intpol_pol_get_gp_s()

real (rprec) function intpol::intpol_pol_get_gp_s ( class (intpol_pol_class), intent(in)  this,
class (model_class), pointer  a_model,
class (signal_class), pointer  signal,
integer, intent(in)  flags 
)

Gets the guassian process kernel for an polarimetry signal and a signal.

Calculates the guassian process kernel between the signal and a signal. Calls back to the signal module to call the other signal. This is the first signal.

Parameters
[in]thisA intpol_class instance.
[in]a_modelA model instance.
[in]signalA signal_class instance.
[in]flagsState flags to send to the kernel.
Returns
Kernel value for the signal and the signal.

◆ intpol_pol_get_gp_x()

real (rprec) function intpol::intpol_pol_get_gp_x ( class (intpol_pol_class), intent(in)  this,
class (model_class), pointer  a_model,
real (rprec), dimension(3), intent(in)  x_cart,
integer, intent(in)  flags 
)

Gets the guassian process kernel for a polarimetry signal and a cartesian position.

Calculates the guassian process kernel between the signal and the position. This is the second signal.

Parameters
[in]thisA intpol_pol_class instance.
[in]a_modelA model instance.
[in]x_cartThe cartesian position of to get the kernel at.
[in]flagsState flags to send to the kernel.
Returns
Kernel value for the signal and the signal.

◆ intpol_pol_get_modeled_signal()

real (rprec) function, dimension(4) intpol::intpol_pol_get_modeled_signal ( class (intpol_pol_class), intent(inout)  this,
class (model_class), pointer  a_model,
real (rprec), dimension(4), intent(out)  sigma,
real (rprec), dimension(4), intent(in)  last_value 
)

Calculates the polarimetry signal.

Calculates the modeled signal by integrating along the chord path. The integration function is provided by @ ref pol_function.

Parameters
[in,out]thisA intpol_pol_class instance.
[in]a_modelA model instance.
[out]sigmaThe modeled sigma.
[in]last_valueLast good value in case the signal did not change.
Returns
The model value.