Subject: Re: [nmr_sparky] peaktable using heigths
From: eiso
Date: May 9, 2006
Previous: 120 Next: 122
Markus Heller wrote:
hello group,
does anybody have a python script similar to the peaktable (``pb)
command, only using data heights instead of volumes?
ive tried to tweak peaktable.py, but i didnt quite work for me.
(matter of factly, it didnt do anything)
you can try the following (not tested) :
# ---------------------------------------------------------------------------
#
def peak_field(self, assignment, spectrum, peaks):
if peaks[spectrum].has_key(assignment):
peak = peaks[spectrum][assignment]
return %10.2e % peak.data_height
#if peak.volume:
# return %10.2e % peak.volume
#else:
# return %10s % yes
else:
res = sputil.group_atom_resonances(spectrum.condition, assignment)
if self.noesy:
res = noesy.extend_noesy_assignment(spectrum, res)
if res:
return %10s % no
return %10s % .
thanks a lot in advance
markus
ps: whats with all those *.pyc-files? do i have to compile a new
.py-file in order to get the .pyc? (im a python-newbie)
you generally dont have to worry about those you want to know
more google for: python pyc byte-compiled
or check python.org
E