lib/transient.py
def calc_energy_densities(self, rep_rate=283000):
        """ recalculate metadata depending on given parameters.
            it calculates energy densities
        """
        beams = ['pump', 'probe', 'destruction']

        for beam in beams:
            if getattr(self, (beam + '_spot')) is None:
                pass
            else:
                power = getattr(self, (beam + '_power'))
                spot = getattr(self, (beam + '_spot'))
                if beam == 'pump':
                    rep_rate = rep_rate / 2  # pump has half reprate (darkcontrol)
                energy = round(utils.get_energy_density(spot, power, rep_rate), 3)
                print(energy)
                setattr(self, (beam + '_energy'), energy)
 recalculate metadata depending on given parameters.
            it calculates energy densities
        
recalculate metadata depending on given parameters.
it calculates energy densities
recalculate metadata depending on given parameters . it calculates energy densities
def calc_energy_densities(self, rep_rate=283000):
        beams = ['pump', 'probe', 'destruction']
        for beam in beams:
            if getattr(self, (beam + '_spot')) is None:
                pass
            else:
                power = getattr(self, (beam + '_power'))
                spot = getattr(self, (beam + '_spot'))
                if beam == 'pump':
                    rep_rate = rep_rate / 2  
                energy = round(utils.get_energy_density(spot, power, rep_rate), 3)
                print(energy)
                setattr(self, (beam + '_energy'), energy)
def calc_energy_densities ( self , rep_rate = 283000 ) : beams = [ 'pump' , 'probe' , 'destruction' ] for beam in beams : if getattr ( self , ( beam + '_spot' ) ) is None : pass else : power = getattr ( self , ( beam + '_power' ) ) spot = getattr ( self , ( beam + '_spot' ) ) if beam == 'pump' : rep_rate = rep_rate / 2 energy = round ( utils . get_energy_density ( spot , power , rep_rate ) , 3 ) print ( energy ) setattr ( self , ( beam + '_energy' ) , energy )
recalculate metadata depending on given parameters.
recalculate metadata depending on given parameters .
""" recalculate metadata depending on given parameters.
            it calculates energy densities
        """ # pump has half reprate (darkcontrol)
self
rep_rate