示例#1
0
            tmin=util.str_to_time(d['start'], format='%Y-%m-%dT%H:%M:%S'),
            tmax=dummy_aware_str_to_time(d['end']),
            lat=float(d['latitude']),
            lon=float(d['longitude']),
            elevation=float(d['elevation']),
            depth=float(d['depth']),
            dip=float(d['dip']),
            azimuth=float(d['azimuth']),
            input_unit=d['input unit'],
            output_unit=d['output unit'],
            response=response)
    except:
        raise EnhancedSacPzError('cannot get all required information')


iload_filename, iload_dirname, iload_glob, iload = util.make_iload_family(
    iload_fh, 'SACPZ', ':py:class:`EnhancedSacPzResponse`')


def make_stationxml(responses, inconsistencies='warn'):
    '''
    Create stationxml from "enhanced" SACPZ information.

    :param responses: iterable yielding
        :py:class:`EnhancedSacPzResponse` objects
    :returns: :py:class:`pyrocko.fdsn.station.FDSNStationXML` object
    '''

    networks = {}
    stations = {}

    station_coords = defaultdict(list)
示例#2
0
                    frequency=totalgain.frequency,
                    input_units=stages[0].input_units,
                    output_units=stages[-1].output_units),
                stage_list=stages)

            yield ChannelResponse(
                codes=nslc,
                start_date=tmin,
                end_date=tmax,
                response=resp)

        else:
            raise RespError('incomplete response information')


iload_filename, iload_dirname, iload_glob, iload = util.make_iload_family(
    iload_fh, 'RESP', ':py:class:`ChannelResponse`')


def make_stationxml(pyrocko_stations, channel_responses):
    '''Create stationxml from pyrocko station list and RESP information.

    :param pyrocko_stations: list of :py:class:`pyrocko.model.Station` objects
    :param channel_responses: iterable yielding :py:class:`ChannelResponse`
        objects
    :returns: :py:class:`pyrocko.fdsn.station.FDSNStationXML` object with
        merged information

    If no station information is available for any response information, it
    is skipped and a warning is emitted.
    '''
    pstations = dict((s.nsl(), s) for s in pyrocko_stations)
示例#3
0
                value=totalgain.value,
                frequency=totalgain.frequency,
                input_units=stages[0].input_units,
                output_units=stages[-1].output_units),
                               stage_list=stages)

            yield ChannelResponse(codes=nslc,
                                  start_date=tmin,
                                  end_date=tmax,
                                  response=resp)

        else:
            raise RespError('incomplete response information')


iload_filename, iload_dirname, iload_glob, iload = util.make_iload_family(
    iload_fh, 'RESP', ':py:class:`ChannelResponse`')


def make_stationxml(pyrocko_stations, channel_responses):
    '''Create stationxml from pyrocko station list and RESP information.

    :param pyrocko_stations: list of :py:class:`pyrocko.model.Station` objects
    :param channel_responses: iterable yielding :py:class:`ChannelResponse`
        objects
    :returns: :py:class:`pyrocko.fdsn.station.FDSNStationXML` object with
        merged information

    If no station information is available for any response information, it
    is skipped and a warning is emitted.
    '''
    pstations = dict((s.nsl(), s) for s in pyrocko_stations)
            tmax=dummy_aware_str_to_time(d['end']),
            lat=float(d['latitude']),
            lon=float(d['longitude']),
            elevation=float(d['elevation']),
            depth=float(d['depth']),
            dip=float(d['dip']),
            azimuth=float(d['azimuth']),
            input_unit=d['input unit'],
            output_unit=d['output unit'],
            response=response)
    except KeyError as e:
        raise EnhancedSacPzError(
            'cannot get all required information "%s"' % e.args[0])


iload_filename, iload_dirname, iload_glob, iload = util.make_iload_family(
    iload_fh, 'SACPZ', ':py:class:`EnhancedSacPzResponse`')


def make_stationxml(responses, inconsistencies='warn'):
    '''
    Create stationxml from "enhanced" SACPZ information.

    :param responses: iterable yielding
        :py:class:`EnhancedSacPzResponse` objects
    :returns: :py:class:`pyrocko.fdsn.station.FDSNStationXML` object
    '''

    networks = {}
    stations = {}

    station_coords = defaultdict(list)