Package lib :: Package spectrum :: Module sparky
[hide private]
[frames] | no frames]

Module sparky

source code

Module containing functions for handling Sparky files.

Functions [hide private]
 
read_list(peak_list=None, file_data=None)
Extract the peak intensity information from the Sparky peak intensity file.
source code
 
write_list(file_prefix=None, dir=None, res_names=None, res_nums=None, atom1_names=None, atom2_names=None, w1=None, w2=None, data_height=None, force=True)
Create a Sparky .list file.
source code
Variables [hide private]
  __package__ = 'lib.spectrum'

Imports: split, warn, RelaxError, open_write_file, strip, RelaxWarning


Function Details [hide private]

read_list(peak_list=None, file_data=None)

source code 

Extract the peak intensity information from the Sparky peak intensity file.

Parameters:
  • peak_list (lib.spectrum.objects.Peak_list instance) - The peak list object to place all data into.
  • file_data (list of lists of str) - The data extracted from the file converted into a list of lists.
Raises:
  • RelaxError - When the expected peak intensity is not a float.

write_list(file_prefix=None, dir=None, res_names=None, res_nums=None, atom1_names=None, atom2_names=None, w1=None, w2=None, data_height=None, force=True)

source code 

Create a Sparky .list file.

Parameters:
  • file_prefix (str) - The base part of the file name without the .list extension.
  • dir (str or None) - The directory to place the file in.
  • res_names (list of str) - The residue name list for each peak entry.
  • res_nums (list of int) - The residue number list for each peak entry.
  • atom1_names (list of str) - The atom name list for w1 for each peak entry.
  • atom2_names (list of str) - The atom name list for w2 for each peak entry.
  • w1 (list of float) - The w1 chemical shift list in ppm for each peak entry.
  • w2 (list of float) - The w2 chemical shift list in ppm for each peak entry.
  • data_height (None or list of float) - The optional data height list for each peak entry.
  • force (bool) - A flag which if True will cause any pre-existing files to be overwritten.