Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSIM-1093: feature. Migration from rubin_sim. #5

Merged
merged 24 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
shell: bash -l {0}
run: |
export RUBIN_SIM_DATA_DIR=${{ github.workspace }}/data_dir
scheduler_download_data --tdqm_disable -d 'site_models,skybrightness_pre,scheduler'
scheduler_download_data --tdqm_disable -d 'site_models,skybrightness_pre,scheduler,utils'
scheduler_download_data --tdqm_disable -d tests --force
- name: conda list
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/run_tests_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ jobs:
shell: bash -l {0}
run: |
export RUBIN_SIM_DATA_DIR=${{ github.workspace }}/data_dir
scheduler_download_data --tdqm_disable -d 'site_models,scheduler,skybrightness_pre'
scheduler_download_data --tdqm_disable -d tests --force
scheduler_download_data --tdqm_disable -d 'site_models,scheduler,skybrightness_pre,utils'
- name: conda list
shell: bash -l {0}
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[![DOI](https://zenodo.org/badge/712606243.svg)](https://zenodo.org/doi/10.5281/zenodo.10076770)


# rubin_scheduler

Feature Based Scheduler for Vera C. Rubin Observatory's Legacy Survey of Space and Time (LSST).

This repository contains the scheduling algorithms for the LSST, as implemented in the Feature Based Scheduler (FBS). More documentation on the FBS is available at https://rubin-scheduler.lsst.io and in jupyter notebooks available in our [tutorials repository](https://github.com/lsst/rubin_sim_notebooks/tree/main/scheduler).
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ dependencies = [
"matplotlib",
"healpy",
"numexpr",
"palpy",
"scipy",
"astropy",
"tables",
"h5py",
"astroplan",
"requests",
"shapely",
"tqdm",
]

Expand Down
10 changes: 1 addition & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,10 @@ matplotlib
healpy
pandas
numexpr
palpy
scipy
sqlalchemy
astropy
pytables
h5py
openorb
openorb-data-de405
astroplan
colorcet
cycler
george
scikit-learn
requests
shapely
tqdm
1 change: 1 addition & 0 deletions rubin_scheduler/data/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .data_sets import * # noqa: F403
from .scheduler_download_data import *
12 changes: 7 additions & 5 deletions rubin_scheduler/data/scheduler_download_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ("data_dict", "scheduler_download_data")
__all__ = ("data_dict", "scheduler_download_data", "download_rubin_data", "DEFAULT_DATA_URL")

import argparse
import os
Expand Down Expand Up @@ -32,6 +32,7 @@ def data_dict():
"scheduler": "scheduler_2023_10_16.tgz",
"site_models": "site_models_2023_10_02.tgz",
"skybrightness_pre": "skybrightness_pre_2023_10_17.tgz",
"utils": "utils_2023_11_02.tgz",
}
return file_dict

Expand Down Expand Up @@ -118,10 +119,6 @@ def download_rubin_data(
data_dir = get_data_dir()
if not os.path.isdir(data_dir):
os.mkdir(data_dir)
version_file = os.path.join(data_dir, "versions.txt")
versions = data_versions()
if versions is None:
versions = {}

if versions:
print("Versions on disk currently // versions expected for this release:")
Expand All @@ -137,6 +134,11 @@ def download_rubin_data(
print("Versions do not match")
return 1

version_file = os.path.join(data_dir, "versions.txt")
versions = data_versions()
if versions is None:
versions = {}

# See if base URL is alive
url_base = url_base
yoachim marked this conversation as resolved.
Show resolved Hide resolved
try:
Expand Down
1 change: 1 addition & 0 deletions rubin_scheduler/scheduler/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .sim_runner import *
4 changes: 4 additions & 0 deletions rubin_scheduler/scheduler/basis_functions/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .basis_functions import *
from .feasibility_funcs import *
from .mask_basis_funcs import *
from .rolling_funcs import *
Loading
Loading