wintertoo 1.1.0__tar.gz → 1.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wintertoo-1.1.0 → wintertoo-1.9.0}/.github/workflows/continuous_integration.yml +2 -2
- {wintertoo-1.1.0 → wintertoo-1.9.0}/PKG-INFO +9 -9
- {wintertoo-1.1.0 → wintertoo-1.9.0}/pyproject.toml +10 -8
- {wintertoo-1.1.0 → wintertoo-1.9.0}/tests/test_schedule.py +38 -9
- wintertoo-1.9.0/tests/testdata/test_schedule.json +1 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/data/__init__.py +13 -7
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/data/observing_request_schema.json +6 -4
- wintertoo-1.9.0/wintertoo/data/winter_fields.txt +41725 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/database.py +1 -1
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/models/__init__.py +8 -0
- wintertoo-1.9.0/wintertoo/models/image.py +145 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/models/program.py +3 -3
- wintertoo-1.9.0/wintertoo/models/too.py +321 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/schedule.py +26 -7
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/submit.py +37 -6
- wintertoo-1.9.0/wintertoo/utils.py +148 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/validate.py +3 -3
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo.egg-info/PKG-INFO +9 -9
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo.egg-info/requires.txt +5 -5
- wintertoo-1.1.0/tests/testdata/test_schedule.json +0 -1
- wintertoo-1.1.0/wintertoo/data/winter_fields.txt +0 -41167
- wintertoo-1.1.0/wintertoo/models/image.py +0 -84
- wintertoo-1.1.0/wintertoo/models/too.py +0 -171
- wintertoo-1.1.0/wintertoo/utils.py +0 -112
- {wintertoo-1.1.0 → wintertoo-1.9.0}/.github/dependabot.yml +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/.github/workflows/automerge.yml +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/.github/workflows/black.yml +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/.github/workflows/isort.yml +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/.github/workflows/pylint.yml +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/.gitignore +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/.pre-commit-config.yaml +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/LICENSE +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/README.md +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/setup.cfg +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/tests/test_fields.py +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/__init__.py +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/data/summer_fields.txt +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/errors.py +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo/fields.py +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo.egg-info/SOURCES.txt +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo.egg-info/dependency_links.txt +0 -0
- {wintertoo-1.1.0 → wintertoo-1.9.0}/wintertoo.egg-info/top_level.txt +0 -0
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
# Specify the python versions to test
|
|
23
23
|
strategy:
|
|
24
24
|
matrix:
|
|
25
|
-
python-version: ["3.
|
|
25
|
+
python-version: ["3.10", "3.11"]
|
|
26
26
|
|
|
27
27
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
28
28
|
steps:
|
|
@@ -71,7 +71,7 @@ jobs:
|
|
|
71
71
|
.
|
|
72
72
|
|
|
73
73
|
- name: Publish distribution 📦 to PyPI
|
|
74
|
-
if: ${{ startsWith(github.ref, 'refs/tags/') && success() && matrix.python-version == 3.
|
|
74
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') && success() && matrix.python-version == 3.11 && github.event_name == 'push'}}
|
|
75
75
|
uses: pypa/gh-action-pypi-publish@master
|
|
76
76
|
with:
|
|
77
77
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: wintertoo
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0
|
|
4
4
|
Author-email: Robert Stein <rdstein@caltech.edu>, Danielle Frostig <frostig@mit.edu>, Viraj Karambelkar <viraj@astro.caltech.edu>
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: homepage, https://github.com/winter-telescope/wintertoo
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
9
8
|
Classifier: Programming Language :: Python :: 3.10
|
|
10
9
|
Classifier: Programming Language :: Python :: 3.11
|
|
11
10
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -18,12 +17,12 @@ Classifier: Topic :: Scientific/Engineering :: Physics
|
|
|
18
17
|
Classifier: Operating System :: POSIX
|
|
19
18
|
Classifier: Operating System :: Unix
|
|
20
19
|
Classifier: Operating System :: MacOS
|
|
21
|
-
Requires-Python: >=3.
|
|
20
|
+
Requires-Python: >=3.10
|
|
22
21
|
Description-Content-Type: text/markdown
|
|
23
22
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist: pandas
|
|
25
|
-
Requires-Dist: astropy
|
|
26
|
-
Requires-Dist: astroplan
|
|
23
|
+
Requires-Dist: pandas<3.0.0
|
|
24
|
+
Requires-Dist: astropy>=6.0.0
|
|
25
|
+
Requires-Dist: astroplan>=0.10
|
|
27
26
|
Requires-Dist: matplotlib
|
|
28
27
|
Requires-Dist: numpy
|
|
29
28
|
Requires-Dist: pytz
|
|
@@ -35,10 +34,11 @@ Requires-Dist: bcrypt
|
|
|
35
34
|
Requires-Dist: psycopg
|
|
36
35
|
Requires-Dist: psycopg-binary
|
|
37
36
|
Provides-Extra: dev
|
|
38
|
-
Requires-Dist: black
|
|
39
|
-
Requires-Dist: isort>=
|
|
37
|
+
Requires-Dist: black==26.1.0; extra == "dev"
|
|
38
|
+
Requires-Dist: isort>=7.0.0; extra == "dev"
|
|
40
39
|
Requires-Dist: pylint>=3.0.0; extra == "dev"
|
|
41
40
|
Requires-Dist: coveralls; extra == "dev"
|
|
41
|
+
Dynamic: license-file
|
|
42
42
|
|
|
43
43
|
# wintertoo
|
|
44
44
|
[](https://badge.fury.io/py/wintertoo)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "wintertoo"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.9.0"
|
|
8
8
|
description = ""
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Robert Stein", email = "rdstein@caltech.edu"},
|
|
@@ -13,10 +13,9 @@ authors = [
|
|
|
13
13
|
]
|
|
14
14
|
license = {text = "MIT"}
|
|
15
15
|
readme = "README.md"
|
|
16
|
-
requires-python = ">=3.
|
|
16
|
+
requires-python = ">=3.10"
|
|
17
17
|
classifiers = [
|
|
18
18
|
"Programming Language :: Python :: 3",
|
|
19
|
-
'Programming Language :: Python :: 3.9',
|
|
20
19
|
'Programming Language :: Python :: 3.10',
|
|
21
20
|
'Programming Language :: Python :: 3.11',
|
|
22
21
|
'Intended Audience :: Science/Research',
|
|
@@ -31,9 +30,9 @@ classifiers = [
|
|
|
31
30
|
'Operating System :: MacOS',
|
|
32
31
|
]
|
|
33
32
|
dependencies = [
|
|
34
|
-
"pandas",
|
|
35
|
-
"astropy",
|
|
36
|
-
"astroplan",
|
|
33
|
+
"pandas<3.0.0",
|
|
34
|
+
"astropy>=6.0.0",
|
|
35
|
+
"astroplan>=0.10",
|
|
37
36
|
"matplotlib",
|
|
38
37
|
"numpy",
|
|
39
38
|
"pytz",
|
|
@@ -47,8 +46,8 @@ dependencies = [
|
|
|
47
46
|
]
|
|
48
47
|
[project.optional-dependencies]
|
|
49
48
|
dev = [
|
|
50
|
-
"black
|
|
51
|
-
"isort >=
|
|
49
|
+
"black == 26.1.0",
|
|
50
|
+
"isort >= 7.0.0",
|
|
52
51
|
"pylint >= 3.0.0",
|
|
53
52
|
"coveralls",
|
|
54
53
|
]
|
|
@@ -96,3 +95,6 @@ disable=["logging-fstring-interpolation"]
|
|
|
96
95
|
good-names=["ax", "ra", "df", "pi", "i"]
|
|
97
96
|
exclude-too-few-public-methods=["pydantic.*"]
|
|
98
97
|
extension-pkg-whitelist=["pydantic"]
|
|
98
|
+
|
|
99
|
+
[tool.pylint.typecheck]
|
|
100
|
+
generated-members=["u.*"]
|
|
@@ -9,7 +9,13 @@ from datetime import date
|
|
|
9
9
|
|
|
10
10
|
import pandas as pd
|
|
11
11
|
|
|
12
|
-
from wintertoo.models import
|
|
12
|
+
from wintertoo.models import (
|
|
13
|
+
Program,
|
|
14
|
+
SpringRaDecToO,
|
|
15
|
+
SummerFieldToO,
|
|
16
|
+
SummerRaDecToO,
|
|
17
|
+
WinterRaDecToO,
|
|
18
|
+
)
|
|
13
19
|
from wintertoo.schedule import concat_toos, schedule_field, schedule_ra_dec
|
|
14
20
|
from wintertoo.submit import export_schedule_to_sqlitedb
|
|
15
21
|
from wintertoo.validate import (
|
|
@@ -28,6 +34,7 @@ program = Program(
|
|
|
28
34
|
pi_name="Stein",
|
|
29
35
|
progname="2021A000",
|
|
30
36
|
prog_key="763244309190298696786072636901190268976229595667748695826878",
|
|
37
|
+
pi_email="fake@nowhere.com",
|
|
31
38
|
maxpriority=100,
|
|
32
39
|
startdate=date(2021, 1, 1),
|
|
33
40
|
enddate=date(3023, 12, 31),
|
|
@@ -57,13 +64,16 @@ class TestSchedule(unittest.TestCase):
|
|
|
57
64
|
"""
|
|
58
65
|
logger.info("Testing schedule generation")
|
|
59
66
|
|
|
67
|
+
kwargs = {
|
|
68
|
+
"ra_deg": 173.7056754,
|
|
69
|
+
"dec_deg": 11.253441,
|
|
70
|
+
"start_time_mjd": 62721.1894969287,
|
|
71
|
+
"end_time_mjd": 62722.1894969452,
|
|
72
|
+
"target_name": "test_radec",
|
|
73
|
+
}
|
|
74
|
+
|
|
60
75
|
schedule = schedule_ra_dec(
|
|
61
|
-
too=SummerRaDecToO(
|
|
62
|
-
ra_deg=173.7056754,
|
|
63
|
-
dec_deg=11.253441,
|
|
64
|
-
start_time_mjd=62721.1894969287,
|
|
65
|
-
end_time_mjd=62722.1894969452,
|
|
66
|
-
),
|
|
76
|
+
too=SummerRaDecToO(**kwargs),
|
|
67
77
|
program=program,
|
|
68
78
|
)
|
|
69
79
|
|
|
@@ -79,13 +89,26 @@ class TestSchedule(unittest.TestCase):
|
|
|
79
89
|
too=SummerRaDecToO(
|
|
80
90
|
ra_deg=173.7056754,
|
|
81
91
|
dec_deg=11.253441,
|
|
92
|
+
total_exposure_time=100.0,
|
|
93
|
+
n_dither=1,
|
|
94
|
+
start_time_mjd=62721.1894969287,
|
|
95
|
+
end_time_mjd=62722.1894969452,
|
|
96
|
+
target_name="test_radec",
|
|
82
97
|
),
|
|
83
98
|
program=program,
|
|
84
99
|
)
|
|
85
100
|
|
|
86
101
|
validate_schedule_with_program(schedule, program)
|
|
87
102
|
|
|
88
|
-
export_schedule_to_sqlitedb(schedule,
|
|
103
|
+
output_path = export_schedule_to_sqlitedb(schedule, test_data_dir)
|
|
104
|
+
output_path.unlink()
|
|
105
|
+
|
|
106
|
+
for too_class in [WinterRaDecToO, SpringRaDecToO]:
|
|
107
|
+
schedule = schedule_ra_dec(
|
|
108
|
+
too=too_class(**kwargs),
|
|
109
|
+
program=program,
|
|
110
|
+
)
|
|
111
|
+
validate_schedule_with_program(schedule, program)
|
|
89
112
|
|
|
90
113
|
def test_schedule_utils(self):
|
|
91
114
|
"""
|
|
@@ -97,6 +120,7 @@ class TestSchedule(unittest.TestCase):
|
|
|
97
120
|
|
|
98
121
|
field_too = SummerFieldToO(
|
|
99
122
|
field_id=1,
|
|
123
|
+
target_name="test_field",
|
|
100
124
|
)
|
|
101
125
|
|
|
102
126
|
schedule_field(
|
|
@@ -106,6 +130,11 @@ class TestSchedule(unittest.TestCase):
|
|
|
106
130
|
)
|
|
107
131
|
|
|
108
132
|
concat_toos(
|
|
109
|
-
[
|
|
133
|
+
[
|
|
134
|
+
field_too,
|
|
135
|
+
SummerRaDecToO(
|
|
136
|
+
ra_deg=173.7056754, dec_deg=11.253441, target_name="test_radec"
|
|
137
|
+
),
|
|
138
|
+
],
|
|
110
139
|
program=program,
|
|
111
140
|
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"targName":{"0":"test_radec","1":"test_radec","2":"test_radec","3":"test_radec"},"raDeg":{"0":173.7056754,"1":173.7056754,"2":173.7056754,"3":173.7056754},"decDeg":{"0":11.253441,"1":11.253441,"2":11.253441,"3":11.253441},"fieldID":{"0":999999999,"1":999999999,"2":999999999,"3":999999999},"filter":{"0":"u","1":"g","2":"r","3":"i"},"visitExpTime":{"0":960.0,"1":960.0,"2":960.0,"3":960.0},"singleExpTime":{"0":120.0,"1":120.0,"2":120.0,"3":120.0},"priority":{"0":50.0,"1":50.0,"2":50.0,"3":50.0},"progPI":{"0":"Stein","1":"Stein","2":"Stein","3":"Stein"},"progName":{"0":"2021A000","1":"2021A000","2":"2021A000","3":"2021A000"},"progID":{"0":1,"1":1,"2":1,"3":1},"validStart":{"0":62721.1894969287,"1":62721.1894969287,"2":62721.1894969287,"3":62721.1894969287},"validStop":{"0":62722.1894969452,"1":62722.1894969452,"2":62722.1894969452,"3":62722.1894969452},"observed":{"0":false,"1":false,"2":false,"3":false},"maxAirmass":{"0":2.0,"1":2.0,"2":2.0,"3":2.0},"ditherNumber":{"0":8,"1":8,"2":8,"3":8},"ditherStepSize":{"0":90.0,"1":90.0,"2":90.0,"3":90.0},"bestDetector":{"0":true,"1":true,"2":true,"3":true},"camera":{"0":"summer","1":"summer","2":"summer","3":"summer"},"obsHistID":{"0":0,"1":1,"2":2,"3":3}}
|
|
@@ -17,18 +17,28 @@ summer_fields_path = data_dir.joinpath("summer_fields.txt")
|
|
|
17
17
|
summer_fields = pd.read_csv(summer_fields_path, sep=r"\s+")
|
|
18
18
|
|
|
19
19
|
winter_fields_path = data_dir.joinpath("winter_fields.txt")
|
|
20
|
-
|
|
20
|
+
all_winter_fields = pd.read_csv(winter_fields_path, sep=r"\s+")
|
|
21
|
+
winter_fields = all_winter_fields[all_winter_fields["ID"] < 41170]
|
|
22
|
+
winter_secondary_fields = all_winter_fields[all_winter_fields["ID"] >= 41170]
|
|
21
23
|
|
|
22
24
|
SummerFilters = Literal["u", "g", "r", "i"]
|
|
23
|
-
|
|
24
25
|
WinterFilters = Literal["dark", "Y", "J", "Hs"]
|
|
26
|
+
SpringFilters = Literal["dark", "Y", "J", "Hs"]
|
|
25
27
|
|
|
26
28
|
SUMMER_FILTERS = list(typing.get_args(SummerFilters))
|
|
27
29
|
WINTER_FILTERS = list(typing.get_args(WinterFilters))
|
|
28
30
|
WINTER_SCIENCE_FILTERS = ["Y", "J", "Hs"]
|
|
31
|
+
SPRING_FILTERS = list(typing.get_args(SpringFilters))
|
|
32
|
+
SPRING_SCIENCE_FILTERS = ["Y", "J", "Hs"]
|
|
29
33
|
|
|
30
34
|
SUMMER_BASE_WIDTH = 0.26112
|
|
31
35
|
WINTER_BASE_WIDTH = 1.0
|
|
36
|
+
SPRING_BASE_WIDTH = 1.0
|
|
37
|
+
|
|
38
|
+
MAX_TARGNAME_LEN = 30
|
|
39
|
+
|
|
40
|
+
WinterImageTypes = Literal["exposure", "raw", "science", "stack", "diff", "avro"]
|
|
41
|
+
DEFAULT_IMAGE_TYPE = "stack"
|
|
32
42
|
|
|
33
43
|
PROGRAM_DB_HOST = "jagati.caltech.edu"
|
|
34
44
|
|
|
@@ -49,10 +59,6 @@ def get_default_value(key: str):
|
|
|
49
59
|
|
|
50
60
|
|
|
51
61
|
# define location of Palomar Observatory
|
|
52
|
-
PALOMAR_LOC = coords.EarthLocation(
|
|
53
|
-
lat=coords.Latitude("33d21m25.5s"),
|
|
54
|
-
lon=coords.Longitude("-116d51m58.4s"),
|
|
55
|
-
height=1696.0,
|
|
56
|
-
)
|
|
62
|
+
PALOMAR_LOC = coords.EarthLocation.of_site("Palomar", refresh_cache=True)
|
|
57
63
|
|
|
58
64
|
palomar_observer = astroplan.Observer(location=PALOMAR_LOC)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"raDeg": {"type": "number", "comment": "Degrees (decimal)"},
|
|
6
6
|
"decDeg": {"type": "number", "comment": "Degrees (decimal)"},
|
|
7
7
|
"filter": {"type": "string", "comment": "'u'/'g'/'r'/'i'/'Y'/'J'/'H'/'dark'"},
|
|
8
|
-
"visitExpTime": {"type": "number", "comment": "Total observation time (seconds)", "default":
|
|
8
|
+
"visitExpTime": {"type": "number", "comment": "Total observation time (seconds)", "default": 960.0},
|
|
9
9
|
"priority": {"type": "number", "comment": "Priority of observation"},
|
|
10
10
|
"progPI": {"type": "string", "comment": "PI of observation"},
|
|
11
11
|
"progID": {"type": "integer", "comment": "Between 0 and 4 (0-Calibration, 1-Survey, 2-MIT, 3-Caltech, 4-Engineering)"},
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
"validStop": {"type": "number", "comment": "Format: MJD"},
|
|
15
15
|
"observed": {"anyOf": [{"type": "boolean", "default": false}, {"type" : "integer", "minimum" : 0, "maximum" : 1}]},
|
|
16
16
|
"maxAirmass": {"type": "number", "comment": "Maximum airmass for observation", "default": 2.0},
|
|
17
|
-
"ditherNumber": {"type": "integer", "default":
|
|
18
|
-
"ditherStepSize": {"type": "number", "comment": "arcsec", "default":
|
|
17
|
+
"ditherNumber": {"type": "integer", "default": 8},
|
|
18
|
+
"ditherStepSize": {"type": "number", "comment": "arcsec", "default": 90.0},
|
|
19
19
|
"fieldID": {"type": "integer", "default": 999999999},
|
|
20
|
-
"targName": {"type": ["string"
|
|
20
|
+
"targName": {"type": ["string"], "comment": "Target name e.g. GW170817"},
|
|
21
|
+
"bestDetector": {"type": "boolean", "comment": "Center Ra/Dec of target on best detector", "default": true},
|
|
22
|
+
"camera": {"type": "string", "comment": "'winter' or 'spring'", "default": "winter"}
|
|
21
23
|
},
|
|
22
24
|
"required": [
|
|
23
25
|
"obsHistID",
|