Exemple #1
0
_help = 'Calculate angular oscillation of a plane along the trajectory.'
_name = 'pangle'

ap = libcli.CustomParser(
    description=_BANNER + __doc__,
    formatter_class=argparse.RawDescriptionHelpFormatter,
)

libcli.add_version_arg(ap)
libcli.add_topology_arg(ap)
libcli.add_trajectories_arg(ap)
libcli.add_plane_selection_arg(ap)
libcli.add_angle_unit_arg(ap)
libcli.add_reference_frame_arg(ap)
libcli.add_slice_arg(ap)
libcli.add_data_export_arg(ap)
libcli.add_plot_arg(ap)


def _ap():
    return ap


def main(topology,
         trajectories,
         plane_selection,
         aunit='degrees',
         ref_frame=0,
         start=None,
         stop=None,
         step=None,
def test_data_export_arg(cmd, expected):
    """Test data export arg."""
    parser = argparse.ArgumentParser()
    lc.add_data_export_arg(parser)
    v = vars(parser.parse_args(cmd.split()))
    assert v['export'] == expected