Skip to content

cl-fontana/lst2ascii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lst2ascii

lst2ascii is a little piece of software that converts to ASCII the list-mode files generated by MPA3 from FAST ComTec. It is written in pure C and it needs just some standard libraries. It was successfully compiled and executed with

  • clang and gcc in OS X;
  • clang and gcc in Linux;
  • MinGW in Windows.

Usage

The program needs to be run from the command line with at least one argument:

lst2ascii <file_name.lst> [output_file]

The first option is the name of the list-mode file that will be converted, the second option is optional and specifies the output file. If no [output_file] is given, a .lst file extension is assumed and changed to .txt, thus output will be: file_name.txt [output_file] should have no extension, .txt will be added.

Once run, the program gives some information about the acquisition:

Written events: 5591
Run time: 78.632 s
Average rate: 71.1034 Hz

ADC 0:
Run time: 78.57 s
Events: 4326
Average rate: 55.0592 Hz
Dead time: 0.0788498%
Range: 8192

ADC 1:
Run time: 62.412 s
Events: 4326
Average rate: 69.3136 Hz
Dead time: 20.6277%
Range: 8192

ADC 2:
Run time: 78.416 s
Events: 5484
Average rate: 69.9347 Hz
Dead time: 0.274696%
Range: 8192

ADC 3:
Run time: 78.371 s
Events: 5483
Average rate: 69.9621 Hz
Dead time: 0.331924%
Range: 8192

Output format

The output is a text file with four columns:

  1. event number;
  2. time elapsed from the beginning of the measurement, in milliseconds;
  3. the active ADC number;
  4. the datum acquired by that particular ADC in that event. If there are some ADCs acquiring in coincidence, the results will have the same event number.
Event Time [ms] ADC datum
1 1 0 8191
1 1 1 66
1 1 2 1663
1 1 3 1533
2 14 2 320
2 14 3 8001
3 58 0 5432
... ... ... ...

License

Copyright (c) 2012-2014 Cristiano L. Fontana. See the LICENSE file for license rights and limitations (MIT).

About

Convert FAST ComTec list-mode files to ascii

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published