timewise 1.0.0a2__py3-none-any.whl → 1.0.0a5__py3-none-any.whl
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.
- ampel/timewise/alert/TimewiseAlertSupplier.py +113 -0
- ampel/timewise/alert/load/TimewiseFileLoader.py +118 -0
- ampel/timewise/ingest/TiCompilerOptions.py +20 -0
- ampel/timewise/ingest/TiDataPointShaper.py +91 -0
- ampel/timewise/ingest/TiMongoMuxer.py +176 -0
- ampel/timewise/ingest/tags.py +15 -0
- ampel/timewise/t1/T1HDBSCAN.py +222 -0
- ampel/timewise/t1/TimewiseFilter.py +47 -0
- ampel/timewise/t2/T2StackVisits.py +56 -0
- ampel/timewise/util/AuxDiagnosticPlotter.py +47 -0
- ampel/timewise/util/pdutil.py +48 -0
- timewise/__init__.py +1 -1
- timewise/cli.py +76 -70
- timewise/io/download.py +11 -13
- timewise/process/interface.py +15 -3
- timewise/query/base.py +9 -2
- {timewise-1.0.0a2.dist-info → timewise-1.0.0a5.dist-info}/METADATA +49 -29
- {timewise-1.0.0a2.dist-info → timewise-1.0.0a5.dist-info}/RECORD +21 -10
- {timewise-1.0.0a2.dist-info → timewise-1.0.0a5.dist-info}/WHEEL +0 -0
- {timewise-1.0.0a2.dist-info → timewise-1.0.0a5.dist-info}/entry_points.txt +0 -0
- {timewise-1.0.0a2.dist-info → timewise-1.0.0a5.dist-info}/licenses/LICENSE +0 -0
timewise/query/base.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import abc
|
|
2
|
-
from typing import ClassVar, List
|
|
3
|
-
from pydantic import BaseModel
|
|
2
|
+
from typing import ClassVar, List, Self
|
|
3
|
+
from pydantic import BaseModel, model_validator
|
|
4
4
|
from hashlib import sha256
|
|
5
5
|
|
|
6
6
|
from ..tables import TableType
|
|
@@ -22,6 +22,13 @@ class Query(abc.ABC, BaseModel):
|
|
|
22
22
|
columns: List[str]
|
|
23
23
|
table: TableType
|
|
24
24
|
|
|
25
|
+
@model_validator(mode="after")
|
|
26
|
+
def check_columns(self) -> Self:
|
|
27
|
+
for column in self.columns:
|
|
28
|
+
if column not in self.table.columns_dtypes:
|
|
29
|
+
raise KeyError(f"{column} not found in table {self.table.name}")
|
|
30
|
+
return self
|
|
31
|
+
|
|
25
32
|
@property
|
|
26
33
|
@abc.abstractmethod
|
|
27
34
|
def input_columns(self) -> dict[str, str]: ...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: timewise
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0a5
|
|
4
4
|
Summary: Download WISE infrared data for many objects and process them with AMPEL
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -10,12 +10,13 @@ Requires-Python: >=3.11,<3.12
|
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Provides-Extra: ampel
|
|
13
14
|
Provides-Extra: dev
|
|
14
15
|
Provides-Extra: docs
|
|
15
|
-
Requires-Dist: ampel-alerts (==0.10.3a5)
|
|
16
|
-
Requires-Dist: ampel-core (>=0.10.4.post0,<0.11.0)
|
|
17
|
-
Requires-Dist: ampel-photometry (>=0.10.1,<0.11.0)
|
|
18
|
-
Requires-Dist: ampel-plot (>=0.9.1,<0.10.0)
|
|
16
|
+
Requires-Dist: ampel-alerts (==0.10.3a5) ; extra == "ampel"
|
|
17
|
+
Requires-Dist: ampel-core (>=0.10.4.post0,<0.11.0) ; extra == "ampel"
|
|
18
|
+
Requires-Dist: ampel-photometry (>=0.10.1,<0.11.0) ; extra == "ampel"
|
|
19
|
+
Requires-Dist: ampel-plot (>=0.9.1,<0.10.0) ; extra == "ampel"
|
|
19
20
|
Requires-Dist: astropy (>=5.1,<6.0.0)
|
|
20
21
|
Requires-Dist: autodoc_pydantic[erdantic] (>=2.2.0,<3.0.0) ; extra == "docs"
|
|
21
22
|
Requires-Dist: backoff (>=2.1.2,<3.0.0)
|
|
@@ -36,7 +37,6 @@ Requires-Dist: ruff (>=0.13.0,<0.14.0) ; extra == "dev"
|
|
|
36
37
|
Requires-Dist: scikit-image (>=0.19.3,<0.22.0)
|
|
37
38
|
Requires-Dist: scikit-learn (>=1.3.0,<2.0.0)
|
|
38
39
|
Requires-Dist: scipy-stubs (>=1.16.2.0,<2.0.0.0) ; extra == "dev"
|
|
39
|
-
Requires-Dist: seaborn (>=0.11.2,<0.14.0)
|
|
40
40
|
Requires-Dist: sphinx-rtd-theme (>=1.3.0,<2.0.0) ; extra == "docs"
|
|
41
41
|
Requires-Dist: tqdm (>=4.64.0,<5.0.0)
|
|
42
42
|
Requires-Dist: typer (>=0.19.2,<0.20.0)
|
|
@@ -60,23 +60,33 @@ Description-Content-Type: text/markdown
|
|
|
60
60
|
This package downloads WISE data for positions on the sky and stacks single-exposure photometry per visit
|
|
61
61
|
|
|
62
62
|
## Prerequisites
|
|
63
|
+
Python version 3.11.
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
If you want to not only download individual exposure photometry but also stack detections per visit (see below),
|
|
66
|
+
you must have access to a running [MongoDB](https://www.mongodb.com/)*.
|
|
67
|
+
|
|
68
|
+
<sub>* On MacOS have alook at the custom `brew` tap
|
|
69
|
+
[here](https://stackoverflow.com/questions/57856809/installing-mongodb-with-homebrew)
|
|
70
|
+
to get the MongoDB community edition. </sub>
|
|
65
71
|
|
|
66
72
|
## Installation
|
|
67
|
-
|
|
73
|
+
|
|
74
|
+
### If you use timewise only for downloading
|
|
75
|
+
The package can be installed via `pip` (but make sure to install the v1 pre-release):
|
|
68
76
|
```bash
|
|
69
|
-
pip install timewise
|
|
77
|
+
pip install --pre timewise==1.0.0a5
|
|
78
|
+
```
|
|
79
|
+
### If you use timewise also for stacking individual exposures
|
|
80
|
+
You must install with the `ampel` extra:
|
|
81
|
+
```bash
|
|
82
|
+
pip install --pre timewise[ampel]==1.0.0a5
|
|
70
83
|
```
|
|
71
|
-
|
|
72
84
|
To tell AMPEL which modules, aka units, to use, build the corresponding configuration file:
|
|
73
85
|
```bash
|
|
74
86
|
ampel config build -distributions ampel timewise -stop-on-errors 0 -out <path-to-ampel-config-file>
|
|
75
87
|
```
|
|
76
88
|
|
|
77
|
-
##
|
|
78
|
-
|
|
79
|
-
### Command line interface
|
|
89
|
+
## Command line interface
|
|
80
90
|
|
|
81
91
|
```
|
|
82
92
|
Usage: timewise [OPTIONS] COMMAND [ARGS]...
|
|
@@ -161,40 +171,50 @@ ampel:
|
|
|
161
171
|
This configuration file will be the input to all subcommands. Downloading and stacking can be run together or separate.
|
|
162
172
|
|
|
163
173
|
|
|
164
|
-
|
|
165
|
-
Run download, stacking, and export:
|
|
174
|
+
### To only download the data:
|
|
166
175
|
```bash
|
|
167
|
-
timewise
|
|
176
|
+
timewise download <path-to-config-file>
|
|
168
177
|
```
|
|
178
|
+
The photometry can be found in FITS files in the working directory specified in the configuration file\
|
|
179
|
+
along with metadata JSON files. These tell `timewise` which quries have already completed (per chunk) so the
|
|
180
|
+
download process can be interrupted and re-started at a later time.
|
|
181
|
+
|
|
182
|
+
### Stack individual exposure by visits
|
|
183
|
+
As mentioned above, this needs installation with the ampel extra.
|
|
184
|
+
|
|
169
185
|
|
|
170
|
-
|
|
171
|
-
To only download the data:
|
|
186
|
+
To **execute the stacking** after the download:
|
|
172
187
|
```bash
|
|
173
|
-
timewise
|
|
188
|
+
timewise process <path-to-config-file> <path-to-ampel-config-file>
|
|
174
189
|
```
|
|
175
190
|
|
|
176
|
-
|
|
191
|
+
Make some **diagnostic plots** to check the datapoint selection and binning:
|
|
177
192
|
```bash
|
|
178
|
-
timewise
|
|
193
|
+
timewise plot <path-to-config-file> <indices-to-plot> <output-directory>
|
|
179
194
|
```
|
|
180
195
|
|
|
181
|
-
|
|
182
|
-
Prepare an AMPEL job file for stacking the single-exposure data:
|
|
196
|
+
As a shortcut, you can also run **download, stacking, and export in one command**:
|
|
183
197
|
```bash
|
|
184
|
-
timewise
|
|
198
|
+
timewise run-chain <path-to-config-file> <path-to-ampel-config-file> <output-directory>
|
|
185
199
|
```
|
|
186
|
-
|
|
200
|
+
|
|
201
|
+
For more configuration options of the stacking, you can **run AMPEL manually**.
|
|
202
|
+
|
|
203
|
+
1. Prepare an AMPEL job file for stacking the single-exposure data:
|
|
187
204
|
```bash
|
|
188
|
-
|
|
205
|
+
timewise prepare-ampel <path-to-config-file>
|
|
189
206
|
```
|
|
207
|
+
The result will contain the path to the prepared AMPEL job file.
|
|
190
208
|
|
|
191
|
-
|
|
192
|
-
To check the datapoint selection and binning, take a quick look at the data:
|
|
209
|
+
2. Run the AMPEL job
|
|
193
210
|
```bash
|
|
194
|
-
|
|
211
|
+
ampel job -config <path-to-ampel-config-file> -schema <path-to-ampel-job-file>
|
|
195
212
|
```
|
|
196
213
|
|
|
197
214
|
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
198
218
|
## Citation
|
|
199
219
|
If you use `timewise` please make sure to cite [Necker et al. A&A 695, A228 (2025)](https://www.aanda.org/articles/aa/abs/2025/03/aa51340-24/aa51340-24.html).
|
|
200
220
|
Additionally, you might want to include a reference to the specific version you are using: [](https://zenodo.org/badge/latestdoi/449677569)
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
timewise/
|
|
1
|
+
ampel/timewise/alert/TimewiseAlertSupplier.py,sha256=RmAWJVOfObaI1x0gt9agRt45WrVj1nhQchaMQ9QgUIA,4127
|
|
2
|
+
ampel/timewise/alert/load/TimewiseFileLoader.py,sha256=ChjOpQpyGTA-H_fjnvQGwa37IFfvfJanPmnVKORVElo,4271
|
|
3
|
+
ampel/timewise/ingest/TiCompilerOptions.py,sha256=xzGOOWAFoFsazocXLsTqtaHIqt_WUXFaacLUoBVKlbo,758
|
|
4
|
+
ampel/timewise/ingest/TiDataPointShaper.py,sha256=KbAg-J0DkMaJA9K67xMY5Pe0SIP0LNKsBNAMnTYV9zA,3180
|
|
5
|
+
ampel/timewise/ingest/TiMongoMuxer.py,sha256=YDiqaYiJ1TvyHUMAlNWHBHCpw0tH4Nvf8eyHUxMbzS8,6475
|
|
6
|
+
ampel/timewise/ingest/tags.py,sha256=ggn0Y6QUnjIwMzOlgKmPX1JPhmnvc21nUrORFhaR0uI,564
|
|
7
|
+
ampel/timewise/t1/T1HDBSCAN.py,sha256=vi1PWF0HFAedVJA4rVoR2YOXQ4jcEgEoUICtmg3rZjw,9301
|
|
8
|
+
ampel/timewise/t1/TimewiseFilter.py,sha256=ZSaXiSDKXCusknLJRMhe2Awj_YfkM74JVXeRbiZonmA,1564
|
|
9
|
+
ampel/timewise/t2/T2StackVisits.py,sha256=x7YcVLz_5fOPAfzso4fFWy4Pwn5txPfRT_Hx49PdbTo,1847
|
|
10
|
+
ampel/timewise/util/AuxDiagnosticPlotter.py,sha256=MZP4LWpFgBUPWPxlx8EEFeRc8rhI7FDO_LlbhKtkwrw,1641
|
|
11
|
+
ampel/timewise/util/pdutil.py,sha256=CJqeYqL2I6A5WnF5S342bwM4omJY-1XwT1XWY2uk3bc,1524
|
|
12
|
+
timewise/__init__.py,sha256=8aDB3NLZbXhuSHcb6tn7CHSOTJ5XB8CCwEQpahSJtxw,24
|
|
2
13
|
timewise/backend/__init__.py,sha256=w79nWfCw8n9g98CkHWJELmb4j9xblWC4DGZOV3_XhH4,134
|
|
3
14
|
timewise/backend/base.py,sha256=dHxRzu2q3uQ0wdGmDxnn-p68Tp19qChue7HMEu56wNA,1080
|
|
4
15
|
timewise/backend/filesystem.py,sha256=GQ4Hrb6_7Q7fKOn6QUl8bqAihAmyeZoTRxElNIwPQ1Y,2465
|
|
5
16
|
timewise/chunking.py,sha256=q7njvTSD84gdcvIk54SC-Ob863MsR79RPec8HS-bm4U,1668
|
|
6
|
-
timewise/cli.py,sha256=
|
|
17
|
+
timewise/cli.py,sha256=W8SXlUQo7a5aS4_kW40KTs2UkTLQS12JuhgwkRb23DY,4172
|
|
7
18
|
timewise/config.py,sha256=ZTSokRZMZDqBqVFV9DxvO-47yE9E9xWF48Rcjb0QG10,1044
|
|
8
19
|
timewise/io/__init__.py,sha256=S7vb0glKJnw6ztOlrD-0Wma2bQZ2RwpmXDLFJLKBMVo,35
|
|
9
20
|
timewise/io/config.py,sha256=aizLxt9l4aeWQNsvcemtQdr_fW1vLmpRSofcgA3Bgvk,2239
|
|
10
|
-
timewise/io/download.py,sha256=
|
|
21
|
+
timewise/io/download.py,sha256=IMNWur1FWPKJ7SNMTjevZgWqPP_eYLzXr4Pjp3XOeXI,10589
|
|
11
22
|
timewise/io/stable_tap.py,sha256=jukCkBi2d7WACOo_kXTMCppzWUsN-pLVg9EDqHi3qd0,3478
|
|
12
23
|
timewise/plot/__init__.py,sha256=cc00UenWC_8zAkBH-Ylhs3yCF49tAqZ2Al9MfOoXYDI,120
|
|
13
24
|
timewise/plot/diagnostic.py,sha256=GRp-OUwz2yzzDu9qdViFg_e3Mxl5t1IvUJXZHuMKB2U,8276
|
|
@@ -16,12 +27,12 @@ timewise/plot/panstarrs.py,sha256=X2ZULm7QT91cp4qociG0fVeI0saGLJwyKzL0141Vqis,80
|
|
|
16
27
|
timewise/plot/sdss.py,sha256=cc1zU-4XFkqc8xH5yqCyMsDJf9w_54B_6NeRMjr9Pt8,2622
|
|
17
28
|
timewise/process/__init__.py,sha256=Yk-j1B1MnBuuaM6eFi43TxdWmFKbwFHvDsuQZt4yB_c,70
|
|
18
29
|
timewise/process/config.py,sha256=d4hCvNb8JyJf2-0BTQgJaeOmHGZK_aHEDMb_xyqJgbU,1060
|
|
19
|
-
timewise/process/interface.py,sha256=
|
|
30
|
+
timewise/process/interface.py,sha256=JOIh1wYuE1s9XdSfBRS7qUXexlr-p5UxdwaSjKlRZxE,5207
|
|
20
31
|
timewise/process/keys.py,sha256=0TEVn-BwfzHGlScU-N8AtxgkhA2mUO0wBu4_ol_ylH4,197
|
|
21
32
|
timewise/process/stacking.py,sha256=5qk9SYTfDFNFsnw9KAGYW-RndGtdmENKEiIqD6mrJ6I,12707
|
|
22
33
|
timewise/process/template.yml,sha256=U_xKmygDl3E-viTgZEI8pQIJwWduB52SdI2X9vy61Yo,1037
|
|
23
34
|
timewise/query/__init__.py,sha256=1OA_FlLI7O0aIDOXHpBKMOyMvYLCd0kQVkzoqbxouyE,242
|
|
24
|
-
timewise/query/base.py,sha256=
|
|
35
|
+
timewise/query/base.py,sha256=GjAoQZpaxVHcpCgPco1y5bpR0Jtd_sp_bYMI26WpAK0,1262
|
|
25
36
|
timewise/query/positional.py,sha256=6fLfRdzat1jMqJAY7k7dEdnAZRiWyRKpWkbqpwzDKLo,1255
|
|
26
37
|
timewise/tables/__init__.py,sha256=5efKk4YEhHLA_QTMYc8CQp0nQWXG-F3EAPE6935ManU,263
|
|
27
38
|
timewise/tables/allwise_p3as_mep.py,sha256=NfCnTOdj_6DSFUWGmrwDyrrxIWvJFHktHWF40K_w5wQ,632
|
|
@@ -32,8 +43,8 @@ timewise/util/backoff.py,sha256=bU5yhsBO4U53XEPJ_32tgql9rq_Rzrv7w32nVQYHr64,272
|
|
|
32
43
|
timewise/util/csv_utils.py,sha256=5i3Jd4c58-doPs1N_hyYZ8Uc2nvuk9nGwgPNZoNrlu0,298
|
|
33
44
|
timewise/util/error_threading.py,sha256=uyV1Ri-wf87lpa17Xlp520B1V8DWHh3v9Mk97QrPmv0,2264
|
|
34
45
|
timewise/util/visits.py,sha256=4ZXwH7OXmp98tUPZplvuOtykB048kZoYXyuRTwQxT7w,998
|
|
35
|
-
timewise-1.0.
|
|
36
|
-
timewise-1.0.
|
|
37
|
-
timewise-1.0.
|
|
38
|
-
timewise-1.0.
|
|
39
|
-
timewise-1.0.
|
|
46
|
+
timewise-1.0.0a5.dist-info/METADATA,sha256=PWFFKX75JxlhRVYm6S9ypWaif_QT22vVe1b2VCQF18w,10181
|
|
47
|
+
timewise-1.0.0a5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
48
|
+
timewise-1.0.0a5.dist-info/entry_points.txt,sha256=mYh1HsUFbV7KT8kxiGqVtR3Pk0oEk6Bd-2c5FsYVhG4,45
|
|
49
|
+
timewise-1.0.0a5.dist-info/licenses/LICENSE,sha256=sVoNJWiTlH-NarJx0wdsob468Pg3JE6vIIgll4lCa3E,1070
|
|
50
|
+
timewise-1.0.0a5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|