Optimization

Optimization submodules of Bob.

Also contains the Updater abstract class.

class qosst_bob.optimization.Updater(args: Namespace, bob: Bob, config: Configuration)

An abstract class for updaters for optimization.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

  • args – arguments passed to the command line.

  • bob – Bob object to request changes to Alice.

  • config – configuration object to change the parameters on Bob side.

args: Namespace

The arguments of the command line.

bob: Bob

The class of Bob, to request parameter changes to Alice

config: Configuration

The configuration, to change the parameter on Bob side.

round: int

A counter to keep memory of the turn

abstract _init_parameters()

This function is called at the end of init and should initialize the parameters arrays.

abstract number_of_rounds() int

Return a number of rounds the script should do.

Returns:

number of rounds of the experiment.

Return type:

int

abstract update() Dict
This function should
  • update the parameter(s) on Bob side

  • request the parameter(s) to be changed to Alice

  • return a dict with the name of parameters as key and the new value as value

Returns:

dict with the name of parameters as key and the new value as value

Return type:

Dict

abstract name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str

Optimize

Script to optimize the excess noise over a DSP parameter.

qosst_bob.optimization.optimize.optimize(args: Namespace, config_path: str)

Launch Bob and start optimizing given a specific updater.

Save the results and plot depending on the arguments.

Parameters:
  • args (argparse.Namespace) – arguments int the command line.

  • config (Configuration) – configuration object.

Commands

Entrypoint for the optimization script

qosst_bob.optimization.commands._create_parser() ArgumentParser

Create the parser for the optimization module command.

Subcommands:
  • xi-vs-va

  • roll-off

  • pilots-amplitude

  • conversion-factor

  • baud-rate

  • subframe-size

  • frequency-cutoff-tone

  • frequency-shift

  • pilot-difference-tone

Returns:

parser for the optimization module command.

Return type:

argparse.ArgumentParser

qosst_bob.optimization.commands.main()

Main function of the script. Entrypoint of the script.

Updaters

Module containing all the updaters for the optimize script.

Average tone size

Updater to optimize the excess noise while varying the size of averaging for the tone.

class qosst_bob.optimization.updaters.average_tone_size.AverageToneSizeUpdater(args: Namespace, bob: Bob, config: Configuration)

Experiments to measure the excess noise variations as a function of the average tone size for the phase correctionat Bob side.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

_init_parameters()

Generate the array of sizes.

number_of_rounds() int

Return the number of rounds, which is the length of the array of sizes.

Returns:

number of rounds.

Return type:

int

update() Dict

Update the parameter by changing the phase filtering size at Bob side only.

Returns:

dict with the new value of the phase filtering size.

Return type:

Dict

name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str

Baud rate

Updater to optimize the excess noise while varying the baud rate.

class qosst_bob.optimization.updaters.baud_rate.BaudRateUpdater(args: Namespace, bob: Bob, config: Configuration)

Experiments to measure the excess noise variations as a function of the baud rate of the symbols.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

_init_parameters()

Generate the array of baud rates.

number_of_rounds() int

Return the number of rounds, which is the length of the array of baud rates.

Returns:

number of rounds.

Return type:

int

update() Dict

Update the parameter by changing the symbol rate at Alice and Bob sides.

Returns:

dict with the new value of the symbol rate.

Return type:

Dict

name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str

Conversion factor

Updater to optimize the excess noise while varying the roll-off.

class qosst_bob.optimization.updaters.conversion_factor.ConversionFactorUpdater(args: Namespace, bob: Bob, config: Configuration)

Experiments to measure the excess noise variations as a function of the variance of Alice’s modulation.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

_init_parameters()

Generate the array of conversion factors.

number_of_rounds() int

Return the number of rounds, which is the length of the array of conversion factors.

Returns:

number of rounds.

Return type:

int

update() Dict

Update the parameter by changing the conversion factor at Alice side only.

Returns:

dict with the new value of the conversion factor.

Return type:

Dict

name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str

Frequency cutoff tone

Updater to optimize the excess noise while varying the cutoff for the filter of the tone.

class qosst_bob.optimization.updaters.frequency_cutoff_tone.FrequencyCutoffToneUpdater(args: Namespace, bob: Bob, config: Configuration)

Experiments to measure the excess noise variations as a function of the cutoff for the filtering of the tone at Bob side.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

_init_parameters()

Generate the array of cut-offs.

number_of_rounds() int

Return the number of rounds, which is the length of the array of cutoffs.

Returns:

number of rounds.

Return type:

int

update() Dict

Update the parameter by changing the cutoff for the tone filtering at Bob side only.

Returns:

dict with the new value of the cutoff.

Return type:

Dict

name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str

Frequency shift

Updater to optimize the excess noise while varying the frequency shift.

class qosst_bob.optimization.updaters.frequency_shift.FrequencyShiftUpdater(args: Namespace, bob: Bob, config: Configuration)

Experiments to measure the excess noise variations as a function of the frequency shift of the symbols.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

_init_parameters()

Generate the array of frequency shifts.

number_of_rounds() int

Return the number of rounds, which is the length of the array of frequency shifts.

Returns:

number of rounds.

Return type:

int

update() Dict

Update the parameter by changing the frequency shift at Alice and Bob sides.

Returns:

dict with the new value of the frequench shift.

Return type:

Dict

name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str

Pilot difference

Updater to optimize the excess noise while varying the difference of pilot frequency.

class qosst_bob.optimization.updaters.pilot_difference.PilotDifferenceUpdater(args: Namespace, bob: Bob, config: Configuration)

Experiments to measure the excess noise variations as a function of the difference of frequency between the two pilots. The first pilot will be left untouched.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

_init_parameters()

Generate the array of differences.

number_of_rounds() int

Return the number of rounds, which is the length of the array of differences.

Returns:

number of rounds.

Return type:

int

update() Dict

Update the parameter by changing the frequencies of the pilot. The first frequency stays the same but the second one is updated with the new difference. It is done at Alice and Bob sides.

Returns:

dict with the new values of the frequencies of the pilots.

Return type:

Dict

name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str

Pilots amplitude

Updater to optimize the excess noise while varying the amplitude of the pilots.

class qosst_bob.optimization.updaters.pilots_amplitude.PilotsAmplitudeUpdater(args: Namespace, bob: Bob, config: Configuration)

Experiments to measure the excess noise variations as a function of the amplitude of pilots.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

_init_parameters()

Generate the array of amplitudes.

number_of_rounds() int

Return the number of rounds, which is the length of the array of amplitudes.

Returns:

number of rounds.

Return type:

int

update() Dict

Update the parameter by changing the amplitudes of pilots at Alice and Bob sides.

Returns:

dict with the new value of the amplitudes.

Return type:

Dict

name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str

Roll off

Updater to optimize the excess noise while varying the roll-off.

class qosst_bob.optimization.updaters.roll_off.RollOffUpdater(args: Namespace, bob: Bob, config: Configuration)

Experiments to measure the excess noise variations as a function of the variance of Alice’s modulation.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

_init_parameters()

Generate the array of roll-offs.

number_of_rounds() int

Return the number of rounds, which is the length of the array of roll-offs.

Returns:

number of rounds.

Return type:

int

update() Dict

Update the parameter by changing the roll-off factor at Alice and Bob sides.

Returns:

dict with the new value of the roll-off.

Return type:

Dict

name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str

Subframe size

Updater to optimize the excess noise while varying the size of subframes.

class qosst_bob.optimization.updaters.subframe_size.SubframeSizeUpdater(args: Namespace, bob: Bob, config: Configuration)

Experiments to measure the excess noise variations as a function of the subframe size at Bob side.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

_init_parameters()

Generate the array of subframe sizes.

number_of_rounds() int

Return the number of rounds, which is the length of the array of subframe sizes.

Returns:

number of rounds.

Return type:

int

update() Dict

Update the parameter by changing the subframe size at Bob side only.

Returns:

dict with the new value of the subframe size.

Return type:

Dict

name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str

Xi versus Va

Updater to optimize the excess noise while varying the variance.

class qosst_bob.optimization.updaters.xi_versus_va.XiVsVaUpdater(args: Namespace, bob: Bob, config: Configuration)

Experiments to measure the excess noise variations as a function of the variance of Alice’s modulation.

Parameters:
  • args (argparse.Namespace) – arguments passed to the command line.

  • bob (Bob) – Bob object to request changes to Alice.

  • config (Configuration) – configuration object to change the parameters on Bob side.

_init_parameters()

Generate the array of variances.

number_of_rounds() int

Return the number of rounds, which is the length of the array of variances.

Returns:

number of rounds.

Return type:

int

update() Dict

Update the parameter by changing Alice’s variance at Alice side only.

Returns:

dict with the new value of the variance.

Return type:

Dict

name() str

Name of the updater. To be used in the name of the saved file.

Returns:

name of the updater.

Return type:

str