-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path20240808_snow_white.py
76 lines (70 loc) · 1.81 KB
/
20240808_snow_white.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from astra import __version__
from astra.models.boss import BossVisitSpectrum
from astra.models.mwm import BossCombinedSpectrum, BossRestFrameVisitSpectrum
from astra.pipelines.snow_white import snow_white
from astra.models import Source, SnowWhite
from peewee import JOIN
from tqdm import tqdm
q = (
BossCombinedSpectrum
.select()
.join(Source)
.switch(BossCombinedSpectrum)
.join(
SnowWhite,
JOIN.LEFT_OUTER,
on=(
(SnowWhite.spectrum_pk == BossCombinedSpectrum.spectrum_pk)
& (SnowWhite.v_astra == __version__)
)
)
.where(
Source.assigned_to_program("mwm_wd")
& SnowWhite.spectrum_pk.is_null()
& (BossCombinedSpectrum.run2d == "v6_1_3")
)
)
for item in tqdm(snow_white(q), total=1):
None
q = (
BossVisitSpectrum
.select()
.join(Source)
.switch(BossVisitSpectrum)
.join(
SnowWhite,
JOIN.LEFT_OUTER,
on=(
(SnowWhite.spectrum_pk == BossVisitSpectrum.spectrum_pk)
& (SnowWhite.v_astra == __version__)
)
)
.where(
Source.assigned_to_program("mwm_wd")
& SnowWhite.spectrum_pk.is_null()
& (BossVisitSpectrum.run2d == "v6_1_3")
)
)
for item in tqdm(snow_white(q), total=1):
None
q = (
BossRestFrameVisitSpectrum
.select()
.join(Source)
.switch(BossRestFrameVisitSpectrum)
.join(
SnowWhite,
JOIN.LEFT_OUTER,
on=(
(SnowWhite.spectrum_pk == BossRestFrameVisitSpectrum.spectrum_pk)
& (SnowWhite.v_astra == __version__)
)
)
.where(
Source.assigned_to_program("mwm_wd")
& SnowWhite.spectrum_pk.is_null()
& (BossRestFrameVisitSpectrum.run2d == "v6_1_3")
)
)
for item in tqdm(snow_white(q), total=1):
None