Esempio n. 1
0
import os, logging
from waveloc.options import WavelocOptions
from waveloc.SDS_processing import do_SDS_processing_setup_and_run
from waveloc.migration import do_migration_setup_and_run
from waveloc.locations_trigger import do_locations_trigger_setup_and_run
from waveloc.locations_prob import do_locations_prob_setup_and_run
from waveloc.plot_locations2 import do_plotting_setup_and_run, \
                                    do_probloc_plotting_setup_and_run


logging.basicConfig(level=logging.INFO, 
        format='%(levelname)s : %(asctime)s : %(message)s')


# set up default parameters
wo = WavelocOptions()

# set base path to $WAVELOC_PATH 
wo.verify_base_path()

##########################################
# set waveloc options
##########################################

wo.opdict['time']=True
wo.opdict['verbose']=False

wo.opdict['test_datadir']='test_data'
wo.opdict['datadir']='TEST'
wo.opdict['outdir']='TEST_fullRes'
Esempio n. 2
0

def comb_strings(str_list):

    out_str = ''
    for i in str_list:
        out_str += i + ','

    return out_str[:-1]  #gets rid of the last comma


logging.basicConfig(level=logging.INFO,
                    format='%(levelname)s : %(asctime)s : %(message)s')

# set up default parameters
wo = WavelocOptions()
wo.opdict['base_path'] = os.getcwd()
#print wo.opdict['base_path']
# set base path to $WAVELOC_PATH
wo.verify_base_path()

##########################################
# set waveloc options
##########################################

wo.opdict['time'] = True
wo.opdict['verbose'] = False

wo.opdict['test_datadir'] = '/storage/ANT/PROGRAMS/ANT_OUTPUT/INPUT/DATA'

# create list of all raw file names that are being processed in test_datadir
def setUp():

    logging.info('Setting up synthetic test case generation...')

    # set up default parameters
    wo = WavelocOptions()

    # set base path to $WAVELOC_PATH
    wo.verify_base_path()

    # set options for synthetic test
    wo.opdict['time'] = True
    wo.opdict['verbose'] = False

    wo.opdict['outdir'] = 'EXAMPLE_Dirac'
    wo.opdict['time_grid'] = 'Slow_len.100m.P'
    wo.opdict['load_ttimes_buf'] = True
    wo.opdict['search_grid'] = 'grid.Taisne.search.hdr'
    wo.opdict['stations'] = 'coord_stations_test'

    wo.opdict['syn_filename'] = 'test_grid4D_hires.hdf5'
    wo.opdict['syn_amplitude'] = 1.0
    wo.opdict['syn_datalength'] = 20.0
    wo.opdict['syn_samplefreq'] = 100.0
    wo.opdict['syn_kwidth'] = 0.1
    wo.opdict['syn_otime'] = 6.0

    # place default point at center of grid
    base_path = wo.opdict['base_path']
    search_grid_filename = os.path.join(base_path, 'lib',
                                        wo.opdict['search_grid'])
    grid_info = read_hdr_file(search_grid_filename)
    wo.opdict['syn_ix'] = grid_info['nx']/2
    wo.opdict['syn_iy'] = grid_info['ny']/2
    wo.opdict['syn_iz'] = grid_info['nz']/2

    # sanity check
    wo.verify_synthetic_options()

    return (wo, grid_info)
    
def comb_strings(str_list):
    
    out_str = ''    
    for i in str_list: 
        out_str += i + ','
        
    return out_str[:-1] #gets rid of the last comma 
    
    

logging.basicConfig(level=logging.INFO,
                    format='%(levelname)s : %(asctime)s : %(message)s')

# set up default parameters
wo = WavelocOptions()
wo.opdict['base_path'] = os.getcwd()
#print wo.opdict['base_path']
# set base path to $WAVELOC_PATH
wo.verify_base_path()

##########################################
# set waveloc options
##########################################




wo.opdict['time'] = True
wo.opdict['verbose'] = False
Esempio n. 5
0
import os, logging
from waveloc.options import WavelocOptions
from waveloc.synth_migration import generateSyntheticDirac
from waveloc.plot_mpl import plotDiracTest


logging.basicConfig(level=logging.INFO, format='%(levelname)s : %(asctime)s : %(message)s')


# set up default parameters
wo = WavelocOptions()

# set base path to $WAVELOC_PATH 
wo.verify_base_path()

# set options for synthetic test
wo.opdict['time']    = True
wo.opdict['verbose'] = False

wo.opdict['outdir'] = 'TEST_Dirac'

wo.opdict['time_grid']       = 'Slow_len.100m.P'
wo.opdict['load_ttimes_buf'] = True

wo.opdict['search_grid'] = 'grid.Taisne.search.hdr'

wo.opdict['stations'] = 'coord_stations_test'

#uncomment remove some stations to test response for fewer stations
#wo.opdict['sta_list']="FJS,FLR,FOR,HDL,RVL,SNE,UV01,UV02,UV03,UV04,UV05,UV06,UV07,UV08,UV09,UV10,UV11,UV12,UV13,UV14,UV15"
Esempio n. 6
0
def setUp():

    logging.info('Setting up synthetic test case generation...')

    # set up default parameters
    wo = WavelocOptions()

    # set base path to $WAVELOC_PATH
    wo.verify_base_path()

    # set options for synthetic test
    wo.opdict['time'] = True
    wo.opdict['verbose'] = False

    wo.opdict['outdir'] = 'EXAMPLE_Dirac'
    wo.opdict['time_grid'] = 'Slow_len.100m.P'
    wo.opdict['load_ttimes_buf'] = True
    wo.opdict['search_grid'] = 'grid.Taisne.search.hdr'
    wo.opdict['stations'] = 'coord_stations_test'

    wo.opdict['syn_filename'] = 'test_grid4D_hires.hdf5'
    wo.opdict['syn_amplitude'] = 1.0
    wo.opdict['syn_datalength'] = 20.0
    wo.opdict['syn_samplefreq'] = 100.0
    wo.opdict['syn_kwidth'] = 0.1
    wo.opdict['syn_otime'] = 6.0

    # place default point at center of grid
    base_path = wo.opdict['base_path']
    search_grid_filename = os.path.join(base_path, 'lib',
                                        wo.opdict['search_grid'])
    grid_info = read_hdr_file(search_grid_filename)
    wo.opdict['syn_ix'] = grid_info['nx'] / 2
    wo.opdict['syn_iy'] = grid_info['ny'] / 2
    wo.opdict['syn_iz'] = grid_info['nz'] / 2

    # sanity check
    wo.verify_synthetic_options()

    return (wo, grid_info)