Package: rubin-sim
rubin_simScheduler, survey strategy analysis, and other simulation tools for Rubin Observatory.InstallationConda InstallationIf you are only runningrubin_simcode and not making changes. If you will be editing the code or need the very latest verison, use the pip instructions below.conda create -n rubin-sim -c conda-forge rubin_sim  ## Create a new environment and install rubin_sim
conda activate rubin-sim
rs_download_data  ## Downloads a few of data to $RUBIN_SIM_DATA_DIR (~/rubin_sim_data if unset)
conda install -c conda-forge jupyter  ## Optional install of jupyterNote that this is not the best option for developers working on their own metrics - a pip installation from their own fork of the repo may work better.Pip installationpip install rubin-simPlease note that the pip installation of pyoorb does not come with the necessary data files.
To actually use pyoorb, the data files are most easily installable via conda withconda install -c conda-forge openorb-data
conda install -c conda-forge openorb-data-de405The pip installation ofrubin_simwill install the pip version ofpyoorbwhich is
more up-to-date compared to the conda-forge version ofopenorb. For the purposes ofrubin_sim, the functionality is essentially the same however.Developer InstallationTo installrubin_simfrom source using pip, with all dependencies (including jupyter):git clone https://github.com/lsst/rubin_sim.git ; cd rubin_sim  ## clone and cd into repo
conda create -n rubin-sim --file=all_req.txt   ## optional (but recommended) new conda env
conda activate rubin-sim   ## substitute mamba for conda if you like
pip install -e . --no-deps
rs_download_data  ## Downloads a few GB of data to $RUBIN_SIM_DATA_DIR (~/rubin_sim_data if unset)Note that external collaborators will likely want to follow similar directions, using a fork of our rubin_sim github repo first (and then clone from there).Data download for rubin_simOptional: Set $RUBIN_SIM_DATA_DIR data directory.By default,rubin_simwill download needed data files to$HOME/rubin_sim_data. If you would like the data to save elsewhere, you should set theRUBIN_SIM_DATA_DIRenvironment variable. In bashexport RUBIN_SIM_DATA_DIR="/my/preferred/data/path"(note, always make sure this is set before trying to runrubin_simpackages, so put in your .bashrc or whatnot). Another possibility is to set the location via sym-link,ln -s /my/preferred/data/path ~/rubin_sim_data.export RUBIN_SIM_DATA_DIR=$HOME/rubin_sim_data  ## Optional. Set the data directory path via env variable
rs_download_data  ## Downloads a few GB of data to $RUBIN_SIM_DATA_DIRIf you are only interested in a subset of the data, you can specify which directories to download, e.g.rs_download_data  --dirs "throughputs,skybrightness,tests,maps"If you have a previous installation of rubin_sim or wish to update your data download, the flag--forcewill force an update of the data in the relevant $RUBIN_SIM_DATA_DIR directories.Example notebooksto test and further explore rubin_sim, are available atrubin_sim_notebooks.git clone https://github.com/lsst/rubin_sim_notebooks.git
cd rubin_sim_notebooks
# Example: make a plot of the number of visits per pointing
jupyter notebook maf/tutorial/Survey_footprint.ipynbDownloading additional skybrightness_pre skybrightness filesThe default skybrightness_pre directory downloaded above contains only one month of pre-calculated skybrightness files.
If you wish to run the scheduler for a longer time period, or need this information outside of the span of that month period,
you will need to download a larger set of pre-computed sky data.To download the entire optional set all the (43 Gb) of pre-computed sky data.rs_download_skyNote that subsets of this data can get downloaded via http directly fromhttps://s3df.slac.stanford.edu/data/rubin/sim-data/sims_skybrightness_pre/h5_2023_09_12/(the file names reflect the range of MJD covered within each data file).DocumentationOnline documentation is available athttps://rubin-sim.lsst.ioExample jupyter notebooks can be found at:https://github.com/lsst/rubin_sim_notebooksTo create a local build of the documentation:conda install -c conda-forge lsst-documenteer-pipelines
cd doc
make htmlGetting HelpQuestions aboutrubin_simcan be posted on thesims slack channel, or onhttps://community.lsst.org/(tag @yoachim and/or @ljones so we get notifications about it).