Data API

rubin_scheduler.data.data_dict()[source]

Creates a dict for all data buckets and the tar file they map to. To create tar files and follow any sym links, run: tar -chvzf maf_may_2021.tgz maf

Returns:

result – Data bucket filenames dictionary with keys/values: “name” - Data bucket name (str). “version” - Versioned file name (str).

Return type:

dict

rubin_scheduler.data.data_versions()[source]

Get the dictionary of source filenames in the rubin_sim data directory.

Returns:

result – Data directory filenames dictionary with keys/values: “name” - Data bucket name (str). “version” - Versioned file name (str).

Return type:

dict

rubin_scheduler.data.download_rubin_data(file_dict, dirs=None, print_versions_only=False, update=False, force=False, url_base='https://s3df.slac.stanford.edu/data/rubin/sim-data/rubin_sim_data/', tdqm_disable=False)[source]

Download external data blobs

Parameters:
  • file_dict (dict) – A dict with keys of directory names and values of remote filenames.

  • dirs (list [str]) – List of directories to download. Default (None) assumes they are in file_dict

  • versions (bool) – If True, print the versions currently on disk. Default False.

  • update (bool) – If True, update versions on disk to match expected ‘current’. Default False.

  • force (bool) – If True, replace versions on disk with new download. Default False.

  • url_base (str) – The URL to use, default to DEFAULT_DATA_URL

  • tdqm_disable (bool) – If True, disable the tdqm progress bar. Default False.

rubin_scheduler.data.get_data_dir()[source]

Get the location of the rubin_sim data directory.

Returns:

data_dir – Path to the rubin_sim data directory.

Return type:

str

rubin_scheduler.data.scheduler_download_data(file_dict=None)[source]

Download data.