Пример #1
0
    def Start_sample_path(self,PRIOR):
        start_sample_path =  None # '/home/nienke/Documents/Master/Data/MSS/start_sample.txt'

        if start_sample_path == None:
            create = create_starting_sample()
            strike = np.random.uniform(PRIOR['strike']['range_min'], PRIOR['strike']['range_max'])
            dip = np.random.uniform(PRIOR['dip']['range_min'], PRIOR['dip']['range_max'])
            rake = np.random.uniform(PRIOR['rake']['range_min'], PRIOR['rake']['range_max'])
            epi = np.random.uniform(PRIOR['epi']['range_min'], PRIOR['epi']['range_max'])
            depth = np.random.uniform(PRIOR['depth']['range_min'], PRIOR['depth']['range_max'])

            start_sample_path = create.get_sample_manual(epi,depth,strike,dip,rake,PRIOR['M0'],self.directory+'start_sample.txt')
        return start_sample_path
Пример #2
0
    def Start_sample_path(self, PRIOR):
        start_sample_path = "None"

        if start_sample_path == "None":
            create = create_starting_sample()
            strike = np.random.uniform(PRIOR['strike']['range_min'],
                                       PRIOR['strike']['range_max'])
            dip = np.random.uniform(PRIOR['dip']['range_min'],
                                    PRIOR['dip']['range_max'])
            rake = np.random.uniform(PRIOR['rake']['range_min'],
                                     PRIOR['rake']['range_max'])
            epi = np.random.uniform(PRIOR['epi']['range_min'],
                                    PRIOR['epi']['range_max'])
            depth = np.random.uniform(PRIOR['depth']['range_min'],
                                      PRIOR['depth']['range_max'])

            start_sample_path = create.get_sample_manual(
                epi, depth, strike, dip, rake, PRIOR['M0'],
                self.directory + 'start_sample.txt')
        return start_sample_path