Author: bugman Date: Fri Sep 12 15:20:32 2014 New Revision: 25792 URL: http://svn.gna.org/viewcvs/relax?rev=25792&view=rev Log: Modified the frame order sim_init_values() API method to handle missing optimisation data. The monte_carlo.initial_values user function was failing if optimisation had not been performed. This is now caught and handled correctly. Modified: branches/frame_order_cleanup/specific_analyses/frame_order/api.py Modified: branches/frame_order_cleanup/specific_analyses/frame_order/api.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/api.py?rev=25792&r1=25791&r2=25792&view=diff ============================================================================== --- branches/frame_order_cleanup/specific_analyses/frame_order/api.py (original) +++ branches/frame_order_cleanup/specific_analyses/frame_order/api.py Fri Sep 12 15:20:32 2014 @@ -814,13 +814,16 @@ # Create the simulation object. setattr(cdp, sim_object_name, []) - # Get the simulation object. + # Get the normal and simulation object. + object = None + if hasattr(cdp, object_name): + object = getattr(cdp, object_name) sim_object = getattr(cdp, sim_object_name) # Loop over the simulations. for j in range(cdp.sim_number): # Copy and append the data. - sim_object.append(deepcopy(getattr(cdp, object_name))) + sim_object.append(deepcopy(object)) def sim_pack_data(self, data_id, sim_data):