An .ans file is a plain-text “answers file” used to feed responses to an interactive ATSAS program via standard input. Each line corresponds to one prompt in the order the program asks.

The filename and extension are not enforced; .ans is a common convention.

Content

  • One response per line, in the same order as the interactive prompts.
  • Empty lines are significant and mean “accept the default value”.

Comments

Everything following ! or # on a line is treated as a comment and ignored.

Examples of comments:

  15                   ! number of spherical harmonics
../path/to/lyzexp.dat  # path to the experimental data
                       ! an empty line accepting a default value, with comment

Because ! and # introduce comments, file paths or other values containing these characters are not supported in interactive input.

Creating an answers file

Answer files are typically created by running the program once interactively and saving the responses in an editor.

For users familiar with command-line tools, responses can also be captured during an interactive run, for example using standard shell utilities (e.g. tee).

The exact method is system- and shell-dependent and is outside the scope of this documentation.

Usage

Answer files can be used with any application that can be configured interactively. An answers file may be used to record and replay configurations, enabling repeatable runs without re-entering parameters.

Common usage patterns include:

  • On Linux, macOS and Windows cmd.exe:
    $ bunch < user_fixed.ans
    $ coral < gadcam.ans
    
  • On Windows PowerShell:
    PS> Get-Content user_fixed.ans | bunch
    

ATSAS applications that use interactive configuration do not accept experimental data from standard input, file name -, as a rule.