Author: bugman Date: Fri May 24 09:42:52 2013 New Revision: 19725 URL: http://svn.gna.org/viewcvs/relax?rev=19725&view=rev Log: Added backwards compatibility support for the spectrometer frequency list and count. This is needed for old relax state files. Modified: trunk/data_store/__init__.py Modified: trunk/data_store/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/data_store/__init__.py?rev=19725&r1=19724&r2=19725&view=diff ============================================================================== --- trunk/data_store/__init__.py (original) +++ trunk/data_store/__init__.py Fri May 24 09:42:52 2013 @@ -291,8 +291,18 @@ # Convert spectrometer frequency information. if hasattr(dp, 'frq'): + # Convert to the new structure. dp.spectrometer_frq = dp.frq del dp.frq + + # Build the new frequency list structure. + dp.spectrometer_frq_list = [] + for frq in dp.spectrometer_frq.values(): + if frq not in dp.spectrometer_frq_list: + dp.spectrometer_frq_list.append(frq) + + # And finally count the elements. + dp.spectrometer_frq_count = len(dp.spectrometer_frq_list) def add(self, pipe_name, pipe_type, bundle=None, switch=True):