>
> > For the highlighted peaks of the selected peaks table the first line would
> > become:
> >
> > for peak in top.popups['selected_peaks'].scrolledMatrix.currentObjects:
> >
>
> Interestingly this worked only if I had selected the peaks in the
> spectrum (and then done right mouse click - selected peaks).
> What I had actually done, was to click on 'Show Total Peaks' for some
> resonances in the Resonance Browser. I had assumed that the Peak
> selection popup which then appeared was essentially the same as the one
> which stems from peaks selected in the spectrum (given that both popups
> are called 'Peak Selection'). But it appears this is not the case. Does
> 'selected_peaks' get changed to something like 'total_peaks' in this
> instance?
>
> > For all selected peaks you can use:
> >
> > for peak in top.currentPeaks:
>
> This one also only seems to work on peaks selected from the spectrum.
This is indeed as intended. There are two versions of the peak selection
popup, depending on where it is opened from. I didn't know which you were
using.
There are necessarily two so that [View Peaks] and equivalent buttons have
a selection separate from the peaks selected in the spectrum. In other
words you can view peaks from the resonance browser and spectrum selected
peaks at the same time.
For the non-spectrum peak selection use:
top.popups['view_peaks'].scrolledMatrix.currentObjects
(highlighted rows)
top.popups['view_peaks'].scrolledMatrix.objectList
(all rows)
T.
-------------------------------------------------------------------------------
Dr Tim Stevens Email: [log in to unmask]
Department of Biochemistry [log in to unmask]
University of Cambridge Phone: +44 1223 766018 (office)
80 Tennis Court Road +44 7816 338275 (mobile)
Old Addenbrooke's Site +44 1223 364613 (home)
Cambridge CB2 1GA WWWeb: http://www.bio.cam.ac.uk/~tjs23
United Kingdom http://www.pantonia.co.uk
-------------------------------------------------------------------------------
------ +NH3CH(CH(CH3)OH)C(O)NHCH(CH(CH3)CH2CH3)C(O)NHCH(CH2CH2SCH3)CO2- -------
-------------------------------------------------------------------------------
|