updatedb module

updatedb.create_info_table(con, infotbl, fmt_postel, fmt_corr, fmt_31hr, fmt_79hr, logger=None, T=None)[source]

Thiis function creates the info table that contains the paths to the processed images.

Parameters:
consqlite3.Connection

The SQLite3 database connection.

infotblstr

The name of the info table.

fmt_postelstr

Path format for Postel images.

fmt_corrstr

Path format for corrected images.

fmt_31hrstr

Path format for 31-hour images.

fmt_79hrstr

Path format for 79-hour images.

loggerOptional[logging.RootLogger], optional

The logger for logging messages (default is None).

Tdatetime, optional

List of datetime, used to estimate walltime (default is None).

Returns:
None
updatedb.create_main_table(con, maintbl, dstart, dstop, fmt_postel, fmt_corr, fmt_31hr, fmt_79hr, logger=None, T=None)[source]

This function creates the main table that contains the list of timestamps and processing status, while the corresponding hmi.m_720s columns are filled with None.

Parameters:
consqlite3.connect

Database connection object.

maintblstr

Name of the main table.

dstartdatetime

Start datetime.

dstopdatetime

Stop datetime.

fmt_postelstr

Image path format for POSTEL images.

fmt_corrstr

Image path format for corrected images.

fmt_31hrstr

Image path format for 31-hour images.

fmt_79hrstr

Image path format for 79-hour images.

loggerlogging.RootLogger

Logger instance.

Tlist of datetime

List of timestamps used to estimate walltime.

updatedb.insert_new_rows_for_hmi_records(con, maintbl, dat1, dat2, logger=None, T=None)[source]

Retrieve new hmi records for the time period from dat1 to dat2 (inclusive) and insert them into maintbl.

Parameters:
consqlite3.connect

Database connection object.

maintblstr

Name of the main table.

dat1datetime

Start datetime for the time range.

dat2datetime

End datetime for the time range (inclusive).

loggerlogging.RootLogger

Logger instance.

Tlist of datetime

List of datetimes used to estimate the walltime.

updatedb.update_hmi_columns(con, maintbl, timestamp1=None, timestamp2=None, logger=None, T=None)[source]

Update the hmi.m_720s records for existing rows between timestamp1 and timestamp2 in the main table. This routine does not insert new rows.

Parameters:
consqlite3.connect

Database connection object.

maintblstr

Name of the main table.

timestamp1str

Start timestamp in format of ‘%Y-%m-%d %H:%M:%S’. If None, all rows will be updated.

timestamp2str

End timestamp in format of ‘%Y-%m-%d %H:%M:%S’. If None, all rows will be updated.

loggerlogging.RootLogger

Logger instance.

Tlist of datetime

List of datetimes used to estimate the walltime.