-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from lsst-ts/tickets/DM-47558
DM-47558: Prepare scheduler configuration for pointing model data collection
- Loading branch information
Showing
11 changed files
with
723 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
python/lsst/ts/fbs/utils/data/pointing-tiles-block-324.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Name Alt Az | ||
BLOCK-324_001 45.14 -162.81 | ||
BLOCK-324_002 61.08 -160.35 | ||
BLOCK-324_003 74.54 -149.90 | ||
BLOCK-324_004 45.38 -141.73 | ||
BLOCK-324_005 61.22 -125.84 | ||
BLOCK-324_006 45.47 -122.61 | ||
BLOCK-324_007 45.57 -103.32 | ||
BLOCK-324_008 58.20 -98.91 | ||
BLOCK-324_009 70.98 -94.50 | ||
BLOCK-324_010 45.62 -82.92 | ||
BLOCK-324_011 64.90 -62.15 | ||
BLOCK-324_012 45.48 -60.03 | ||
BLOCK-324_013 57.76 -36.59 | ||
BLOCK-324_014 45.25 -28.70 | ||
BLOCK-324_015 48.52 -14.78 | ||
BLOCK-324_016 49.62 0.48 | ||
BLOCK-324_017 62.95 0.71 | ||
BLOCK-324_018 76.28 1.33 | ||
BLOCK-324_019 48.37 15.69 | ||
BLOCK-324_020 44.97 29.49 | ||
BLOCK-324_021 57.41 37.60 | ||
BLOCK-324_022 44.98 60.59 | ||
BLOCK-324_023 64.38 62.99 | ||
BLOCK-324_024 45.04 83.27 | ||
BLOCK-324_025 70.40 94.64 | ||
BLOCK-324_026 57.62 99.05 | ||
BLOCK-324_027 45.01 103.47 | ||
BLOCK-324_028 44.98 122.57 | ||
BLOCK-324_029 60.75 125.51 | ||
BLOCK-324_030 45.02 141.55 | ||
BLOCK-324_031 74.25 148.39 | ||
BLOCK-324_032 60.88 159.64 | ||
BLOCK-324_033 44.97 162.53 | ||
BLOCK-324_034 50.38 179.79 |
35 changes: 35 additions & 0 deletions
35
python/lsst/ts/fbs/utils/data/pointing-tiles-block-328.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Name Alt Az | ||
BLOCK-328_001 45.13 -162.87 | ||
BLOCK-328_002 61.07 -160.44 | ||
BLOCK-328_003 74.56 -150.11 | ||
BLOCK-328_004 45.38 -141.80 | ||
BLOCK-328_005 61.30 -125.97 | ||
BLOCK-328_006 45.61 -122.67 | ||
BLOCK-328_007 45.59 -103.39 | ||
BLOCK-328_008 58.22 -98.99 | ||
BLOCK-328_009 70.99 -94.59 | ||
BLOCK-328_010 45.64 -82.98 | ||
BLOCK-328_011 64.92 -62.20 | ||
BLOCK-328_012 45.64 -59.90 | ||
BLOCK-328_013 57.83 -36.48 | ||
BLOCK-328_014 45.28 -28.73 | ||
BLOCK-328_015 48.54 -14.80 | ||
BLOCK-328_016 49.63 0.47 | ||
BLOCK-328_017 62.97 0.71 | ||
BLOCK-328_018 76.30 1.38 | ||
BLOCK-328_019 48.38 15.68 | ||
BLOCK-328_020 44.98 29.47 | ||
BLOCK-328_021 57.46 37.47 | ||
BLOCK-328_022 45.10 60.42 | ||
BLOCK-328_023 64.37 63.00 | ||
BLOCK-328_024 45.02 83.25 | ||
BLOCK-328_025 70.37 94.65 | ||
BLOCK-328_026 57.60 99.03 | ||
BLOCK-328_027 44.98 103.44 | ||
BLOCK-328_028 45.08 122.53 | ||
BLOCK-328_029 60.79 125.51 | ||
BLOCK-328_030 44.99 141.50 | ||
BLOCK-328_031 74.24 148.40 | ||
BLOCK-328_032 60.85 159.58 | ||
BLOCK-328_033 44.95 162.48 | ||
BLOCK-328_034 50.36 179.72 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
python/lsst/ts/fbs/utils/maintel/pointing_model/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 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 .pointing_model import * |
114 changes: 114 additions & 0 deletions
114
python/lsst/ts/fbs/utils/maintel/pointing_model/__main__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# 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/>. | ||
|
||
import argparse | ||
|
||
import numpy as np | ||
from astropy import units | ||
from astropy.coordinates import Angle | ||
|
||
from ... import get_data_dir | ||
from .pointing_model import AltAzLimits, make_pointing_grid_hadec | ||
|
||
|
||
def main() -> None: | ||
parser = argparse.ArgumentParser("make_pointing_model_grid") | ||
|
||
parser.add_argument( | ||
"--min_altitude", | ||
type=float, | ||
help="Minimum altitude, in degrees.", | ||
default=45.0, | ||
) | ||
parser.add_argument( | ||
"--max_altitude", | ||
type=float, | ||
help="Maximum altitude, in degrees.", | ||
default=80.0, | ||
) | ||
parser.add_argument( | ||
"--min_azimuth", | ||
type=float, | ||
help="Minimum azimuth, in degrees.", | ||
default=-180.0, | ||
) | ||
parser.add_argument( | ||
"--max_azimuth", | ||
type=float, | ||
help="Maximum azimuth, in degrees.", | ||
default=180, | ||
) | ||
parser.add_argument( | ||
"--dec_min", | ||
type=float, | ||
help="Minimum declination, in degrees.", | ||
default=-70, | ||
) | ||
parser.add_argument( | ||
"--dec_max", | ||
type=float, | ||
help="Maximum declination, in degrees.", | ||
default=10, | ||
) | ||
parser.add_argument( | ||
"--hour_angle_n_grid", | ||
type=int, | ||
nargs="+", | ||
help="A sequence of numbers that specify the number of poitings in RA for each declination.", | ||
default=[3, 4, 6, 8, 5, 5, 5], | ||
) | ||
parser.add_argument( | ||
"--block", | ||
type=str, | ||
help="Block name.", | ||
required=True, | ||
) | ||
|
||
args = parser.parse_args() | ||
|
||
altaz_limits = AltAzLimits( | ||
min_altitude=Angle(args.min_altitude, units.deg), | ||
max_altitude=Angle(args.max_altitude, units.deg), | ||
min_azimuth=Angle(args.min_azimuth, units.deg), | ||
max_azimuth=Angle(args.max_azimuth, units.deg), | ||
) | ||
|
||
altaz_grid = make_pointing_grid_hadec( | ||
altaz_limit=altaz_limits, | ||
dec_min=Angle(args.dec_min, units.deg), | ||
dec_max=Angle(args.dec_max, units.deg), | ||
hour_angle_n_grid=args.hour_angle_n_grid, | ||
) | ||
|
||
sort_data = np.argsort([az.value for (_, az) in altaz_grid]) | ||
filename = get_data_dir() / f"pointing-tiles-{args.block.lower()}.txt" | ||
|
||
print(f"Writing pointing grid data to {filename}.") | ||
|
||
with open(filename, "w") as fp: | ||
fp.write("Name Alt Az\n") | ||
for i, index in enumerate(sort_data): | ||
(alt, az) = altaz_grid[index] | ||
fp.write(f"{args.block}_{i+1:03d} {alt.deg:6.2f} {az.deg:7.2f}\n") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
Oops, something went wrong.