def calculate(self, distance): xEP1, xEP2, xEP3, xEP4, xEP5 = self.__constants M = self.m #magnitude depth = self.depth return xEP1 * M + xEP2 * log10(depth) + xEP3 - xEP4 * 0.5 * log10( (distance / depth)**2 + 1) - xEP5 * (sqrt(distance**2 + depth**2) - depth)
def __call__(self, lat, lon): #TO BE IMPLEMENTED #getting constants: xEP1, xEP2, xEP3, xEP4, xEP5 = self.__constants dist_epi_sta = deg2km(greatarc_dist(self.lat, self.lon, lat, lon)) M = self.m #magnitude depth = self.depth return xEP1*M + xEP2*log10(depth) + xEP3 - xEP4*0.5*log10((dist_epi_sta/depth)**2 + 1) - xEP5*(sqrt(dist_epi_sta**2 + depth**2)-depth)
def _centralasia_emca_1(M, depth, dist_epi_sta): #h=Depth, dist_epi_sta=distanza in R2 tra epicentro e stazione. DISTANCES IN KM!!!! """ Computed intensity prediction equation for central asia given a Magnitude M, the hypocenter depth and the distance between epicenter and station """ #computed intensity for Central Asia #Epicentral and EXtended distances; #Input: mag,depth,distance values #distance can be a vector xEP1 =1.0074538 xEP2 = -2.0045088 xEP3 = 3.2980663 xEP4 = 2.6920855 xEP5 = 4.2344195e-04 return xEP1*M + xEP2*log10(depth) + xEP3 - xEP4*0.5*log10((dist_epi_sta/depth)**2 + 1) - xEP5*(sqrt(dist_epi_sta**2 + depth**2)-depth)
def _centralasia_emca_1( M, depth, dist_epi_sta ): #h=Depth, dist_epi_sta=distanza in R2 tra epicentro e stazione. DISTANCES IN KM!!!! """ Computed intensity prediction equation for central asia given a Magnitude M, the hypocenter depth and the distance between epicenter and station """ #computed intensity for Central Asia #Epicentral and EXtended distances; #Input: mag,depth,distance values #distance can be a vector xEP1 = 1.0074538 xEP2 = -2.0045088 xEP3 = 3.2980663 xEP4 = 2.6920855 xEP5 = 4.2344195e-04 return xEP1 * M + xEP2 * log10(depth) + xEP3 - xEP4 * 0.5 * log10( (dist_epi_sta / depth)**2 + 1) - xEP5 * (sqrt(dist_epi_sta**2 + depth**2) - depth)