#!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst

from mica.stats import update_acq_stats
update_acq_stats.main()

import os
table_file = mica.stats.acq_stats.table_file
file_stat = os.stat(table_file)
if file_stat.st_size > 50e6:
    print("""
Warning: {tfile} is larger than 50MB and may need
Warning: to be manually repacked (i.e.):
Warning:
Warning: ptrepack --chunkshape=auto --propindexes --keep-source-filters {tfile} compressed.h5
Warning: cp compressed.h5 {tfile}

""".format(tfile=table_file))

@@ -79,16 +79,25 @@
 NSE.rst%0A
+import os
 %0Afrom mi
@@ -129,16 +129,44 @@
 q_stats%0A
+import mica.stats.acq_stats%0A
 update_a
@@ -182,25 +182,16 @@
 main()%0A%0A
-import os
 %0Atable_f
@@ -217,26 +217,26 @@
 q_stats.
-table_file
+TABLE_FILE
 %0Afile_st

Fix reference to acq table file in script