added examples and formatting

This commit is contained in:
G gillian 2025-12-15 12:08:57 -05:00
parent eccbe9f187
commit 7868e2cf2a
2 changed files with 11 additions and 17 deletions

View File

@ -240,8 +240,6 @@ def determine_output_format(output, output_format, output_dir):
@click.command() @click.command()
@click.argument("inputs", nargs=-1, required=True, type=click.Path(exists=True))
@click.argument("output", nargs=1, required=True, type=click.Path())
@click.option( @click.option(
"--device", "--device",
"-d", "-d",

View File

@ -257,24 +257,20 @@ def transform():
Transform supports three categories of operations: Transform supports three categories of operations:
- augment: Modify signal to create new ML examples - augment: Modify signal to create new ML examples
- impair: Degrade signal with noise, distortion, etc. - impair: Degrade signal with noise, distortion, etc.
- apply_channel: Apply channel models (fading, Doppler, etc.)
Each operation is applied independently. Chain multiple transforms by Each operation is applied independently. Chain multiple transforms by
running this command multiple times. running this command multiple times.
Examples:\n
\b \b
Examples:
# List available augmentations # List available augmentations
ria_toolkit_oss transform augment --list utils transform augment --list
\b \b
# Apply channel swap # Apply channel swap
ria_toolkit_oss transform augment channel_swap input.npy utils transform augment channel_swap input.npy
\b \b
# Apply AWGN impairment # Apply AWGN impairment
ria_toolkit_oss transform impair awgn input.npy --snr-db 15 utils transform impair awgn input.npy --snr-db 15
\b
# Apply Rayleigh fading channel
ria_toolkit_oss transform apply_channel rayleigh input.npy --num-paths 5
""" """
pass pass
@ -300,19 +296,19 @@ def augment(augmentation, input, output, list_transforms, help_transform, params
# List all augmentations # List all augmentations
\b \b
ria_toolkit_oss transform augment --list ria transform augment --list
# Show parameters for an augmentation # Show parameters for an augmentation
\b \b
ria_toolkit_oss transform augment channel_swap --help-transform ria transform augment channel_swap --help-transform
# Apply augmentation # Apply augmentation
\b \b
ria_toolkit_oss transform augment channel_swap input.npy ria transform augment channel_swap input.npy
# Apply with parameters and save visualization # Apply with parameters and save visualization
\b \b
ria_toolkit_oss transform augment drop_samples input.npy --params max_section_size=5 --view ria transform augment drop_samples input.npy --params max_section_size=5 --view
""" """
available = get_available_transforms(iq_augmentations) available = get_available_transforms(iq_augmentations)