sorcha.modules.PPOutput

Functions

PPOutWriteCSV(padain, outf[, separator])

Writes a pandas dataframe out to a CSV file at a location given by the user.

PPOutWriteHDF5(pp_results, outf[, keyname])

Writes a pandas dataframe out to a HDF5 file at a location given by the user.

PPOutWriteSqlite3(pp_results, outf[, tablename])

Writes a pandas dataframe out to a CSV file at a location given by the user.

PPIndexSQLDatabase(outf[, tablename])

Indexes a SQLite database of Sorcha output.

PPWriteOutput(cmd_args, sconfigs, observations_in[, ...])

Writes the output in the format specified in the config file to a location

Module Contents

PPOutWriteCSV(padain, outf, separator=',')[source]

Writes a pandas dataframe out to a CSV file at a location given by the user.

Parameters:
  • padain (pandas dataframe) -- Dataframe of output.

  • outf (string) -- Location to which file should be written.

  • separator (string of length 1, default=",") -- String of CSV separator.

Return type:

None.

PPOutWriteHDF5(pp_results, outf, keyname='sorcha_results')[source]

Writes a pandas dataframe out to a HDF5 file at a location given by the user.

Parameters:
  • padain (pandas dataframe) -- Dataframe of output.

  • outf (string) -- Location to which file should be written.

  • keyname (string, default="sorcha_results") -- Key at which data will be located.

Return type:

None.

PPOutWriteSqlite3(pp_results, outf, tablename='sorcha_results')[source]

Writes a pandas dataframe out to a CSV file at a location given by the user.

Parameters:
  • pp_results (pandas dataframe) -- Dataframe of output.

  • outf (string) -- Location to which file should be written.

  • tablename (string, default="sorcha_results") -- String of the table within the database to be indexed.

Return type:

None.

PPIndexSQLDatabase(outf, tablename='sorcha_results')[source]

Indexes a SQLite database of Sorcha output.

Parameters:
  • outf (string) -- Location of SQLite database to be indexed.

  • tablename (string, default="sorcha_results") -- String of the table within the database to be indexed.

Return type:

None.

PPWriteOutput(cmd_args, sconfigs, observations_in, verbose=False)[source]

Writes the output in the format specified in the config file to a location specified by the user.

Parameters:
  • cmd_args (dictionary) -- Dictonary of command line arguments.

  • sconfigs (dataclass) -- Dataclass of configuration file arguments.

  • observations_in (Pandas dataframe) -- Dataframe of output.

  • verbose (boolean, default=False) -- Verbose logging mode on or off.

Return type:

None.