added flatten_selected_channels.py