def parse_point_source_node(node, mfd_spacing=0.1):
    """
    Returns an "areaSource" node into an instance of the :class:
    openquake.hmtk.sources.area.mtkAreaSource
    """
    assert "pointSource" in node.tag
    pnt_taglist = get_taglist(node)
    # Get metadata
    point_id, name, trt = (node.attrib["id"],
                           node.attrib["name"],
                           node.attrib["tectonicRegion"])
    assert point_id  # Defensive validation!
    # Process geometry
    location, upper_depth, lower_depth = node_to_point_geometry(
        node.nodes[pnt_taglist.index("pointGeometry")])
    # Process scaling relation
    msr = node_to_scalerel(node.nodes[pnt_taglist.index("magScaleRel")])
    # Process aspect ratio
    aspect = float_(node.nodes[pnt_taglist.index("ruptAspectRatio")].text)
    # Process MFD
    mfd = node_to_mfd(node, pnt_taglist)
    # Process nodal planes
    npds = node_to_nodal_planes(
        node.nodes[pnt_taglist.index("nodalPlaneDist")])
    # Process hypocentral depths
    hdds = node_to_hdd(node.nodes[pnt_taglist.index("hypoDepthDist")])
    return mtkPointSource(point_id, name, trt,
                          geometry=location,
                          upper_depth=upper_depth,
                          lower_depth=lower_depth,
                          mag_scale_rel=msr,
                          rupt_aspect_ratio=aspect,
                          mfd=mfd,
                          nodal_plane_dist=npds,
                          hypo_depth_dist=hdds)
def parse_point_source_node ( node , mfd_spacing = 0.1 ) : assert "pointSource" in node . tag pnt_taglist = get_taglist ( node ) point_id , name , trt = ( node . attrib [ "id" ] , node . attrib [ "name" ] , node . attrib [ "tectonicRegion" ] ) assert point_id location , upper_depth , lower_depth = node_to_point_geometry ( node . nodes [ pnt_taglist . index ( "pointGeometry" ) ] ) msr = node_to_scalerel ( node . nodes [ pnt_taglist . index ( "magScaleRel" ) ] ) aspect = float_ ( node . nodes [ pnt_taglist . index ( "ruptAspectRatio" ) ] . text ) mfd = node_to_mfd ( node , pnt_taglist ) npds = node_to_nodal_planes ( node . nodes [ pnt_taglist . index ( "nodalPlaneDist" ) ] ) hdds = node_to_hdd ( node . nodes [ pnt_taglist . index ( "hypoDepthDist" ) ] ) return mtkPointSource ( point_id , name , trt , geometry = location , upper_depth = upper_depth , lower_depth = lower_depth , mag_scale_rel = msr , rupt_aspect_ratio = aspect , mfd = mfd , nodal_plane_dist = npds , hypo_depth_dist = hdds )
Returns an "areaSource" node into an instance of the :class:
    openquake.hmtk.sources.area.mtkAreaSource