def __init__(
        self,
        source_id,
        name,
        tectonic_region_type,
        mfd,
        rupture_mesh_spacing,
        magnitude_scaling_relationship,
        rupture_aspect_ratio,
        temporal_occurrence_model,
        # complex fault specific parameters
        edges,
        rake,
    ):
        super(ComplexFaultSource, self).__init__(
            source_id,
            name,
            tectonic_region_type,
            mfd,
            rupture_mesh_spacing,
            magnitude_scaling_relationship,
            rupture_aspect_ratio,
            temporal_occurrence_model,
        )

        NodalPlane.check_rake(rake)
        ComplexFaultSurface.check_fault_data(edges, rupture_mesh_spacing)
        self.edges = edges
        self.rake = rake
Esempio n. 2
0
    def __init__(self, source_id, name, tectonic_region_type,
                 mfd, rupture_mesh_spacing,
                 magnitude_scaling_relationship, rupture_aspect_ratio,
                 # simple fault specific parameters
                 upper_seismogenic_depth, lower_seismogenic_depth,
                 fault_trace, dip, rake):
        super(SimpleFaultSource, self).__init__(
            source_id, name, tectonic_region_type, mfd, rupture_mesh_spacing,
            magnitude_scaling_relationship, rupture_aspect_ratio
        )

        NodalPlane.check_rake(rake)
        SimpleFaultSurface.check_fault_data(
            fault_trace, upper_seismogenic_depth, lower_seismogenic_depth,
            dip, rupture_mesh_spacing
        )
        self.fault_trace = fault_trace
        self.upper_seismogenic_depth = upper_seismogenic_depth
        self.lower_seismogenic_depth = lower_seismogenic_depth
        self.dip = dip
        self.rake = rake

        min_mag = self.mfd.get_min_mag()
        cols_rows = self._get_rupture_dimensions(float('inf'), float('inf'),
                                                 min_mag)
        if 1 in cols_rows:
            raise ValueError('mesh spacing %s is too low to represent '
                             'ruptures of magnitude %s' %
                             (rupture_mesh_spacing, min_mag))
Esempio n. 3
0
 def __init__(self, mag, rake, tectonic_region_type, hypocenter,
              surface, rupture_slip_direction=None):
     if not mag > 0:
         raise ValueError('magnitude must be positive')
     NodalPlane.check_rake(rake)
     self.tectonic_region_type = tectonic_region_type
     self.rake = rake
     self.mag = mag
     self.hypocenter = hypocenter
     self.surface = surface
     self.rupture_slip_direction = rupture_slip_direction
Esempio n. 4
0
 def __init__(self, mag, rake, tectonic_region_type, hypocenter,
              surface, rupture_slip_direction=None, weight=None):
     if not mag > 0:
         raise ValueError('magnitude must be positive')
     NodalPlane.check_rake(rake)
     self.tectonic_region_type = tectonic_region_type
     self.rake = rake
     self.mag = mag
     self.hypocenter = hypocenter
     self.surface = surface
     self.rupture_slip_direction = rupture_slip_direction
     self.weight = weight
Esempio n. 5
0
 def __init__(self, mag, rake, tectonic_region_type, hypocenter, surface, source_typology):
     if not mag > 0:
         raise ValueError("magnitude must be positive")
     if not hypocenter.depth > 0:
         raise ValueError("rupture hypocenter must have positive depth")
     NodalPlane.check_rake(rake)
     self.tectonic_region_type = tectonic_region_type
     self.rake = rake
     self.mag = mag
     self.hypocenter = hypocenter
     self.surface = surface
     self.source_typology = source_typology
 def __init__(self, source_id, name, tectonic_region_type, mfd,
              rupture_mesh_spacing, magnitude_scaling_relationship,
              rupture_aspect_ratio, temporal_occurrence_model,
              # complex fault specific parameters
              edges, rake):
     super().__init__(
         source_id, name, tectonic_region_type, mfd, rupture_mesh_spacing,
         magnitude_scaling_relationship, rupture_aspect_ratio,
         temporal_occurrence_model)
     NodalPlane.check_rake(rake)
     ComplexFaultSurface.check_fault_data(edges, rupture_mesh_spacing)
     self.edges = edges
     self.rake = rake
Esempio n. 7
0
 def __init__(self, mag, rake, tectonic_region_type, hypocenter, surface,
              source_typology):
     if not mag > 0:
         raise ValueError('magnitude must be positive')
     if not hypocenter.depth > 0:
         raise ValueError('rupture hypocenter must have positive depth')
     NodalPlane.check_rake(rake)
     self.tectonic_region_type = tectonic_region_type
     self.rake = rake
     self.mag = mag
     self.hypocenter = hypocenter
     self.surface = surface
     self.source_typology = source_typology
Esempio n. 8
0
    def __init__(
        self,
        source_id,
        name,
        tectonic_region_type,
        mfd,
        rupture_mesh_spacing,
        magnitude_scaling_relationship,
        rupture_aspect_ratio,
        temporal_occurrence_model,
        # simple fault specific parameters
        upper_seismogenic_depth,
        lower_seismogenic_depth,
        fault_trace,
        dip,
        rake,
        hypo_list=(),
        slip_list=()):
        super(SimpleFaultSource,
              self).__init__(source_id, name, tectonic_region_type, mfd,
                             rupture_mesh_spacing,
                             magnitude_scaling_relationship,
                             rupture_aspect_ratio, temporal_occurrence_model)

        NodalPlane.check_rake(rake)
        SimpleFaultSurface.check_fault_data(fault_trace,
                                            upper_seismogenic_depth,
                                            lower_seismogenic_depth, dip,
                                            rupture_mesh_spacing)
        self.fault_trace = fault_trace
        self.upper_seismogenic_depth = upper_seismogenic_depth
        self.lower_seismogenic_depth = lower_seismogenic_depth
        self.dip = dip
        self.rake = rake

        min_mag, max_mag = self.mfd.get_min_max_mag()
        cols_rows = self._get_rupture_dimensions(float('inf'), float('inf'),
                                                 min_mag)
        self.slip_list = slip_list
        self.hypo_list = hypo_list

        if (len(self.hypo_list) and not len(self.slip_list)
                or not len(self.hypo_list) and len(self.slip_list)):
            raise ValueError('hypo_list and slip_list have to be both given '
                             'or neither given')

        if 1 in cols_rows:
            raise ValueError('mesh spacing %s is too high to represent '
                             'ruptures of magnitude %s' %
                             (rupture_mesh_spacing, min_mag))
Esempio n. 9
0
 def __init__(self, mag, rake, tectonic_region_type, hypocenter,
              surface, source_typology, rupture_slip_direction=None, surface_nodes=()):
     if not mag > 0:
         raise ValueError('magnitude must be positive')
     if not hypocenter.depth > 0:
         raise ValueError('rupture hypocenter must have positive depth')
     NodalPlane.check_rake(rake)
     self.tectonic_region_type = tectonic_region_type
     self.rake = rake
     self.mag = mag
     self.hypocenter = hypocenter
     self.surface = surface
     self.source_typology = source_typology
     self.surface_nodes = surface_nodes
     self.rupture_slip_direction = rupture_slip_direction
Esempio n. 10
0
    def __init__(self, source_id, name, tectonic_region_type,
                 mfd, rupture_mesh_spacing,
                 magnitude_scaling_relationship, rupture_aspect_ratio,
                 temporal_occurrence_model,
                 # simple fault specific parameters
                 upper_seismogenic_depth, lower_seismogenic_depth,
                 fault_trace, dip, rake, hypo_list=(), slip_list=()):
        super(SimpleFaultSource, self).__init__(
            source_id, name, tectonic_region_type, mfd, rupture_mesh_spacing,
            magnitude_scaling_relationship, rupture_aspect_ratio,
            temporal_occurrence_model
        )

        NodalPlane.check_rake(rake)
        SimpleFaultSurface.check_fault_data(
            fault_trace, upper_seismogenic_depth, lower_seismogenic_depth,
            dip, rupture_mesh_spacing
        )
        self.fault_trace = fault_trace
        self.upper_seismogenic_depth = upper_seismogenic_depth
        self.lower_seismogenic_depth = lower_seismogenic_depth
        self.dip = dip
        self.rake = rake

        min_mag, max_mag = self.mfd.get_min_max_mag()
        cols_rows = self._get_rupture_dimensions(float('inf'), float('inf'),
                                                 min_mag)
        self.slip_list = slip_list
        self.hypo_list = hypo_list

        if (len(self.hypo_list) and not len(self.slip_list) or
           not len(self.hypo_list) and len(self.slip_list)):
            raise ValueError('hypo_list and slip_list have to be both given '
                             'or neither given')

        if 1 in cols_rows:
            raise ValueError('mesh spacing %s is too high to represent '
                             'ruptures of magnitude %s' %
                             (rupture_mesh_spacing, min_mag))
Esempio n. 11
0
    def __init__(
            self,
            source_id,
            name,
            tectonic_region_type,
            mfd,
            rupture_mesh_spacing,
            magnitude_scaling_relationship,
            rupture_aspect_ratio,
            # simple fault specific parameters
            upper_seismogenic_depth,
            lower_seismogenic_depth,
            fault_trace,
            dip,
            rake):
        super(SimpleFaultSource,
              self).__init__(source_id, name, tectonic_region_type, mfd,
                             rupture_mesh_spacing,
                             magnitude_scaling_relationship,
                             rupture_aspect_ratio)

        NodalPlane.check_rake(rake)
        SimpleFaultSurface.check_fault_data(fault_trace,
                                            upper_seismogenic_depth,
                                            lower_seismogenic_depth, dip,
                                            rupture_mesh_spacing)
        self.fault_trace = fault_trace
        self.upper_seismogenic_depth = upper_seismogenic_depth
        self.lower_seismogenic_depth = lower_seismogenic_depth
        self.dip = dip
        self.rake = rake

        min_mag = self.mfd.get_min_mag()
        cols_rows = self._get_rupture_dimensions(float('inf'), float('inf'),
                                                 min_mag)
        if 1 in cols_rows:
            raise ValueError('mesh spacing %s is too low to represent '
                             'ruptures of magnitude %s' %
                             (rupture_mesh_spacing, min_mag))