sorcha.utilities.createResultsSQLDatabase

Functions

create_results_table(cnx_out, filename, output_path, ...)

Creates a table in a SQLite database from SSPP results.

create_inputs_table(cnx_out, input_path, table_type)

Creates a table in a SQLite database from the input files (i.e. orbits,

create_results_database(args)

Creates a SQLite database with tables of SSPP results and all orbit/physical

get_column_names(filename[, table_name])

Obtains column names from a table in a SQLite database.

Module Contents

create_results_table(cnx_out, filename, output_path, output_stem, table_name='sorcha_results')[source]

Creates a table in a SQLite database from SSPP results.

Parameters:
  • cnx_out (sqlite3 connection) -- Connection to sqlite3 database.

  • filename (string) -- filepath/name of sqlite3 database.

  • output_path (string) -- filepath of directory containing SSPP output folders.

  • output_stem (string) -- stem filename for SSPP outputs.

  • table_name (string, default="sorcha_results") -- name of table of for storing sorcha results. Default ="sorcha_results"

Return type:

None

create_inputs_table(cnx_out, input_path, table_type)[source]

Creates a table in a SQLite database from the input files (i.e. orbits, physical parameters, etc).

Parameters:
  • cnx_out (sqlite3 connection) -- Connection to sqlite3 database.

  • input_path (string) -- Filepath of directory containing input files.

  • table_type (string) -- Type of file. Should be "orbits"/"params"/"complex".

Return type:

None

create_results_database(args)[source]

Creates a SQLite database with tables of SSPP results and all orbit/physical parameters/comet files.

Parameters:

args (ArgumentParser) -- argparse ArgumentParser object; command line arguments.

Return type:

None

get_column_names(filename, table_name='sorcha_results')[source]

Obtains column names from a table in a SQLite database.

Parameters:
  • filename (string) -- Filepath/name of sqlite3 database.

  • table_name (string, optional) -- Name of table. Default = "sorcha_results"

Returns:

col_names (list)

Return type:

list of column names.