> you once posted an excellent couple of lines of code which will change
> the Figure of Merit for all selected peaks:
>
> for peak in top.popups['edit_peak_list'].table.currentObjects:
> peak.setFigOfMerit(0.0)
>
> I realised that I was trying to use this on peaks that are selected in
> the 'Peak Selection' rather than the 'Edit Peaks' popup. Could you let
> me know how I need to change the code for it to work on the selected
> peaks in the 'Peak Selection' pop-up (if that is possible)?
>
For the highlighted peaks of the selected peaks table the first line would
become:
for peak in top.popups['selected_peaks'].scrolledMatrix.currentObjects:
For all selected peaks you can use:
for peak in top.currentPeaks:
Also, the line for the peak list table would now be:
for peak in top.popups['edit_peak_list'].scrolledMatrix.currentObjects:
(The change in the code was to improve consistency across popups)
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- -------
-------------------------------------------------------------------------------
|