def simulation_type_from_spins(dimensionless_spin_1, dimensionless_spin_2):
    """Classify simulation as non-spinning, aligned-spins, or precessing

    Classifies a simulation with dimensionless_spin_1 on the primary
    (larger) black hole and dimensionless_spin_2 on the secondary black
    hole as nonspinning (if no spin component > 0.01), aligned-spin (if
    only z components are > 0.01), or precessing (otherwise).

    """
    spin_zero_threshold = 0.01
    nonspinning_type = 'non-spinning'
    aligned_type = 'aligned-spins'
    precessing_type = 'precessing'
    simulation_type = nonspinning_type
    if abs(dimensionless_spin_1[2]) > spin_zero_threshold or abs(
        dimensionless_spin_2[2]) > spin_zero_threshold:
        simulation_type = aligned_type
    if abs(dimensionless_spin_1[0]) > spin_zero_threshold or abs(
        dimensionless_spin_2[0]) > spin_zero_threshold or abs(
        dimensionless_spin_1[1]) > spin_zero_threshold or abs(
        dimensionless_spin_2[1]) > spin_zero_threshold:
        simulation_type = precessing_type
    return simulation_type
