Module simpa.core

Class FileNamingConventions

java.lang.Object
simpa.core.api.FileNamingConventions

public class FileNamingConventions extends Object
Class that contains the file naming conventions.
  • Field Details

  • Constructor Details

    • FileNamingConventions

      public FileNamingConventions()
  • Method Details

    • getBeamLossFileName

      public static String getBeamLossFileName(String beamName)
      Gets the file name for a file containing the lost particles of a beam.
      Parameters:
      beamName - The name of the beam.
      Returns:
      The filename
    • getTLBeamPhaseSpaceFileName

      public static String getTLBeamPhaseSpaceFileName(String beamName, double longiPos)
      Gets the file name for phase space data of a beam tracked in a transfer line. This contains phase space data of all particles in the beam at the position of a TLPhaseSpaceObserver which wrote it.
      Parameters:
      beamName - The name of the beam.
      longiPos - The longitudinal position of the phase space observer.
      Returns:
      The filename
    • getPhaseSpaceFileName

      public static String getPhaseSpaceFileName(String particleName, double loniPos, NumberFormat nFormat)
      Gets the file mane of the phase space file according to the parameters and the convention.
      Parameters:
      particleName - The particle name.
      loniPos - The longitudinal position of the phase space observer.
      nFormat - Number format set set the number of fractional digits.
      Returns:
      The filename
    • getTrajectoryFileName

      public static String getTrajectoryFileName(String particleName)
      Gets the file name for a file containing the trajectory coordinates in the global Cartesian system according to the conventions from the name of the particle.
      Parameters:
      particleName - The name of the particle to be tracked.
      Returns:
      Trajectory file name
    • getBeamTrajectoryFileName

      public static String getBeamTrajectoryFileName(String beamName)
      Gets the file name for a file containing the trajectory coordinates of a beam in the global Cartesian system according to the conventions from the name of the particle.
      Parameters:
      beamName - The name of the beam.
      Returns:
      Trajectory file name for the beam
    • getFieldMapStatisticsFileName

      public static String getFieldMapStatisticsFileName(String name)
      Generates the correct filename for a statistic file about the distrifution of maximum degrees in a field map.
      Parameters:
      name - filename.
      Returns:
      The correct name for the statistics file.
    • getPathFileName

      public static String getPathFileName(String name)
      Generates the correct filename for a path file.
      Parameters:
      name - name for the file.
      Returns:
      The correct name for the path file.
    • getPointsFileExtension

      public static String getPointsFileExtension(OutputFileFormat off)
      Generates the correct extension for a point file.
      Parameters:
      off - The output file format.
      Returns:
      the correct extension for the points file.
    • getCheckPointsFileExtension

      public static String getCheckPointsFileExtension()
      Generates the correct extension for a checkpoints file.
      Returns:
      the correct extension for a checkpoints file.
    • getFieldFileExtension

      public static String getFieldFileExtension()
      Generates the correct extension for a field file.
      Returns:
      the correct extension for a field file.
    • getCheckFileExtension

      public static String getCheckFileExtension()
      Generates the correct extension for a check file.
      Returns:
      the correct extension for a check file.
    • getFieldAtCheckFileExtension

      public static String getFieldAtCheckFileExtension()
      Generates the correct extension for a field at checkpoints file.
      Returns:
      the correct extension for a field at checkpoints file.
    • getSolutionFileExtension

      public static String getSolutionFileExtension()
      Generates the correct extension for a solution file.
      Returns:
      the correct extension for a solution file.
    • addFieldMapExtension

      public static String addFieldMapExtension(String name, int maxDegree)
      Generates the correct filename for a binary fieldmap file.
      Parameters:
      name - filename.
      maxDegree - max degree that will be appended to the filename.
      Returns:
      The correct name for the binary file.
    • addFieldMapExtension

      public static Map<String,Double> addFieldMapExtension(Map<String,Double> map, int lmax)
      Adds the underscore character plus the lmax (maximum degree of spherical harmonics expansion ) and the binary field map extension to each keys in the map. These should be the element names.
      Parameters:
      map - Map with element names as keys
      lmax - maximum degree of the SH expansion used for producing the binary file.
      Returns:
      A new map with element names+lmax +binary extension as keys. The values are the same objects.