Stellarator-Tools
Loading...
Searching...
No Matches
mse::mse_class Interface Reference

Base class representing a mse signal. More...

Inheritance diagram for mse::mse_class:
signal::signal_class

Public Member Functions

procedure get_modeled_signal_last (this, a_model, sigma, last_value)
 Calculates the modeled signal.
 
procedure get_type (this)
 Gets a discription of the mse type.
 
procedure get_header (this, header)
 Gets a discription of the model and model sigma array indices.
 
FINAL mse_destruct (this)
 Deconstruct a mse_class object.
 
class(mse_class) function, pointer mse_construct_vec (point, view_start, view_end, beam_start, beam_end, in_degrees, is_ratio)
 Construct a mse_class object representing a motional stark effect diagnostic.
 
class(mse_class) function, pointer mse_construct_rad (point, alpha, omega, delta, theta, in_degrees, is_ratio)
 Construct a mse_class object representing a motional stark effect diagnostic.
 
- Public Member Functions inherited from signal::signal_class
procedure get_modeled_signal_cache (this, a_model, sigma, use_cache, last_value)
 Calculates the modeled signal.
 
procedure get_modeled_signal_last (this, a_model, sigma, last_value)
 Calculates the modeled signal.
 
GENERIC get_modeled_signal get_modeled_signal_cache, get_modeled_signal_last
 
procedure get_observed_signal (this, a_model)
 Calculates the observed signal.
 
procedure get_g2 (this, a_model, use_cache, last_value)
 Calculates the g^2 contribution of a signal.
 
procedure get_e (this, a_model, use_cache, last_value)
 Calculates the e contribution of a signal.
 
procedure get_sigma2 (this)
 Calculates the total sigma^2 of a signal.
 
procedure get_type (this)
 Gets a discription of the signal type.
 
procedure get_header (this, header)
 Gets a discription of the model and model sigma array indices.
 
procedure get_gp_i (this, a_model, i, flags)
 Gets the guassian process kernel for a signal and a position.
 
procedure get_gp_s (this, a_model, signal, flags)
 Gets the guassian process kernel for a signal and a signal.
 
procedure get_gp_x (this, a_model, x_cart, flags)
 Gets the guassian process kernel for a signal and cartesian position.
 
GENERIC get_gp get_gp_i, get_gp_s, get_gp_x
 
procedure scale_and_offset (this, a_model, value)
 Apply scale and offset to the value.
 
procedure sync_child (this, index, recon_comm)
 Syncronize a child signal state to the parent.
 
procedure write_header (this, iou)
 Write out the signal header information to an output file.
 
procedure write (this, iou, index, a_model)
 Write out the signal information to an output file.
 
procedure write_auxiliary (this, iou, index, a_model)
 Write out any auxiliary signal information to an output file.
 
procedure write_step_data (this, a_model, result_ncid, current_step, index, signal_model_value_id, signal_sigma_value_id)
 Write out the signal data for a step to the result netcdf file.
 
FINAL signal_destruct (this)
 Deconstruct a signal_class object.
 

Public Attributes

real(rprec), dimension(3) point
 Intersection point of the viewing angle and the neutral beam.
 
real(rprec) alpha
 Angle between the toroidal direction and neutral beam.
 
real(rprec) omega
 Angle between the toroidal direction the view chord.
 
real(rprec) delta
 Pitch angle of the neutral beam with respect to the horizontal.
 
real(rprec) theta
 Pitch angle of the viewing chord with respect to the horizontal.
 
integer flags
 Control flags for the signal output.
 
- Public Attributes inherited from signal::signal_class
character(len=data_short_name_lengths_name
 Short name of the signal.
 
character(len=data_name_lengthl_name
 Long name of the signal.
 
character(len=data_short_name_lengthunits
 Physical units the signal measures.
 
real(rprec) observed
 Eperimentally measured signal value.
 
real(rprec) observed_sigma
 Eperimentally measured signal uncertainty.
 
real(rprec) weight
 Weighting parameter of the signal.
 
real(rprec), dimension(4) modeled
 Cached value of the modeled signal.
 
real(rprec), dimension(4) modeled_sigma
 Cached value of the modeled sigma.
 
integer scale_index
 Scale factor index.
 
integer offset_index
 Offset factor index.
 

Detailed Description

Base class representing a mse signal.

Interface for the construction of mse_class types using mse_construct_vec or mse_construct_rad.

Super Class:
diagnostic

Member Function/Subroutine Documentation

◆ get_header()

procedure mse::mse_class::get_header ( class (mse_class), intent(in)  this,
character (len=data_name_length), dimension(7), intent(inout)  header 
)

Gets a discription of the model and model sigma array indices.

Returns a description of the array indices for use when writting output files.

Parameters
[in]thisA mse_class instance.
[in,out]headerBuffer arrays to write header strings to.
Returns
A string describing the model and model sigma array indices.

◆ get_modeled_signal_last()

procedure mse::mse_class::get_modeled_signal_last ( class (mse_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 modeled signal.

Calculates the modeled signal by Equation 1 of Hawkes et. al. doi:10.1063/1.1149415. The polarization angle gamma_m is determined from.

tan(gamma_m) = E_h/E_v (1)

E_h = -[B_v*Cos(delta)*Cos(omega + alpha) + Sin(delta)*(B_r*Sin(omega) - B_t*Cos(omega)] (2)

E_v = -B_v*Sin(theta)*Cos(delta)*Sin(omega + alpha)

  • Sin(theta)*Sin(delta)*(B_t*Sin(omega) + B_r*Cos(omega))
  • Cos(theta)*Sin(delta)*(B_r*Cos(alpha) - B_t*Sin(alpha)) (3)

The magnetic field components are defined as

  • B_r Radial component of the magnetic field
  • B_t Toroidal component of the magnetic field
  • B_v Vertical component of the magnetic field

The angles are defined as

  • alpha: Projected angle between the neutral beam and B_t. Defined such that 0 is the negative toroidal direction. When 90, it is in the negative radial direction.
  • omega: Projected angle between the view and and B_t. Defined such that 0 is the positive toroidal direction. When 90, it is in the negative radial direction.
  • delta: Angle between the neutral beam and the horizontal. Defined such that 90 is in the negative z direction.
  • theta: Angle between the view and the horizontal. Defined such that 90 is in the positive z direction.
Parameters
[in,out]thisA mse_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.

◆ get_type()

procedure mse::mse_class::get_type ( class (mse_class), intent(in)  this)

Gets a discription of the mse type.

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

Parameters
[in]thisA mse_class instance.
Returns
A string describing the mse type.

◆ mse_construct_rad()

class (mse_class) function, pointer mse::mse_class::mse_construct_rad ( real (rprec), dimension(3), intent(in)  point,
real (rprec), intent(in)  alpha,
real (rprec), intent(in)  omega,
real (rprec), intent(in)  delta,
real (rprec), intent(in)  theta,
logical, intent(in)  in_degrees,
logical, intent(in)  is_ratio 
)

Construct a mse_class object representing a motional stark effect diagnostic.

Allocates memory and initializes a mse_class object. Uses angle representation.

Parameters
[in]pointMeasurement point of the mse diagnostic.
[in]omegaAngle between the neutral beam and the toroidal in the horizontal.
[in]alphaAngle between the view chord and the toroidal in the horizontal.
[in]deltaPitch angle to the horizontal and the neutral beam.
[in]thetaPitch angle to the horizontal and the view chord.
[in]in_degreesChannel measures degrees.
[in]is_ratioChannel measures ratio.
Returns
A pointer to a constructed mse_class object.

◆ mse_construct_vec()

class (mse_class) function, pointer mse::mse_class::mse_construct_vec ( real (rprec), dimension(3), intent(in)  point,
real (rprec), dimension(3), intent(in)  view_start,
real (rprec), dimension(3), intent(in)  view_end,
real (rprec), dimension(3), intent(in)  beam_start,
real (rprec), dimension(3), intent(in)  beam_end,
logical, intent(in)  in_degrees,
logical, intent(in)  is_ratio 
)

Construct a mse_class object representing a motional stark effect diagnostic.

Allocates memory and initializes a mse_class object. Uses vector representation.

Parameters
[in]pointMeasurement point of the mse diagnostic.
[in]view_startStarting point of the view vector.
[in]view_endEnding point of the view vector.
[in]beam_startStarting point of the beam vector.
[in]beam_endEnding point of the beam vector.
[in]in_degreesChannel measures degrees.
[in]is_ratioChannel measures ratio.
Returns
A pointer to a constructed mse_class object.

◆ mse_destruct()

FINAL mse::mse_class::mse_destruct ( type (mse_class), intent(inout)  this)
final

Deconstruct a mse_class object.

Deallocates memory and uninitializes a mse_class object.

Parameters
[in,out]thisA mse_class instance.

The documentation for this interface was generated from the following file: