def rotate(self, rotation_angle):
        """
        use mtpy.analysis.geometry to rotate a z array and recalculate res and phase
        
        """
        import pek1dclasses as pek1dc

        if not hasattr(self, 'z'):
            self.read_respfile()

        new_z = np.zeros_like(self.z)
        zerr = np.zeros_like(self.z, dtype=float)

        for iz, zarray in enumerate(self.z):
            new_z[iz], ze = MTg.MTz.rotate_z(zarray, rotation_angle)

        self.z = new_z

        self.resistivity = np.zeros_like(self.z, dtype=float)
        self.phase = np.zeros_like(self.z, dtype=float)

        for iz in range(len(self.z)):
            r, re, p, pe = pek1dc._compute_res_phase(self.z[iz], zerr[iz],
                                                     self.freq)
            self.resistivity[iz] = r
            #            self.resistivity_err[iz] = re
            self.phase[iz] = p


#            self.phase_err[iz] = pe

        self.rotation_angle = rotation_angle
Exemple #2
0
    def rotate(self,rotation_angle):
        """
        use mtpy.analysis.geometry to rotate a z array and recalculate res and phase
        
        """
        import pek1dclasses as pek1dc
        
        if not hasattr(self,'z'):
            self.read_respfile()
            
        new_z = np.zeros_like(self.z)
        zerr = np.zeros_like(self.z,dtype=float)
        
        for iz,zarray in enumerate(self.z):
            new_z[iz],ze = MTg.MTz.rotate_z(zarray,rotation_angle)
            
        self.z = new_z


        self.resistivity = np.zeros_like(self.z,dtype=float)
        self.phase = np.zeros_like(self.z,dtype=float)
        
        for iz in range(len(self.z)):
            r,re,p,pe = pek1dc._compute_res_phase(self.z[iz],zerr[iz],self.freq)
            self.resistivity[iz] = r
#            self.resistivity_err[iz] = re
            self.phase[iz] = p
#            self.phase_err[iz] = pe



        self.rotation_angle = rotation_angle
    def rotate(self, rotation_angle):
        """
        use mtpy.analysis.geometry to rotate a z array and recalculate res and phase
        
        """
        import pek1dclasses as pek1dc

        if not hasattr(self, 'z'):
            self.read_datafile()

        new_z = np.zeros_like(self.z)
        new_ze = np.zeros_like(self.zerr, dtype=float)

        #        for iz,zarray in enumerate(self.z):
        new_z, new_ze = MTg.MTz.rotate_z(self.z,
                                         rotation_angle,
                                         zerr_array=self.zerr)

        self.z = new_z
        self.zerr = new_ze

        self.resistivity, self.resistivity_err, self.phase, self.phase_err = \
        pek1dc._compute_res_phase(self.z,self.zerr,self.freq)

        self.rotation_angle = rotation_angle
Exemple #4
0
    def rotate(self,rotation_angle):
        """
        use mtpy.analysis.geometry to rotate a z array and recalculate res and phase
        
        """
        import pek1dclasses as pek1dc
        
        if not hasattr(self,'z'):
            self.read_datafile()
            
        new_z = np.zeros_like(self.z)
        new_ze = np.zeros_like(self.zerr,dtype=float)
        
#        for iz,zarray in enumerate(self.z):
        new_z,new_ze = MTg.MTz.rotate_z(self.z,rotation_angle,zerr_array = self.zerr)
            
        self.z = new_z
        self.zerr = new_ze

        self.resistivity, self.resistivity_err, self.phase, self.phase_err = \
        pek1dc._compute_res_phase(self.z,self.zerr,self.freq)


        self.rotation_angle = rotation_angle