예제 #1
0
def second_quad_cloud_catalog():
    """
    This generates a 'processed' dendrogram catalog, made
    from the global, pre-loaded `catalog` from the second quadrant survey.

    It identifies edge structures, computes tree statistics,
    determines the kinematic distances, and then assigns physical
    properties to the structures.

    Its output is meant to be the input to `get_positive_velocity_clouds()`,
    and `get_negative_velocity_clouds()`.

    """

    catalog_cp = catalog.copy(copy_data=True)

    # assignment of tree statistic properties
    compute_tree_stats(catalog_cp, d)

    # note edge structures
    catalog_cp['on_edge'] = identify_edge_structures(d)

    # DISTANCE assignment
    distance_table = make_universal_distance_column(catalog, nearfar='near')

    distance_assigner_with_plusminus_errors(catalog_cp,
                                            distance_table,
                                            distance_column_name='distance')
    assign_distance_columns_trivial(catalog_cp)

    # assignment of physical properties to unambigously-distanced structures
    assign_properties(catalog_cp)

    return catalog_cp
def third_quad_cloud_catalog():
    """
    This generates a 'processed' dendrogram catalog, made
    from the global, pre-loaded `catalog` from the third quadrant survey.

    It identifies edge structures, computes tree statistics,
    determines the kinematic distances, and then assigns physical
    properties to the structures.

    Its output is meant to be the input to `get_positive_velocity_clouds()`,
    and `get_negative_velocity_clouds()`.

    """

    catalog_cp = catalog.copy(copy_data=True)

    # assignment of tree statistic properties
    compute_tree_stats(catalog_cp, d)

    # note edge structures
    catalog_cp['on_edge'] = identify_edge_structures(d)

    # DISTANCE assignment
    distance_table = make_universal_distance_column(catalog, nearfar='near')

    distance_assigner_with_plusminus_errors(catalog_cp, distance_table, distance_column_name='distance')
    assign_distance_columns_trivial(catalog_cp)

    # assignment of physical properties to unambigously-distanced structures
    assign_properties(catalog_cp)

    return catalog_cp
예제 #3
0
def first_quad_cloud_catalog():
    """
    This generates a 'processed' dendrogram catalog, made
    from the global, pre-loaded `catalog` from the first quadrant.

    It identifies edge structures, computes tree statistics,
    determines the near & far distances (but does not resolve them),
    assigns a distance when there is no KDA, and then assigns physical
    properties to the unambiguously-distanced structures.

    Its output is meant to be the input to `get_positive_velocity_clouds()`,
    `get_perseus_arm_low_velocity_clouds()`, and
    `get_negative_velocity_clouds()`.

    """

    catalog_cp = catalog.copy(copy_data=True)

    # assignment of tree statistic properties
    compute_tree_stats(catalog_cp, d)

    # note edge structures
    catalog_cp['on_edge'] = identify_edge_structures(d)

    near_distance_table = make_reid_distance_column(catalog, nearfar='near')
    far_distance_table = make_reid_distance_column(catalog, nearfar='far')

    near_distance_column = near_distance_table['D_k']
    far_distance_column = far_distance_table['D_k']

    # DISTANCE assignment
    catalog_cp['near_distance'] = near_distance_column
    catalog_cp['far_distance'] = far_distance_column

    # where there's no degeneracy, go ahead and apply the thing
    no_degeneracy = catalog_cp['near_distance'] == catalog_cp['far_distance']
    distance_column = np.zeros_like(near_distance_column) * np.nan
    distance_column[no_degeneracy] = catalog_cp['near_distance'][no_degeneracy]

    catalog_cp['distance'] = distance_column

    # assignment of physical properties to unambigously-distanced structures
    assign_properties(catalog_cp)

    # note disparate distances
    # catalog_cp['disparate'] = detect_disparate_distances(d, catalog_cp)

    return catalog_cp
def first_quad_cloud_catalog():
    """
    This generates a 'processed' dendrogram catalog, made
    from the global, pre-loaded `catalog` from the first quadrant.

    It identifies edge structures, computes tree statistics,
    determines the near & far distances (but does not resolve them),
    assigns a distance when there is no KDA, and then assigns physical
    properties to the unambiguously-distanced structures.

    Its output is meant to be the input to `get_positive_velocity_clouds()`,
    `get_perseus_arm_low_velocity_clouds()`, and
    `get_negative_velocity_clouds()`.

    """

    catalog_cp = catalog.copy(copy_data=True)

    # assignment of tree statistic properties
    compute_tree_stats(catalog_cp, d)

    # note edge structures
    catalog_cp['on_edge'] = identify_edge_structures(d)

    near_distance_table = make_reid_distance_column(catalog, nearfar='near')
    far_distance_table = make_reid_distance_column(catalog, nearfar='far')

    near_distance_column = near_distance_table['D_k']
    far_distance_column = far_distance_table['D_k']

    # DISTANCE assignment
    catalog_cp['near_distance'] = near_distance_column
    catalog_cp['far_distance'] = far_distance_column

    # where there's no degeneracy, go ahead and apply the thing
    no_degeneracy = catalog_cp['near_distance'] == catalog_cp['far_distance']
    distance_column = np.zeros_like(near_distance_column) * np.nan
    distance_column[no_degeneracy] = catalog_cp['near_distance'][no_degeneracy]

    catalog_cp['distance'] = distance_column

    # assignment of physical properties to unambigously-distanced structures
    assign_properties(catalog_cp)

    # note disparate distances
    # catalog_cp['disparate'] = detect_disparate_distances(d, catalog_cp)

    return catalog_cp
def carina_cloud_catalog():
    """
    This generates a 'processed' dendrogram catalog, made
    from the global, pre-loaded `catalog` from the Carina survey.

    It identifies edge structures, computes tree statistics,
    determines the near & far distances (but does not resolve them),
    assigns a distance when there is no KDA, and then assigns physical
    properties to the unambiguously-distanced structures.

    Its output is meant to be the input to `get_positive_velocity_clouds()`,
    and `get_negative_velocity_clouds()`.

    """

    catalog_cp = catalog.copy(copy_data=True)

    # assignment of tree statistic properties
    compute_tree_stats(catalog_cp, d)

    # note edge structures
    catalog_cp['on_edge'] = identify_edge_structures(d)

    near_distance_table = make_universal_distance_column(catalog,
                                                         nearfar='near')
    far_distance_table = make_universal_distance_column(catalog, nearfar='far')

    # DISTANCE assignment
    distance_assigner_with_plusminus_errors(
        catalog_cp, near_distance_table, distance_column_name='near_distance')
    distance_assigner_with_plusminus_errors(
        catalog_cp, far_distance_table, distance_column_name='far_distance')

    # where there's no degeneracy, go ahead and apply the thing
    no_degeneracy = catalog_cp['near_distance'] == catalog_cp['far_distance']
    distance_column = np.zeros_like(near_distance_table['D_k']) * np.nan
    error_distance_column_plus = np.zeros_like(
        near_distance_table['D_k']) * np.nan
    error_distance_column_minus = np.zeros_like(
        near_distance_table['D_k']) * np.nan
    KDA_resolution_column = np.array(['-'] * len(distance_column))

    distance_column[no_degeneracy] = catalog_cp['near_distance'][no_degeneracy]
    error_distance_column_plus[no_degeneracy] = catalog_cp[
        'error_near_distance_plus'][no_degeneracy]
    error_distance_column_minus[no_degeneracy] = catalog_cp[
        'error_near_distance_minus'][no_degeneracy]
    KDA_resolution_column[no_degeneracy] = 'U'

    assign_distance_columns(catalog_cp, distance_column, KDA_resolution_column,
                            np.zeros_like(distance_column),
                            np.zeros_like(distance_column),
                            error_distance_column_plus,
                            error_distance_column_minus)

    # assignment of physical properties to unambigously-distanced structures
    # let's think critically about whether this step is needed.
    assign_properties(catalog_cp)

    near_catalog = catalog_cp.copy(copy_data=True)
    far_catalog = catalog_cp.copy(copy_data=True)

    near_catalog['distance'] = catalog_cp['near_distance']
    far_catalog['distance'] = catalog_cp['far_distance']
    assign_properties(near_catalog)
    assign_properties(far_catalog)

    catalog_cp['near_size'] = near_catalog['size']
    catalog_cp['far_size'] = far_catalog['size']

    catalog_cp['near_z_gal'] = near_catalog['z_gal']
    catalog_cp['far_z_gal'] = far_catalog['z_gal']

    catalog_cp['near_mass'] = near_catalog['mass']
    catalog_cp['far_mass'] = far_catalog['mass']

    return catalog_cp
def carina_cloud_catalog():
    """
    This generates a 'processed' dendrogram catalog, made
    from the global, pre-loaded `catalog` from the Carina survey.

    It identifies edge structures, computes tree statistics,
    determines the near & far distances (but does not resolve them),
    assigns a distance when there is no KDA, and then assigns physical
    properties to the unambiguously-distanced structures.

    Its output is meant to be the input to `get_positive_velocity_clouds()`,
    and `get_negative_velocity_clouds()`.

    """

    catalog_cp = catalog.copy(copy_data=True)

    # assignment of tree statistic properties
    compute_tree_stats(catalog_cp, d)

    # note edge structures
    catalog_cp['on_edge'] = identify_edge_structures(d)

    near_distance_table = make_universal_distance_column(catalog, nearfar='near')
    far_distance_table = make_universal_distance_column(catalog, nearfar='far')

    # DISTANCE assignment
    distance_assigner_with_plusminus_errors(catalog_cp, near_distance_table, distance_column_name='near_distance')
    distance_assigner_with_plusminus_errors(catalog_cp, far_distance_table, distance_column_name='far_distance')

    # where there's no degeneracy, go ahead and apply the thing
    no_degeneracy = catalog_cp['near_distance'] == catalog_cp['far_distance']
    distance_column = np.zeros_like(near_distance_table['D_k']) * np.nan
    error_distance_column_plus = np.zeros_like(near_distance_table['D_k']) * np.nan
    error_distance_column_minus = np.zeros_like(near_distance_table['D_k']) * np.nan
    KDA_resolution_column = np.array(['-']*len(distance_column))

    distance_column[no_degeneracy] = catalog_cp['near_distance'][no_degeneracy]
    error_distance_column_plus[no_degeneracy] = catalog_cp['error_near_distance_plus'][no_degeneracy]
    error_distance_column_minus[no_degeneracy] = catalog_cp['error_near_distance_minus'][no_degeneracy]
    KDA_resolution_column[no_degeneracy] = 'U'

    assign_distance_columns(catalog_cp, distance_column, KDA_resolution_column, 
                            np.zeros_like(distance_column), np.zeros_like(distance_column),
                            error_distance_column_plus, error_distance_column_minus)

    # assignment of physical properties to unambigously-distanced structures
    # let's think critically about whether this step is needed.
    assign_properties(catalog_cp)

    near_catalog = catalog_cp.copy(copy_data=True)
    far_catalog = catalog_cp.copy(copy_data=True)

    near_catalog['distance'] = catalog_cp['near_distance']
    far_catalog['distance'] = catalog_cp['far_distance']
    assign_properties(near_catalog)
    assign_properties(far_catalog)

    catalog_cp['near_size'] = near_catalog['size']
    catalog_cp['far_size'] = far_catalog['size']

    catalog_cp['near_z_gal'] = near_catalog['z_gal']
    catalog_cp['far_z_gal'] = far_catalog['z_gal']

    catalog_cp['near_mass'] = near_catalog['mass']
    catalog_cp['far_mass'] = far_catalog['mass']

    return catalog_cp