sim_archive API

rubin_sim.sim_archive.add_make_scheduler_snapshot_args(parser)[source]

Add arguments needed for saving a scheduler to an argument parser.

Parameters:

parser (ArgumentParser)

Return type:

None

rubin_sim.sim_archive.get_scheduler(config_repo, config_script, config_branch='main')[source]

Generate a CoreScheduler according to a configuration in git.

Parameters:
  • config_repo (str) – The git repository with the configuration.

  • config_script (str) – The configuration script path (relative to the repository root).

  • config_branch (str, optional) – The branch of the repository to use, by default “main”

Returns:

scheduler – An instance of the Rubin Observatory FBS.

Return type:

CoreScheduler

Raises:

ValueError – If the config file is invalid, or has invalid content.

rubin_sim.sim_archive.get_scheduler_instance_from_repo(config_repo, config_script, config_branch='main')[source]

Generate a CoreScheduler according to a configuration in git.

Parameters:
  • config_repo (str) – The git repository with the configuration.

  • config_script (str) – The configuration script path (relative to the repository root).

  • config_branch (str, optional) – The branch of the repository to use, by default “main”

Returns:

scheduler – An instance of the Rubin Observatory FBS.

Return type:

CoreScheduler

Raises:

ValueError – If the config file is invalid, or has invalid content.

rubin_sim.sim_archive.save_scheduler(scheduler, file_name)[source]

Save an instances of the scheduler in a pickle file, compressed according to its extension.

Parameters:
  • scheduler (CoreScheduler) – The scheduler to save.

  • file_name (str) – The file in which to save the schedulers.

Return type:

None