Skip to content

Instantly share code, notes, and snippets.

@yongrenjie
Last active February 28, 2020 10:19
Show Gist options
  • Save yongrenjie/2bcc98f4ee1b1b8c0d529e886283cbc9 to your computer and use it in GitHub Desktop.
Save yongrenjie/2bcc98f4ee1b1b8c0d529e886283cbc9 to your computer and use it in GitHub Desktop.
Python script to remove integrals and picked peaks in TopSpin
# Clears integrals and picked peaks in TopSpin
import os
ds = CURDATA()
if ds == None: EXIT() # dataset not selected
p = os.path.join(ds[3], ds[0], ds[1], "pdata", ds[2])
for fname in ["int", "int1d", "integrals.txt", "intgap", "intrng", "peaklist.xml", "peakrng", "peaks"]:
if os.path.isfile(os.path.join(p,fname)): os.remove(os.path.join(p, fname))
RE(ds)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment