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): '''Customization of the snuffling.''' self.set_name('Iris Data') 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.set_live_update(False)
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): '''Customization of the snuffling.''' self.set_name('Block RMS') self.add_parameter( Param('Block Length [s]', 'block_length', 100., 0.1, 3600.)) self.set_live_update(False)
def setup(self): '''Customization of the snuffling.''' self.set_name('Plot Amplitude Spectrum') self.add_parameter(Switch('Smoothing', 'want_smoothing', False)) self.add_parameter(Param('Smoothing band width', 'b', 40., 1., 100.)) self.set_live_update(False) self._wins = {}
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): '''Customization of the snuffling.''' 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., 1, 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('Scaling/Normalization method', 'scalingmethod', '[0-1]', scalingmethods)) self.set_live_update(False)
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): '''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): '''Customization of the snuffling.''' self.set_name('Locate active event') self.add_parameter(Param('P velocity', 'vp', 3000, 0, 10000)) self.add_parameter(Param('S velocity', 'vs', 1875, 0, 6250)) self.add_parameter(Param('Damping', 'damp', 0.01, 0.001, 0.1))