Older stuff/heat_transfer_simulation_inverse.py
def calculate_error(self):
        """
        Determining the error margin of the simulation
        TODO: review this, as it might not be correct
        """

        calculated_heatflux = self.Sim.HeatFlux
        experiment_heatflux = np.interp(self.Sim.t, self.Sim.Exp_data.t_data,
                                        self.Sim.Exp_data.q_data)

        # Determining the shorter length, to unify the sizes
        min_length = min(len(calculated_heatflux), len(experiment_heatflux))

        try:
            error = np.sum(abs(calculated_heatflux[:min_length] - experiment_heatflux[:min_length]))/min_length
            return round(error, 3)
        except ValueError:
            # This is raised when the lengths of compared lists are not
            #   the same (for some reason)
            return "unknown"

        Determining the error margin of the simulation
        TODO: review this, as it might not be correct
        
Determining the error margin of the simulation
TODO: review this, as it might not be correct
Determining the error margin of the simulation TODO : review this as it might not be correct
def calculate_error(self):
        calculated_heatflux = self.Sim.HeatFlux
        experiment_heatflux = np.interp(self.Sim.t, self.Sim.Exp_data.t_data,
                                        self.Sim.Exp_data.q_data)
        min_length = min(len(calculated_heatflux), len(experiment_heatflux))
        try:
            error = np.sum(abs(calculated_heatflux[:min_length] - experiment_heatflux[:min_length]))/min_length
            return round(error, 3)
        except ValueError:
            return "unknown"
def calculate_error ( self ) : calculated_heatflux = self . Sim . HeatFlux experiment_heatflux = np . interp ( self . Sim . t , self . Sim . Exp_data . t_data , self . Sim . Exp_data . q_data ) min_length = min ( len ( calculated_heatflux ) , len ( experiment_heatflux ) ) try : error = np . sum ( abs ( calculated_heatflux [ : min_length ] - experiment_heatflux [ : min_length ] ) ) / min_length return round ( error , 3 ) except ValueError : return "unknown"
Determining the error margin of the simulation
TODO: review this, as it might not be correct
Determining the error margin of the simulation TODO : review this as it might not be correct
"""
        Determining the error margin of the simulation
        TODO: review this, as it might not be correct
        """ # Determining the shorter length, to unify the sizes # This is raised when the lengths of compared lists are not #   the same (for some reason)
self