V3FIT
Data Types | Functions/Subroutines | Variables
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...
 
type  intpol_gp_context_i
 Structure to hold all memory needed to be sent to the guassian process callback function of a point. More...
 
type  intpol_gp_context_s
 Structure to hold all memory needed to be sent to the guassian process callback function for signal. More...
 
type  intpol_gp_context_x
 Structure to hold all memory needed to be sent to the guassian process callback function for position. More...
 
interface  intpol_pol_class
 Base class representing a polarimetry signal. 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...
 
real(rprec) function, private int_function (context, xcart, dxcart, length, dx)
 Interferometer callback function. More...
 
real(rprec) function, private pol_function (context, xcart, dxcart, length, dx)
 Polarmetry callback function. More...
 
real(rprec) function, private gp_function_i (context, xcart, dxcart, length, dx)
 Electron density gaussian process callback function for signal point kernel evaluation. More...
 
real(rprec) function gp_pol_function_i (context, xcart, dxcart, length, dx)
 Electron density gaussian process callback function for signal point kernel evaluation for a polarimetry signal. More...
 
real(rprec) function gp_function_s (context, xcart, dxcart, length, dx)
 Interferometry gaussian process callback function for signal signal kernel evaluation. More...
 
real(rprec) function gp_pol_function_s (context, xcart, dxcart, length, dx)
 Polarimetry gaussian process callback function for signal signal kernel evaluation. More...
 
real(rprec) function, private gp_function_x (context, xcart, dxcart, length, dx)
 Interferometry gaussian process callback function for kernel evaluation of two positions. More...
 
real(rprec) function gp_pol_function_x (context, xcart, dxcart, length, dx)
 Polarimetry gaussian process callback function for kernel evaluation of two positions. 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

◆ gp_function_i()

real (rprec) function, private intpol::gp_function_i ( character (len=1), dimension(:), intent(in)  context,
real (rprec), dimension(3), intent(in)  xcart,
real (rprec), dimension(3), intent(in)  dxcart,
real (rprec), intent(in)  length,
real (rprec), intent(in)  dx 
)
private

Electron density gaussian process callback function for signal point kernel evaluation.

Returns the value of the density guassian process kernel times the change in path length. This function is passed to integration_path::path_integrate to act as a callback. The density kernel is provided by model::model_get_gp_ne. This is the second signal.

See also
integration_path
Parameters
[in]contextA intpol_gp_context_i for the model.
[in]xcartThe integration point.
[in]dxcartA vector change in path. Not used in this function.
[in]lengthLength along the integration.
[in]dxA scalar change in path.
Returns
The k(x, i)*dl at point x.

Definition at line 889 of file intpol.f.

◆ gp_function_s()

real (rprec) function intpol::gp_function_s ( character (len=1), dimension(:), intent(in)  context,
real (rprec), dimension(3), intent(in)  xcart,
real (rprec), dimension(3), intent(in)  dxcart,
real (rprec), intent(in)  length,
real (rprec), intent(in)  dx 
)

Interferometry gaussian process callback function for signal signal kernel evaluation.

Returns the value of the density guassian process kernel times the change in path length. This function is passed to integration_path::path_integrate to act as a callback. The density kernel is provided by model::model_get_gp_ne. This is the first signal.

See also
integration_path
Parameters
[in]contextA intpol_gp_context_i for the model.
[in]xcartThe integration point.
[in]dxcartA vector change in path. Not used in this function.
[in]lengthLength along the integration.
[in]dxA scalar change in path.
Returns
The k(x, i)*dl at point x.

Definition at line 984 of file intpol.f.

◆ gp_function_x()

real (rprec) function, private intpol::gp_function_x ( character (len=1), dimension(:), intent(in)  context,
real (rprec), dimension(3), intent(in)  xcart,
real (rprec), dimension(3), intent(in)  dxcart,
real (rprec), intent(in)  length,
real (rprec), intent(in)  dx 
)
private

Interferometry gaussian process callback function for kernel evaluation of two positions.

This is the second interferometry signal.

See also
integration_path
Parameters
[in]contextA intpol_gp_context_x for the model.
[in]xcartThe integration point.
[in]dxcartA vector change in path. Not used in this function.
[in]lengthLength along the integration.
[in]dxA scalar change in path.
Returns
The k(x, y)*dl at point y.

Definition at line 1076 of file intpol.f.

◆ gp_pol_function_i()

real (rprec) function intpol::gp_pol_function_i ( character (len=1), dimension(:), intent(in)  context,
real (rprec), dimension(3), intent(in)  xcart,
real (rprec), dimension(3), intent(in)  dxcart,
real (rprec), intent(in)  length,
real (rprec), intent(in)  dx 
)

Electron density gaussian process callback function for signal point kernel evaluation for a polarimetry signal.

Returns the value of the density guassian process kernel times the change in path length. This function is passed to integration_path::path_integrate to act as a callback. The density kernel is provided by model::model_get_gp_ne. This is the second signal.

See also
integration_path
Parameters
[in]contextA intpol_gp_context_i for the model.
[in]xcartThe integration point.
[in]dxcartA vector change in path. Not used in this function.
[in]lengthLength along the integration.
[in]dxA scalar change in path.
Returns
The k(x, i)*dl at point x.

Definition at line 935 of file intpol.f.

◆ gp_pol_function_s()

real (rprec) function intpol::gp_pol_function_s ( character (len=1), dimension(:), intent(in)  context,
real (rprec), dimension(3), intent(in)  xcart,
real (rprec), dimension(3), intent(in)  dxcart,
real (rprec), intent(in)  length,
real (rprec), intent(in)  dx 
)

Polarimetry gaussian process callback function for signal signal kernel evaluation.

Returns the value of the density guassian process kernel times the change in path length dotted with the magnetic field vector. This function is passed to integration_path::path_integrate to act as a callback. The density kernel is provided by model::model_get_gp_ne. This is the first signal.

See also
integration_path
Parameters
[in]contextA intpol_gp_context_i for the model.
[in]xcartThe integration point.
[in]dxcartA vector change in path. Not used in this function.
[in]lengthLength along the integration.
[in]dxA scalar change in path.
Returns
The k(x, i)*dl at point x.

Definition at line 1029 of file intpol.f.

◆ gp_pol_function_x()

real (rprec) function intpol::gp_pol_function_x ( character (len=1), dimension(:), intent(in)  context,
real (rprec), dimension(3), intent(in)  xcart,
real (rprec), dimension(3), intent(in)  dxcart,
real (rprec), intent(in)  length,
real (rprec), intent(in)  dx 
)

Polarimetry gaussian process callback function for kernel evaluation of two positions.

This is the second polarimetry signal.

See also
integration_path
Parameters
[in]contextA intpol_gp_context_x for the model.
[in]xcartThe integration point.
[in]dxcartA vector change in path. Not used in this function.
[in]lengthLength along the integration.
[in]dxA scalar change in path.
Returns
The k(x, y)*B.dl at point y.

Definition at line 1119 of file intpol.f.

◆ int_function()

real (rprec) function, private intpol::int_function ( character (len=1), dimension(:), intent(in)  context,
real (rprec), dimension(3), intent(in)  xcart,
real (rprec), dimension(3), intent(in)  dxcart,
real (rprec), intent(in)  length,
real (rprec), intent(in)  dx 
)
private

Interferometer callback function.

Returns the value of the denisty times the change in path length. This function is passed to integration_path::path_integrate to act as a callback. The denisty is provided by model::model_get_ne.

See also
integration_path
Parameters
[in]contextA model.
[in]xcartA integration point.
[in]dxcartA vector change in path. Not used in this function.
[in]lengthLength along the integration. Not used in this function.
[in]dxA scalar change in path.
Returns
The ne(x)*dl at point x.

Definition at line 796 of file intpol.f.

◆ 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.

Definition at line 148 of file intpol.f.

◆ 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.

Definition at line 227 of file intpol.f.

◆ intpol_get_gp_i()

real (rprec) function intpol::intpol_get_gp_i ( class (intpol_class), intent(in)  this,
type (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.

Definition at line 439 of file intpol.f.

◆ intpol_get_gp_s()

real (rprec) function intpol::intpol_get_gp_s ( class (intpol_class), intent(in)  this,
type (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.

Definition at line 496 of file intpol.f.

◆ intpol_get_gp_x()

real (rprec) function intpol::intpol_get_gp_x ( class (intpol_class), intent(in)  this,
type (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.

Definition at line 551 of file intpol.f.

◆ intpol_get_modeled_signal()

real (rprec) function, dimension(4) intpol::intpol_get_modeled_signal ( class (intpol_class), intent(inout)  this,
type (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.

Definition at line 279 of file intpol.f.

◆ 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.

Definition at line 405 of file intpol.f.

◆ 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.

Definition at line 186 of file intpol.f.

◆ 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.

Definition at line 250 of file intpol.f.

◆ intpol_pol_get_gp_i()

real (rprec) function intpol::intpol_pol_get_gp_i ( class (intpol_pol_class), intent(in)  this,
type (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.

Definition at line 605 of file intpol.f.

◆ intpol_pol_get_gp_s()

real (rprec) function intpol::intpol_pol_get_gp_s ( class (intpol_pol_class), intent(in)  this,
type (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.

Definition at line 668 of file intpol.f.

◆ intpol_pol_get_gp_x()

real (rprec) function intpol::intpol_pol_get_gp_x ( class (intpol_pol_class), intent(in)  this,
type (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.

Definition at line 730 of file intpol.f.

◆ intpol_pol_get_modeled_signal()

real (rprec) function, dimension(4) intpol::intpol_pol_get_modeled_signal ( class (intpol_pol_class), intent(inout)  this,
type (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.

Definition at line 342 of file intpol.f.

◆ pol_function()

real (rprec) function, private intpol::pol_function ( character (len=1), dimension(:), intent(in)  context,
real (rprec), dimension(3), intent(in)  xcart,
real (rprec), dimension(3), intent(in)  dxcart,
real (rprec), intent(in)  length,
real (rprec), intent(in)  dx 
)
private

Polarmetry callback function.

Returns the value of the denisty times the dot product of the magnetic field vector and the path direction. This function is passed to integration_path::path_integrate to act as a callback. The denisty is provided by model::model_get_ne. The magnetic field vector is proved by equilibrium::equilibrium_get_B_vec

See also
integration_path
Parameters
[in]contextA model.
[in]xcartA integration point.
[in]dxcartA vector change in path.
[in]lengthLength along the integration. Not used in this function.
[in]dxA scalar change in path. Not used in this function.
Returns
The ne(x)*B.dl at point x.

Definition at line 840 of file intpol.f.