reda.main package

Submodules

reda.main.logger module

Set up some logging facilities for reda

We differentiate multiple logging types/targets

  1. general logging (using the python logging module)

  2. a data processing log (which also uses the logging module), available via the container-inherent .logger object

class reda.main.logger.ListHandler(log_list)[source]

Bases: Handler

Attributes:
name

Methods

acquire()

Acquire the I/O thread lock.

addFilter(filter)

Add the specified filter to this handler.

close()

Tidy up any resources used by the handler.

createLock()

Acquire a thread lock for serializing access to the underlying I/O.

emit(record)

Do whatever it takes to actually log the specified logging record.

filter(record)

Determine if a record is loggable by consulting all the filters.

flush()

Ensure all logging output has been flushed.

format(record)

Format the specified record.

handle(record)

Conditionally emit the specified logging record.

handleError(record)

Handle errors which occur during an emit() call.

release()

Release the I/O thread lock.

removeFilter(filter)

Remove the specified filter from this handler.

setFormatter(fmt)

Set the formatter for this handler.

setLevel(level)

Set the logging level of this handler.

get_name

set_name

emit(record)[source]

Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.

class reda.main.logger.LoggingClass[source]

Bases: object

Set up logging facilities for the containers

Methods

setup_logger([name])

Setup a logger

print_data_journal

print_log

print_data_journal()[source]
print_log()[source]
setup_logger(name=None)[source]

Setup a logger

Parameters:
namestr, optional

If set, use this as the name of the logger

reda.main.units module

columns in the containers are usually named in a simplified way to facilitate working with them. However, as soon as we want to export data, or plot data, meaningful and physically correct identifiers are required. This file defines the corresponding relations.

reda.main.units.get_label(key, log10=False)[source]

Convenience function: return the label (latex version) of a given key, if available. Otherwise, return the key itself.