Monitoring TopSpin Accounting File

From Network for Advanced NMR
Jump to navigationJump to search

Overview

This page describes how NDTS utilizes the TopSpin accounting file in data harvesting for TopSpin < 4.x

Accounting Must Be Enabled per User

  • Prerequisite: Each TopSpin user must have Accounting enabled
  • Without this setting, TopSpin will not signal that an acquisition has ended, so the daemon cannot gather the experiment.

Experiment-Gathering Trigger (TopSpin < 4.x)

  • TopSpin writes/updates an accounting file in its daily directory whenever an acquisition finishes.
  • Any change, either editing an existing file or creating a new one, acts as a trigger.
  • The daemon is notified of the specific file that changed and processes only that file.
Daemon processing logic
  • Scans the file for XML <dataset> entries (ignores other content).
  • Converts each dataset’s acqend timestamp to Unix time.
  • Compares this value to the list in /opt/nan-dtdaemon/data/processing_history.dat.
    • If present → already processed, skip.
    • If absent → evaluate for transmission and append the timestamp to the history file (ensuring it is not re-processed).

Example TopSpin Accounting File

<?xml version="1.0" encoding="ISO-8859-1" ?>
<protocol>
        <dataset val="/opt/topspin3.5pl7/examdata/exam1d_13C/1/pdata/1">
                <acqstatus val="OK"/>
                <user val="nmradmin"/>
                <acqbeg val="2021-12-29 04:57:24.840 -0500"/>
                <acqend val="2021-12-29 04:58:37.901 -0500"/>
                <acqdim val="1"/>
                <pulsprog val="zgpg30"/>
                <title val="13C{1H}     AV 500    Cholesterylacetate"/>
                <nuclei val="F1: 1s AXNUC = 13C. F2: 1s AXNUC = 1H. "/>
                <archived val=""/>
        </dataset>
        <dataset val="/opt/topspin3.5pl7/examdata/exam2d_CH/1/pdata/1">
                <acqstatus val="OK"/>
                <user val="nmradmin"/>
                <acqbeg val="2021-12-29 05:22:24.840 -0500"/>
                <acqend val="2021-12-29 06:38:37.901 -0500"/>
                <acqdim val="2"/>
                <pulsprog val="hxcoqf"/>
                <title val="CH-CO Cyclosporin"/>
                <nuclei val="F1: 1s AXNUC = 13C. F2: 1s AXNUC = 1H. "/>
                <archived val=""/>
        </dataset>
        <dataset val="/opt/topspin3.5pl7/examdata/exam3d/1/pdata/1">
                <acqstatus val="OK"/>
                <user val="nmradmin"/>
                <acqbeg val="2021-12-29 06:43:24.840 -0500"/>
                <acqend val="2021-12-29 06:50:37.901 -0500"/>
                <acqdim val="3"/>
                <pulsprog val="hcchdigp3d"/>
                <title val=""/>
                <nuclei val="F1: 1s AXNUC = 1H. F2: 1s AXNUC = 13C. F3: 1s AXNUC = 15N. "/>
                <archived val=""/>
        </dataset>
        <dataset val="/opt/topspin3.5pl7/examdata/exam_CMCse_3/14/pdata/1">
                <acqstatus val="OK"/>
                <user val="nmrsu"/>
                <acqbeg val="2021-12-29 13:17:24.840 -0500"/>
                <acqend val="2021-12-29 14:51:37.901 -0500"/>
                <acqdim val="2"/>
                <pulsprog val="hmbcetgpl3nd"/>
                <title val=""/>
                <nuclei val="F1: 1s AXNUC = 1H. F2: 1s AXNUC = 13C. "/>
                <archived val=""/>
        </dataset>
        <dataset val="/opt/topspin3.5pl7/examdata/exam_nmrquant/1/pdata/1">
                <acqstatus val="OK"/>
                <user val="nmradmin"/>
                <acqbeg val="2021-12-29 22:57:24.840 -0500"/>
                <acqend val="2021-12-30 03:38:37.901 -0500"/>
                <acqdim val="1"/>
                <pulsprog val="zg"/>
                <title val="Mixture HL-65, 1H 353K, no standard"/>
                <nuclei val="F1: 1s AXNUC = 1H. "/>
                <archived val=""/>
        </dataset>
</protocol>