Author: bugman Date: Mon Aug 11 15:29:48 2008 New Revision: 7147 URL: http://svn.gna.org/viewcvs/relax?rev=7147&view=rev Log: Merged revisions 7128-7129 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3 ........ r7128 | bugman | 2008-08-10 00:02:18 +0200 (Sun, 10 Aug 2008) | 3 lines Renamed the 'clean_temp' and 'clean' scons targets to 'clean' and 'clean_all' respectively. ........ r7129 | bugman | 2008-08-10 13:50:55 +0200 (Sun, 10 Aug 2008) | 3 lines The Monte Carlo error_analysis() function now uses the unimplemented specific model_loop() method. ........ Modified: branches/rdc_analysis/ (props changed) branches/rdc_analysis/generic_fns/monte_carlo.py branches/rdc_analysis/sconstruct Propchange: branches/rdc_analysis/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Aug 11 15:29:48 2008 @@ -1,1 +1,1 @@ -/1.3:1-7104 +/1.3:1-7146 Modified: branches/rdc_analysis/generic_fns/monte_carlo.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/monte_carlo.py?rev=7147&r1=7146&r2=7147&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/monte_carlo.py (original) +++ branches/rdc_analysis/generic_fns/monte_carlo.py Mon Aug 11 15:29:48 2008 @@ -136,21 +136,18 @@ if not hasattr(cdp, 'sim_state'): raise RelaxError, "Monte Carlo simulations have not been set up." - # Specific number of instances, return simulation chi2 array, return selected simulation array, return simulation parameter array, and set error functions. - count_num_instances = get_specific_fn('num_instances', cdp.pipe_type) + # Model loop, return simulation chi2 array, return selected simulation array, return simulation parameter array, and set error functions. + model_loop = get_specific_fn('model_loop', cdp.pipe_type) if prune > 0.0: return_sim_chi2 = get_specific_fn('return_sim_chi2', cdp.pipe_type) return_selected_sim = get_specific_fn('return_selected_sim', cdp.pipe_type) return_sim_param = get_specific_fn('return_sim_param', cdp.pipe_type) set_error = get_specific_fn('set_error', cdp.pipe_type) - # Count the number of instances. - num_instances = count_num_instances() - - # Loop over the instances. - for instance in xrange(num_instances): + # Loop over the models. + for model_info in model_loop(): # Get the selected simulation array. - select_sim = return_selected_sim(instance) + select_sim = return_selected_sim(model_info) # Initialise an array of indices to prune (an empty array means no pruning). indices_to_skip = [] @@ -158,7 +155,7 @@ # Pruning. if prune > 0.0: # Get the array of simulation chi-squared values. - chi2_array = return_sim_chi2(instance) + chi2_array = return_sim_chi2(model_info) # The total number of simulations. n = len(chi2_array) @@ -182,7 +179,7 @@ index = 0 while 1: # Get the array of simulation parameters for the index. - param_array = return_sim_param(instance, index) + param_array = return_sim_param(model_info, index) # Break (no more parameters). if param_array == None: @@ -249,7 +246,7 @@ sd = None # Set the parameter error. - set_error(instance, index, sd) + set_error(model_info, index, sd) # Increment the parameter index. index = index + 1 Modified: branches/rdc_analysis/sconstruct URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/sconstruct?rev=7147&r1=7146&r2=7147&view=diff ============================================================================== --- branches/rdc_analysis/sconstruct (original) +++ branches/rdc_analysis/sconstruct Mon Aug 11 15:29:48 2008 @@ -207,7 +207,7 @@ binary_dist_env.Depends('binary_dist', self.relax_fit_object) # Compile the C code. binary_dist_env.Depends('binary_dist', 'user_manual_pdf') # Compile the PDF version of the user manual. binary_dist_env.Depends('binary_dist', 'manual_clean_nodeps') # Clean up the temporary manual files. - binary_dist_env.Depends('binary_dist', 'clean_temp') # Then clean up all other temporary files. + binary_dist_env.Depends('binary_dist', 'clean') # Then clean up all other temporary files. binary_dist_env.Depends('binary_dist', 'package_bin') # Package the binary distribution. binary_dist_env.Depends('binary_dist', 'gpg_bin') # GPG sign the binary distribution file. @@ -217,7 +217,7 @@ source_dist_env.Depends('source_dist', 'version_check') # First check the program version number. source_dist_env.Depends('source_dist', 'user_manual_pdf') # Compile the PDF version of the user manual. source_dist_env.Depends('source_dist', 'manual_clean_nodeps') # Clean up the temporary manual files. - source_dist_env.Depends('source_dist', 'clean') # Then clean up the sources. + source_dist_env.Depends('source_dist', 'clean_all') # Then clean up the sources. source_dist_env.Depends('source_dist', 'package_src') # Package the source distribution. source_dist_env.Depends('source_dist', 'gpg_src') # GPG sign the source distribution file. @@ -264,14 +264,14 @@ ############## # Clean target. + clean_all_env = Environment(BUILDERS={'clean' : Builder(action=self.clean_all_files)}) + clean_all_env.clean(target='clean_all', source=None) + clean_all_env.Depends('clean_all', 'clean') # Run the 'clean' target. + clean_all_env.Depends('clean_all', 'manual_clean') # Run the 'manual_clean' target. + + # Target for removing temporary files. clean_env = Environment(BUILDERS={'clean' : Builder(action=self.clean_files)}) clean_env.clean(target='clean', source=None) - clean_env.Depends('clean', 'clean_temp') # Run the 'clean_temp' target. - clean_env.Depends('clean', 'manual_clean') # Run the 'manual_clean' target. - - # Target for removing temporary files. - clean_temp_env = Environment(BUILDERS={'clean' : Builder(action=self.clean_temp_files)}) - clean_temp_env.clean(target='clean_temp', source=None) @@ -348,14 +348,14 @@ manual_env.Clean(target='manual_clean_nodeps', source=None) - def clean_files(self, target, source, env): + def clean_all_files(self, target, source, env): """Builder action for cleaning up.""" # Print out. print - print "###############" - print "# Cleaning up #" - print "###############\n\n" + print "#########################" + print "# Cleaning up all files #" + print "#########################\n\n" # Extensions of files to remove. temp_extns = ['so', 'sconsign', 'dll', 'pyd'] @@ -376,7 +376,7 @@ print "\n\n\n" - def clean_temp_files(self, target, source, env): + def clean_files(self, target, source, env): """Builder action for removing temporary files.""" # Print out. @@ -429,7 +429,8 @@ string = string + ' %-25s%-40s\n' % ('uninstall', 'uninstall relax') string = string + ' %-25s%-40s\n' % ('binary_dist', 'create the binary distribution packages') string = string + ' %-25s%-40s\n' % ('source_dist', 'create the source distribution packages') - string = string + ' %-25s%-40s\n' % ('clean', 'remove the compiled and temporary files') + string = string + ' %-25s%-40s\n' % ('clean', 'remove the temporary files') + string = string + ' %-25s%-40s\n' % ('clean_all', 'remove the compiled and temporary files') string = string + ' %-25s%-40s\n' % ('user_manual_pdf', 'create the user manual (PDF version)') string = string + ' %-25s%-40s\n' % ('user_manual_pdf_nofetch', 'create the user manual (PDF version, without fetching the docstrings)') string = string + ' %-25s%-40s\n' % ('user_manual_html', 'create the user manual (HTML version)') @@ -443,7 +444,6 @@ string = string + ' %-25s%-40s\n' % ('gpg_bin', 'GPG sign the binary distribution file') string = string + ' %-25s%-40s\n' % ('gpg_src', 'GPG sign the source distribution file') string = string + ' %-25s%-40s\n' % ('version_check', 'check the relax version number') - string = string + ' %-25s%-40s\n' % ('clean_temp', 'remove the temporary files') string = string + ' %-25s%-40s\n' % ('manual_version_file', 'create the relax version number LaTeX file') string = string + ' %-25s%-40s\n' % ('fetch_docstrings', 'fetch and LaTeX format the docstrings') string = string + ' %-25s%-40s\n' % ('compile_user_manual_pdf', 'compile the PDF version of the user manual from the LaTeX sources')