Skip to content
jangcom edited this page Jul 18, 2020 · 9 revisions

jac2dat

NAME

jac2dat - Convert .jac/.jca files to various data formats

SYNOPSIS

    perl jac2dat.pl [jac_files ...] [--all] [--det=det_file]
                    [--out_fmts=ext ...] [--out_path=path]
                    [--out_prepend=flag] [--out_append=flag]
                    [--nofm] [--nopause]

DESCRIPTION

    jac2dat converts .jac/.jca files to various data formats.
    - JAC file: The gamma spectra format of the Science and Technology Agency
                (now the MEXT), Japan. For details, refer to the catalogue of
                DS-P1001 Gamma Station, SII.
                A .jac/.jca file consists of only one column, in which
                gamma counts are stored in ascending order of channels.
                The first three records are "not" gamma counts, and
                are used for special purposes:
                - Record 1: Live time (duration)
                - Record 2: Real time (duration)
                - Record 3: Acquired time
    - DAT file: A plottable text file converted from a .jac/.jca file.
                A .dat file consists of multiple columns, in which
                channels, gamma energies, peak FWHMs, peak efficiencies,
                counts, count per second (cps), gammas, and
                gamma per second (gps) are stored.
    - Other supported data formats include tex, csv, xlsx, json, and yaml.

OPTIONS

    jac_files ...
        .jac/.jca files to be converted.

    --all (short: -a)
        All .jac/.jca files in the current working directory will be converted.

    --detector=det_file (short: --det)
        A file containing conversion functions of a detector
        such as channel-to-energy and channel-to-FWHM functions.
        Key-value pairs contained in this file take precedence
        over the predefined functions.
        Refer to the sample file 'detector.j2d' for the syntax.

    --out_fmts=ext ... (short: --fmts, default: dat)
        Output formats. Multiple formats are separated by the comma (,).
        all
            All of the following ext's.
        dat
            Plain text
        tex
            LaTeX tabular environment
        csv
            comma-separated value
        xlsx
            Microsoft Excel 2007
        json
            JavaScript Object Notation
        yaml
            YAML

    --out_path=path (short: --path, default: current working directory)
        The output path.

    --out_prepend=flag (short: --prep, default: empty)
        A flag to be prepended to the names of output files.

    --out_append=flag (short: --app, default: empty)
        A flag to be appended to the names of output files.

    --nofm
        Do not show the front matter at the beginning of the program.

    --nopause
        Do not pause the shell at the end of the program.

EXAMPLES

    perl jac2dat.pl lt1200s.jac --fmts=dat,xlsx
    perl jac2dat.pl ./samples/sample_rand.jac --det=./j2d/det_fitted.j2d
    perl jac2dat.pl ./samples/sample_rand.jac --nopause

REQUIREMENTS

    Perl 5
        Text::CSV, Excel::Writer::XLSX, JSON, YAML

SEE ALSO

jac2dat on GitHub

AUTHOR

Jaewoong Jang <jangj@korea.ac.kr>

COPYRIGHT

Copyright (c) 2019-2020 Jaewoong Jang

LICENSE

This software is available under the MIT license; the license information is found in 'LICENSE'.

Clone this wiki locally