Skip to content

Commit

Permalink
Add unit tests for basis functions and detailers
Browse files Browse the repository at this point in the history
  • Loading branch information
bechtol committed Aug 28, 2024
1 parent 0693aa1 commit f0bad9f
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/maintel/test_maintel_basis_functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file is part of ts_fbs_utils.
#
# Developed for the Vera Rubin Observatory Telescope and Site System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

from lsst.ts.fbs.utils.maintel.basis_functions import get_basis_functions_field_survey


def test_get_basis_functions_field_survey() -> None:
basis_functions = get_basis_functions_field_survey(
nside=32,
wind_speed_maximum=13.0,
)

assert len(basis_functions) == 7
28 changes: 28 additions & 0 deletions tests/maintel/test_maintel_detailers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file is part of ts_fbs_utils.
#
# Developed for the Vera Rubin Observatory Telescope and Site System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

from lsst.ts.fbs.utils.maintel.detailers import get_detailers_field_survey


def test_get_detailers_field_survey() -> None:
detailers = get_detailers_field_survey()

assert len(detailers) == 2

0 comments on commit f0bad9f

Please sign in to comment.