Module simpa.core

Class SHFieldFactory

java.lang.Object
simpa.core.api.SHFieldFactory

public class SHFieldFactory extends Object
Factory class for creating SHField implementations.
  • Field Details

    • DEFAULT_RELATIVE_ERROR

      public static final double DEFAULT_RELATIVE_ERROR
      Default relative error for the for spherical harmonics coefficients. Coefficients smaller than the value determined by this limit considered zero and dropped.
      See Also:
  • Constructor Details

    • SHFieldFactory

      public SHFieldFactory()
      Creates a SHFieldFactory object
  • Method Details

    • createSHField

      public void createSHField(GlobalSourceArrangement gsa, SphereCovering covering, int lmax, String binaryFileName, Double relativeError, boolean writeStatFile, int pass1Lmax) throws IOException
      Creates an SHField containing spherical harmonics coefficients and other necessary data for a field map and serializes it to the disk.
      Parameters:
      gsa - GlobalSourceArrangement, contains all sources.
      covering - The collection of balls that make up the region for evaluation.
      lmax - Maximum degrees of expansion.
      binaryFileName - Filename for the output binary file. If the file already exists, the field creation will be skipped.
      relativeError - Relative limit for spherical harmonics coefficients. Coefficients smaller than the value determined by this limit considered zero and dropped. If null the value of the DEFAULT_RELATIVE_ERROR will be taken.
      writeStatFile - If true, then write statistics about the distribution of maximum degrees in the field map.
      pass1Lmax - Maximum degree for the first pass of the SH expansion. A good value is lmax/3 for example.
      Throws:
      IOException - When something goes wrong reading or writing a file.