Hi,

What about calling this cdp.spectrum_ids_by_frq or something
identifying that it is per spectrometer frequency?  It might be easier
for a user to understand if they look at a saved state or results
file.  And it might help future developers understand your intent.

Cheers,

Edward



On 8 September 2014 09:42, Troels Emtekær Linnet <[email protected]> wrote:
> Hi Edward.
>
> Yes, cdp.dic_spectrum_ids is a per spectrometer frequency collection
> of spectrum IDs.
>
> I also store a cdp.dic_spectrum_ids_repeated, which is frequency
> dependent and tells which spectrums
> are replicated.
>
> The character ""[\x80-\xFF]" is something weird.
>
> I have seen it time to time, and it appears when I write commit
> messages on my mac.
> When I write the commit message, nothing is seen.
>
> But sometimes when I inspect the log, I see the characters, and have
> wondered if it was my fat fingers on the keyboard.
> But those fat fingers only make troubles on my mac.
>
> I will see if I can figure out what it is.
>
> Best
> Troels
>
>
>
>
> 2014-09-08 8:42 GMT+02:00 Edward d'Auvergne <[email protected]>:
>> Hi Troels,
>>
>> I was wondering what "cdp.dic_spectrum_ids" is?  Is this a per
>> spectrometer frequency collection of spectrum IDs?  Also, do you know
>> where the character "Ã" comes from?  It appears from time to time in
>> your commit messages:
>>
>> $ svn log | grep -P "[\x80-\xFF]
>>
>> along with some other vowels with accents, and I have to delete these
>> for the release notes.
>>
>> Cheers,
>>
>> Edward
>>
>>
>>
>> On 7 September 2014 19:31,  <[email protected]> wrote:
>>> Author: tlinnet
>>> Date: Sun Sep  7 19:31:24 2014
>>> New Revision: 25677
>>>
>>> URL: http://svn.gna.org/viewcvs/relax?rev=25677&view=rev
>>> Log:
>>> Stored a frequency dependent dictionary with spectrum ids and reÃpeatead 
>>> PMG frequencies in setup pipe.
>>>
>>> This information will progress out through children pipes.
>>>
>>> Task #7826 (https://gna.org/task/index.php?7826): Write an python class for 
>>> the repeated analysis of dispersion data.
>>>
>>> Modified:
>>>     trunk/auto_analyses/relax_disp_repeat_cpmg.py
>>>
>>> Modified: trunk/auto_analyses/relax_disp_repeat_cpmg.py
>>> URL: 
>>> http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp_repeat_cpmg.py?rev=25677&r1=25676&r2=25677&view=diff
>>> ==============================================================================
>>> --- trunk/auto_analyses/relax_disp_repeat_cpmg.py       (original)
>>> +++ trunk/auto_analyses/relax_disp_repeat_cpmg.py       Sun Sep  7 19:31:24 
>>> 2014
>>> @@ -140,8 +140,8 @@
>>>              self.interpreter.pipe.create(pipe_name=pipe_name, 
>>> pipe_type=self.pipe_type, bundle=None)
>>>
>>>              # Loop over frequency, store spectrum ids.
>>> -            spectrum_ids = {}
>>> -            spectrum_ids_replicates = {}
>>> +            dic_spectrum_ids = {}
>>> +            dic_spectrum_ids_replicates = {}
>>>              for i, sfrq in enumerate(self.sfrqs):
>>>                  # Access the key in self.
>>>                  key = DIC_KEY_FORMAT % (sfrq)
>>> @@ -166,14 +166,14 @@
>>>                      self.interpreter.spectrum.read_spins(file=peaks_file, 
>>> dir=None)
>>>
>>>                  # Collect data keys.
>>> -                spectrum_ids[key] = []
>>> +                dic_spectrum_ids[key] = []
>>>                  for j, cpmg_frq in enumerate(cpmg_frqs):
>>>                      # Define the key.
>>>                      data_key = 
>>> return_param_key_from_data(exp_type=self.exp_type, frq=sfrq, point=cpmg_frq)
>>>                      spectrum_id = data_key + '_%i'%j
>>>
>>>                      # Store data key
>>> -                    spectrum_ids[key].append(spectrum_id)
>>> +                    dic_spectrum_ids[key].append(spectrum_id)
>>>
>>>                      # Set the current experiment type.
>>>                      
>>> self.interpreter.relax_disp.exp_type(spectrum_id=spectrum_id, 
>>> exp_type=self.exp_type)
>>> @@ -191,14 +191,14 @@
>>>                      
>>> self.interpreter.spectrometer.frequency(id=spectrum_id, frq=sfrq, 
>>> units=self.sfrq_unit)
>>>
>>>                  # Get the list of duplications
>>> -                list_dub = self.get_dublicates(spectrum_ids[key], 
>>> cpmg_frqs)
>>> +                list_dub = self.get_dublicates(dic_spectrum_ids[key], 
>>> cpmg_frqs)
>>>
>>>                  # Store to dic
>>> -                spectrum_ids_replicates[key] = list_dub
>>> -
>>> -            # Store to self.
>>> -            self.set_self(key='spectrum_ids', value=spectrum_ids)
>>> -            self.set_self(key='spectrum_ids_replicates', 
>>> value=spectrum_ids_replicates)
>>> +                dic_spectrum_ids_replicates[key] = list_dub
>>> +
>>> +            # Store to current data pipe.
>>> +            cdp.dic_spectrum_ids = dic_spectrum_ids
>>> +            cdp.dic_spectrum_ids_replicates = dic_spectrum_ids_replicates
>>>
>>>              # Name the isotope for field strength scaling.
>>>              self.interpreter.spin.isotope(isotope=self.isotope)
>>> @@ -220,7 +220,7 @@
>>>              key = DIC_KEY_FORMAT % (sfrq)
>>>
>>>              # Get the spectrum ids.
>>> -            spectrum_ids = getattr(self, 'spectrum_ids')[key]
>>> +            spectrum_ids = cdp.dic_spectrum_ids[key]
>>>
>>>              # Get the folder for peak files.
>>>              peaks_folder = getattr(self, key)['peaks_folder']
>>> @@ -277,10 +277,10 @@
>>>              section(file=sys.stdout, text="Error analysis for pipe='%s' 
>>> and sfr:%3.2f"%(pipe_name, sfrq), prespace=2)
>>>
>>>              # Get the spectrum ids.
>>> -            spectrum_ids = getattr(self, 'spectrum_ids')[key]
>>> +            spectrum_ids = cdp.dic_spectrum_ids[key]
>>>
>>>              # Get the spectrum ids replicates.
>>> -            spectrum_ids_replicates = getattr(self, 
>>> 'spectrum_ids_replicates')[key]
>>> +            spectrum_ids_replicates = cdp.dic_spectrum_ids_replicates[key]
>>>
>>>              # Check if there are any replicates.
>>>              for replicate in spectrum_ids_replicates:
>>>
>>>
>>> _______________________________________________
>>> relax (http://www.nmr-relax.com)
>>>
>>> This is the relax-commits mailing list
>>> [email protected]
>>>
>>> To unsubscribe from this list, get a password
>>> reminder, or change your subscription options,
>>> visit the list information page at
>>> https://mail.gna.org/listinfo/relax-commits
>>
>> _______________________________________________
>> relax (http://www.nmr-relax.com)
>>
>> This is the relax-devel mailing list
>> [email protected]
>>
>> To unsubscribe from this list, get a password
>> reminder, or change your subscription options,
>> visit the list information page at
>> https://mail.gna.org/listinfo/relax-devel

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

Reply via email to