def setup(self): '''Customization of the snuffling.''' self.set_name('Download Waveforms') self.add_parameter(Param('Min Radius [deg]', 'minradius', 0., 0., 20.)) self.add_parameter(Param('Max Radius [deg]', 'maxradius', 5., 0., 20.)) self.add_parameter(Param('Origin latitude [deg]', 'lat', 0, -90., 90.)) self.add_parameter(Param('Origin longitude [deg]', 'lon', 0., -180., 180.)) self.add_parameter(Switch('Use coordinates of selected event as origin', 'useevent', False)) self.add_parameter(Choice('Datecenter', 'datacenter', 'GEOFON', ['GEOFON', 'IRIS'])) self.add_parameter(Choice('Channels', 'channel_pattern', 'BH?', ['BH?', 'BHZ', 'HH?', '?H?', '*', '??Z'])) self.add_trigger('Save', self.save) self.set_live_update(False) self.current_stuff = None
def setup(self): self.set_name('Cake Phase') # self._phase_names = ('PmP ~S ~P ~P(moho)s ~P(sill-top)s' # ' ~P(sill-bottom)s Pdiff').split() self._phase_names = ('~P Pg Sg pP p P Pdiff PKP PcP PcS PKIKP pPKIKP' ' SSP PPS SPP PSP SP PS ~PS ~SP Pn s S Sn PP PPP' ' ScS Sdiff SS SSS PcP SKS SKIKS').split() for iphase, name in enumerate(self._phase_names): self.add_parameter( Switch(name, 'wantphase_%i' % iphase, iphase == 0)) self._models = cake.builtin_models() self.model_choice = Choice('Model', 'chosen_model', 'ak135-f-continental.m', self._models) self.add_parameter(self.model_choice) self.add_parameter(Param('Global shift', 'tshift', 0., -20., 20.)) self.add_parameter( Switch('Use station depth', 'use_station_depth', False)) self.add_trigger('Add Phase', self.add_phase_definition) self.add_trigger('Add Model', self.add_model_to_choice) self.add_trigger('Plot Model', self.plot_model) self.add_trigger('Plot Rays', self.plot_rays) self._phases = {} self._model = None
def setup(self): self.set_name('Play/Save Audio') self.add_parameter(Param('Fast Forward/Rewind', 'speed_up', 10., -20., 30.)) self.add_parameter(Choice('fps', 'fps_choice', '16000', ('44100', '32000', '18000', '16000', '9000', '4000', 'keep original'))) self.add_parameter(Param('Highpass [Hz]', 'corner_highpass', 0.001, 0.001, 100., low_is_none=True)) self.add_parameter(Param('Lowpass [Hz]', 'corner_lowpass', 100., 0.001, 100., high_is_none=True)) self.add_parameter(Param('Fader [percentage]', 'tfade', 5, 0., 50.)) self.add_parameter(Param('Volume', 'volume', 60., 0., 100.)) self.add_parameter(Switch('Follow', 'follow', False)) self.add_trigger('Pause/Play', self.pause_play) self.add_trigger('Stop', self.stop_play) self.add_trigger('Apply Main Control Filters', self.set_from_main) self.add_trigger('Export .wav file', self.export_wav) self.add_trigger('Load .wav file', self.load_data) self.set_live_update(False) self._tmpdir = self.tempdir() self.output = None self.marker_thread = None if not no_phonon: self.m_media = Phonon.MediaObject(self._panel_parent) self.no_phonon_warn = 'Install pyqt4 phonon!\nCan only export wav files.\nCheckout this snuffling\'s help.' self.added_traces = []
def setup(self): self.set_name('Quick Save') home_folder = os.path.expanduser('~') self.add_parameter(Choice('Root folder', 'root_folder', USER_DEF_ROOT_FOLDER, [USER_DEF_ROOT_FOLDER, home_folder + '/Desktop', home_folder + '/Documents' ])) self.add_parameter(Switch( 'Save only selected markers', 'save_sel_markers', False)) self.add_parameter(Switch( 'Save only markers associated\nto the active event', 'save_asc_markers', False)) self.add_parameter(Switch('Add active event name to path', 'name_to_path', False)) self.add_parameter(Switch('Use active event name as filename', 'name_as_filename', False)) self.add_parameter(Switch('Save to Velest format', 'velest_format', False)) self.setup_gui(reloaded=True) self.set_live_update(False)
def setup(self): '''Customization of the snuffling.''' self.set_name('Seismosizer') self.add_parameter(Param('Time', 'time', 0.0, -50., 50.)) # self.add_parameter( # Param('Latitude', 'lat', 0.0, -90., 90.)) # self.add_parameter( # Param('Longitude', 'lon', 0.0, -180., 180.)) self.add_parameter(Param('North shift', 'north_km', 0.0, -50., 50.)) self.add_parameter(Param('East shift', 'east_km', 0.0, -50., 50.)) self.add_parameter(Param('Depth', 'depth_km', 10.0, 0.0, 600.0)) self.add_parameter(Param('Magnitude', 'magnitude', 6.0, 0.0, 10.0)) self.add_parameter(Param('Strike', 'strike', 0., -180., 180.)) self.add_parameter(Param('Dip', 'dip', 90., 0., 90.)) self.add_parameter(Param('Rake', 'rake', 0., -180., 180.)) self.add_parameter(Param('Length', 'length', 0., 0., 1000 * km)) self.add_parameter(Param('Width', 'width', 0., 0., 500 * km)) self.add_parameter(Param('Nucleation X', 'nucleation_x', -1., -1., 1.)) self.add_parameter( Param('Rupture velocity', 'velocity', 3500.0, 0.0, 5000.0)) self.add_parameter(Param('STF duration', 'stf_duration', 0., 0., 20.)) self.add_parameter( Choice('STF type', 'stf_type', self.stf_types[0], self.stf_types)) self.add_parameter( Choice('GF Store', 'store_id', '<not loaded yet>', ['<not loaded yet>'])) self.add_parameter( Choice('Waveform type', 'waveform_type', 'Displacement [m]', [ 'Displacement [m]', 'Displacement [nm]', 'Velocity [m/s]', 'Velocity [nm/s]', 'Acceleration [m/s^2]', 'Acceleration [nm/s^2]' ])) self.add_trigger('Set Engine', self.set_engine) self.add_trigger('Set Params from Event', self.mechanism_from_event) self.add_trigger('Add Stores', self.add_store) self.store_ids = None self.offline_config = None self._engine = None
def setup(self): self.set_name('Tele-Check') self.add_parameter( Choice('Phase', 'phasename', 'P', ['P', 'S', 'PP', 'PPP', 'SS'])) self.add_parameter( Choice('Channels for polarization analysis', 'channels_polar', 'R, T', ['R, T', 'N, E'])) self.add_parameter( Choice('Channels for relative amplitude analysis', 'channels_relamp', 'Z', ['Z', 'R', 'T', 'E', 'N', 'All'])) self.add_parameter( Param('Minimum cross-correlation value', 'cc_min', 0.8, 0.1, 0.95)) self.add_trigger('Save Grond Corrections', self.save_grond_corrections) self.fframes = {} self.set_live_update(False) self._nslc_to_relamp = None
def setup(self): self.catalogs = { 'Geofon': catalog.Geofon(), 'USGS/NEIC PDE': catalog.USGS('pde'), 'USGS/NEIC US': catalog.USGS('us'), 'Global-CMT': catalog.GlobalCMT(), 'Kinherd': catalog.Kinherd(), } catkeys = sorted(self.catalogs.keys()) self.set_name('Catalog Search') self.add_parameter(Choice('Catalog', 'catalog', catkeys[0], catkeys)) self.add_parameter(Param('Min Magnitude', 'magmin', 0, 0, 10)) self.set_live_update(False)
def setup(self): self.set_name('STA LTA') self.add_parameter( Param('Highpass [Hz]', 'highpass', None, 0.001, 100., low_is_none=True)) self.add_parameter( Param('Lowpass [Hz]', 'lowpass', None, 0.001, 100., high_is_none=True)) self.add_parameter(Param('Short Window [s]', 'swin', 30., 0.01, 2 * h)) self.add_parameter(Param('Ratio', 'ratio', 3., 1.1, 20.)) self.add_parameter(Param('Level', 'level', 0.5, 0., 1.)) self.add_parameter( Param( 'Processing Block length (rel. to long window)', 'block_factor', 10., 2., 100., )) self.add_parameter( Switch('Show trigger level traces', 'show_level_traces', False)) self.add_parameter( Switch('Apply to full dataset', 'apply_to_all', False)) self.add_parameter( Choice('Variant', 'variant', 'centered', ['centered', 'right'])) self.add_parameter( Choice('Scaling/Normalization method', 'scalingmethod', '[0-1]', scalingmethods)) self.set_live_update(False)
def setup(self): self.set_name('Map') self.add_parameter(Switch('Only active event', 'only_active', False)) self.add_parameter(Switch('Open in external browser', 'open_external', False)) self.add_parameter(Choice('Provider', 'map_kind', 'OpenStreetMap', ['OpenStreetMap', 'GMT', 'Google Maps'])) self.set_live_update(False) self.figcount = 0 self.thread = qc.QThread() self.marker_tempdir = self.tempdir() self.file_serving_worker = FileServingWorker(self.marker_tempdir) self.file_serving_worker.moveToThread(self.thread) self.data_proxy = SignalProxy() self.data_proxy.content_to_serve.connect( self.file_serving_worker.run) self.thread.start() self.port = 9998 self.viewer_connected = False