V3FIT
|
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. | |
Implements interferometry/polarimetry diagnostic. Defines the base class of the type intpol_class.
|
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.
[in] | context | A intpol_gp_context_i for the model. |
[in] | xcart | The integration point. |
[in] | dxcart | A vector change in path. Not used in this function. |
[in] | length | Length along the integration. |
[in] | dx | A scalar change in path. |
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.
[in] | context | A intpol_gp_context_i for the model. |
[in] | xcart | The integration point. |
[in] | dxcart | A vector change in path. Not used in this function. |
[in] | length | Length along the integration. |
[in] | dx | A scalar change in path. |
|
private |
Interferometry gaussian process callback function for kernel evaluation of two positions.
This is the second interferometry signal.
[in] | context | A intpol_gp_context_x for the model. |
[in] | xcart | The integration point. |
[in] | dxcart | A vector change in path. Not used in this function. |
[in] | length | Length along the integration. |
[in] | dx | A scalar change in path. |
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.
[in] | context | A intpol_gp_context_i for the model. |
[in] | xcart | The integration point. |
[in] | dxcart | A vector change in path. Not used in this function. |
[in] | length | Length along the integration. |
[in] | dx | A scalar change in path. |
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.
[in] | context | A intpol_gp_context_i for the model. |
[in] | xcart | The integration point. |
[in] | dxcart | A vector change in path. Not used in this function. |
[in] | length | Length along the integration. |
[in] | dx | A scalar change in path. |
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.
[in] | context | A intpol_gp_context_x for the model. |
[in] | xcart | The integration point. |
[in] | dxcart | A vector change in path. Not used in this function. |
[in] | length | Length along the integration. |
[in] | dx | A scalar change in path. |
|
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.
[in] | context | A model. |
[in] | xcart | A integration point. |
[in] | dxcart | A vector change in path. Not used in this function. |
[in] | length | Length along the integration. Not used in this function. |
[in] | dx | A scalar change in path. |
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.
[in] | chord_paths | The nodes of a multi point segment integration path. |
subroutine intpol::intpol_destruct | ( | type (intpol_class), intent(inout) | this | ) |
Deconstruct a intpol_class object.
Deallocates memory and uninitializes a intpol_class object.
[in,out] | this | A intpol_class instance. |
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.
[in] | this | A intpol_class instance. |
[in] | a_model | A model instance. |
[in] | i | Index of the position for the kernel. |
[in] | flags | State flags to send to the kernel. |
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.
[in] | this | A intpol_class instance. |
[in] | a_model | A model instance. |
[in] | signal | A signal_class instance. |
[in] | flags | State flags to send to the kernel. |
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.
[in] | this | A intpol_class instance. |
[in] | a_model | A model instance. |
[in] | x_cart | The cartesian position of to get the kernel at. |
[in] | flags | State flags to send to the kernel. |
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.
[in,out] | this | A intpol_class instance. |
[in] | a_model | A model instance. |
[out] | sigma | The modeled sigma. |
[in] | last_value | Last good value in case the signal did not change. |
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.
[in] | this | A intpol_class instance. |
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.
[in] | wavelength | Wavelength of the polarimetry beam. |
[in] | in_degrees | Specifies if the sigals is degrees or radians. True specifies degree while false specifies radians. |
[in] | chord_paths | The nodes of a multi point segment integration path. |
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.
[in,out] | this | A intpol_class instance. |
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.
[in] | this | A intpol_pol_class instance. |
[in] | a_model | A model instance. |
[in] | i | Index of the position for the kernel. |
[in] | flags | State flags to send to the kernel. |
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.
[in] | this | A intpol_class instance. |
[in] | a_model | A model instance. |
[in] | signal | A signal_class instance. |
[in] | flags | State flags to send to the kernel. |
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.
[in] | this | A intpol_pol_class instance. |
[in] | a_model | A model instance. |
[in] | x_cart | The cartesian position of to get the kernel at. |
[in] | flags | State flags to send to the kernel. |
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.
[in,out] | this | A intpol_pol_class instance. |
[in] | a_model | A model instance. |
[out] | sigma | The modeled sigma. |
[in] | last_value | Last good value in case the signal did not change. |
|
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
[in] | context | A model. |
[in] | xcart | A integration point. |
[in] | dxcart | A vector change in path. |
[in] | length | Length along the integration. Not used in this function. |
[in] | dx | A scalar change in path. Not used in this function. |