TrackingDb¶
- class rubin_sim.maf.db.TrackingDb(database=None, trackingDbverbose=False)¶
Bases:
object
Sqlite database to track MAF output runs and their locations, for show_maf
Methods Summary
add_run
([run_group, run_name, run_comment, ...])Add a run to the tracking database.
close
()delRun
(runId)Remove a run from the tracking database.
Methods Documentation
- add_run(run_group=None, run_name=None, run_comment=None, run_version=None, run_date=None, maf_comment=None, maf_version=None, maf_date=None, maf_dir=None, db_file=None, maf_run_id=None)¶
Add a run to the tracking database.
- Parameters:
- run_groupstr, optional
Set a name to group this run with (eg. “Tier 1, 2016”).
- run_namestr, optional
Set a name for the opsim run.
- run_commentstr, optional
Set a comment describing the opsim run.
- run_versionstr, optional
Set the version of opsim.
- run_datestr, optional
Set the date the opsim run was created.
- maf_commentstr, optional
Set a comment to describe the MAF analysis.
- maf_versionstr, optional
Set the version of MAF used for analysis.
- maf_datestr, optional
Set the date the MAF analysis was run.
- maf_dirstr, optional
The relative path to the MAF directory.
- db_filestr, optional
The relative path to the Opsim SQLite database file.
- maf_run_idint, optional
The maf_run_id to assign to this record in the database (note this is a primary key!). If this run (ie the maf_dir) exists in the database already, this will be ignored.
- Returns:
- int
The maf_run_id stored in the database.
- close()¶
- delRun(runId)¶
Remove a run from the tracking database.