Class ZeroProbe

java.lang.Object
cnuphys.magfield.FieldProbe
cnuphys.magfield.ZeroProbe
All Implemented Interfaces:
IField

public class ZeroProbe extends FieldProbe
  • Constructor Details

    • ZeroProbe

      public ZeroProbe()
  • Method Details

    • fieldMagnitude

      public float fieldMagnitude(float x, float y, float z)
      Description copied from class: FieldProbe
      Get the field magnitude in kiloGauss at a given location expressed in Cartesian coordinates.
      Specified by:
      fieldMagnitude in interface IField
      Overrides:
      fieldMagnitude in class FieldProbe
      Parameters:
      x - the x coordinate in cm
      y - the y coordinate in cm
      z - the z coordinate in cm
      Returns:
      the magnitude of the field in kiloGauss.
    • getMaxFieldMagnitude

      public float getMaxFieldMagnitude()
      Description copied from class: FieldProbe
      Obtain the maximum field magnitude of any point in the map.
      Specified by:
      getMaxFieldMagnitude in interface IField
      Overrides:
      getMaxFieldMagnitude in class FieldProbe
      Returns:
      the maximum field magnitude in the units of the map.
    • isZeroField

      public boolean isZeroField()
      Description copied from class: FieldProbe
      Checks whether the field has been set to always return zero.
      Specified by:
      isZeroField in interface IField
      Overrides:
      isZeroField in class FieldProbe
      Returns:
      true if the field is set to return zero.
    • gradient

      public void gradient(float x, float y, float z, float[] result)
      Description copied from class: FieldProbe
      Obtain an approximation for the magnetic field gradient at a given location expressed in Cartesian coordinates. The field is returned as a Cartesian vector in kiloGauss/cm.
      Specified by:
      gradient in interface IField
      Overrides:
      gradient in class FieldProbe
      Parameters:
      x - the x coordinate in cm
      y - the y coordinate in cm
      z - the z coordinate in cm
      result - a float array holding the retrieved field in kiloGauss. The 0,1 and 2 indices correspond to x, y, and z components.
    • field

      public void field(float x, float y, float z, float[] result)
      Description copied from interface: IField
      Obtain the magnetic field at a given location expressed in Cartesian coordinates. The field is returned as a Cartesian vector in kiloGauss.
      Parameters:
      x - the x coordinate in cm
      y - the y coordinate in cm
      z - the z coordinate in cm
      result - a float array holding the retrieved field in kiloGauss. The 0,1 and 2 indices correspond to x, y, and z components.
    • contains

      public boolean contains(double x, double y, double z)
      Description copied from class: FieldProbe
      Check whether the field boundaries include the point
      Specified by:
      contains in interface IField
      Overrides:
      contains in class FieldProbe
      Parameters:
      x - the x coordinate in the map units
      y - the y coordinate in the map units
      z - the z coordinate in the map units
      Returns:
      true if the point is included in the boundary of the field