autowisp.database.user_interface module
Class Inheritance Diagram

Define interface to the pipeline database.
- autowisp.database.user_interface._get_config_info(version, step='All')[source]
Return info for displaying the configuration with given version.
- autowisp.database.user_interface._get_db_conditions(db_session)[source]
Return dict of condition IDs containing sets of expression IDs.
- autowisp.database.user_interface._parse_json_config(json_config)[source]
Organize the given JSON configuration to parameters and conditions.
- Parameters:
json_config – JSON configuration to be parsed. Formatted as a decision tree, where the path through the tree defines the combination of condition expressions that must be satisfied and the leaf at the end specifies the value for the parameter .
- Returns:
- parameter name: [
- {
‘expressions’: set(expression ID index in below list),
’value’: value of parameter if all expressions are satisfied
},
…
]
- [str]:
list of expression strings
- Return type:
- autowisp.database.user_interface._save_conditions(configuration, expression_db_ids, db_session)[source]
Create new conditions encounted in configuration and add their IDs.
- autowisp.database.user_interface._save_expressions(expressions, db_session)[source]
Save new expressions to database and update configuration with DB IDs.
- autowisp.database.user_interface.get_db_configuration(version, db_session, step_id=None, max_version_only=False)[source]
Return list of Configuration instances given version.
- autowisp.database.user_interface.get_json_config(version=0, step='All', **dump_kwargs)[source]
Return the configuration as a JSON object.
- autowisp.database.user_interface.get_processing_sequence(db_session)[source]
Return the sequence of steps in the pipeline.
For image processing this will be a sequence of step/image type pairs, and for lightcurves it will just be a sequence of steps.
- autowisp.database.user_interface.get_progress(step, *args, **kwargs)[source]
Return info about completed work ona given step.
- autowisp.database.user_interface.get_progress_images(step_id, image_type_id, config_version, db_session)[source]
Return number of images in final state and by status for given step/imtype.
- Parameters:
step – Step instance for which to return the progress.
image_type – ImageType instance for which to return the progress.
config_version – Version of the configuration for which to report progress.
db_session – Database session to use.
- Returns:
- Information on the images in final state. The
entries are channel name, example status (>0 indicates success <0 indicates falure), number of images of that channel that have that status sign and are flagged final.
- [str, int]: Information about the images not in final state. The
entries are channel name, number of non-final images of that channel.
- [str, int, int]: The pending images broken by status. The format is
the same as the final state information, except for images not flagged as in final state for the given step.
- Return type:
- autowisp.database.user_interface.get_progress_lightcurves(step_id, image_type_id, config_version, db_session)[source]
Same as get_progress_images() but for lightcurve steps.