parameters: (cls, out_file, **kwargs)
docstring: Write test data e.g. for CalculateSPowder test as a simple text dump
  
          The format is liable to change as part of a maintenance clean-up, so is not recommended for use in user scripts.
  
          :param out_file: Path to output test data file
          :type out_file: str
  
          This method will pass all other options to :obj:`CalculateS.init()` (filename, temperature etc.)
          If you need to generate abins_data, the most convenient way of doing this is with
          AbinsData.from_calculation_data(filename, ab_initio_program)
docstring_summary: Write test data e.g. for CalculateSPowder test as a simple text dump
docstring_tokens: Write test data e . g . for CalculateSPowder test as a simple text dump
function: def write_test_data(cls, out_file, **kwargs):
          """
          Write test data e.g. for CalculateSPowder test as a simple text dump
  
          The format is liable to change as part of a maintenance clean-up, so is not recommended for use in user scripts.
  
          :param out_file: Path to output test data file
          :type out_file: str
  
          This method will pass all other options to :obj:`CalculateS.init()` (filename, temperature etc.)
          If you need to generate abins_data, the most convenient way of doing this is with
          AbinsData.from_calculation_data(filename, ab_initio_program)
          """
  
          data = cls.init(**kwargs).get_formatted_data()
  
          # This function returns a _copy_ of the options so we can use it as a backup
          printoptions = np.get_printoptions()
  
          try:
              np.set_printoptions(threshold=np.nan)
              with open(out_file, 'w') as f:
                  f.write(str(data.extract()))
          # We probably don't want full-sized array printing if something goes wrong,
          # so use `finally` to ensure np verbosity is reset
          finally:
              np.set_printoptions(**printoptions)
function_tokens: def write_test_data ( cls , out_file , * * kwargs ) : data = cls . init ( * * kwargs ) . get_formatted_data ( ) # This function returns a _copy_ of the options so we can use it as a backup printoptions = np . get_printoptions ( ) try : np . set_printoptions ( threshold = np . nan ) with open ( out_file , 'w' ) as f : f . write ( str ( data . extract ( ) ) ) # We probably don't want full-sized array printing if something goes wrong, # so use `finally` to ensure np verbosity is reset finally : np . set_printoptions ( * * printoptions )