roc-film 1.13.5__py3-none-any.whl → 1.14.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- roc/__init__.py +2 -1
- roc/film/__init__.py +2 -2
- roc/film/commands.py +372 -323
- roc/film/config/__init__.py +0 -1
- roc/film/constants.py +101 -65
- roc/film/descriptor.json +127 -96
- roc/film/exceptions.py +28 -27
- roc/film/tasks/__init__.py +16 -16
- roc/film/tasks/cat_solo_hk.py +86 -74
- roc/film/tasks/cdf_postpro.py +438 -309
- roc/film/tasks/check_dds.py +39 -45
- roc/film/tasks/db_to_anc_bia_sweep_table.py +381 -0
- roc/film/tasks/dds_to_l0.py +232 -180
- roc/film/tasks/export_solo_coord.py +147 -0
- roc/film/tasks/file_handler.py +91 -75
- roc/film/tasks/l0_to_hk.py +117 -103
- roc/film/tasks/l0_to_l1_bia_current.py +38 -30
- roc/film/tasks/l0_to_l1_bia_sweep.py +417 -329
- roc/film/tasks/l0_to_l1_sbm.py +250 -208
- roc/film/tasks/l0_to_l1_surv.py +185 -130
- roc/film/tasks/make_daily_tm.py +40 -37
- roc/film/tasks/merge_tcreport.py +77 -71
- roc/film/tasks/merge_tmraw.py +101 -88
- roc/film/tasks/parse_dds_xml.py +21 -20
- roc/film/tasks/set_l0_utc.py +51 -49
- roc/film/tests/cdf_compare.py +565 -0
- roc/film/tests/hdf5_compare.py +84 -62
- roc/film/tests/test_dds_to_l0.py +93 -51
- roc/film/tests/test_dds_to_tc.py +8 -11
- roc/film/tests/test_dds_to_tm.py +8 -10
- roc/film/tests/test_film.py +161 -116
- roc/film/tests/test_l0_to_hk.py +64 -36
- roc/film/tests/test_l0_to_l1_bia.py +10 -14
- roc/film/tests/test_l0_to_l1_sbm.py +14 -19
- roc/film/tests/test_l0_to_l1_surv.py +68 -41
- roc/film/tests/test_metadata.py +21 -20
- roc/film/tests/tests.py +743 -396
- roc/film/tools/__init__.py +5 -5
- roc/film/tools/dataset_tasks.py +34 -2
- roc/film/tools/file_helpers.py +390 -269
- roc/film/tools/l0.py +402 -324
- roc/film/tools/metadata.py +147 -127
- roc/film/tools/skeleton.py +12 -17
- roc/film/tools/tools.py +109 -92
- roc/film/tools/xlsx2skt.py +161 -139
- {roc_film-1.13.5.dist-info → roc_film-1.14.0.dist-info}/LICENSE +127 -125
- roc_film-1.14.0.dist-info/METADATA +60 -0
- roc_film-1.14.0.dist-info/RECORD +50 -0
- {roc_film-1.13.5.dist-info → roc_film-1.14.0.dist-info}/WHEEL +1 -1
- roc/film/tasks/l0_to_anc_bia_sweep_table.py +0 -348
- roc_film-1.13.5.dist-info/METADATA +0 -120
- roc_film-1.13.5.dist-info/RECORD +0 -48
roc/film/config/__init__.py
CHANGED
roc/film/constants.py
CHANGED
@@ -8,39 +8,48 @@ from datetime import datetime
|
|
8
8
|
from poppy.core.conf import settings
|
9
9
|
from poppy.core.logger import logger
|
10
10
|
|
11
|
-
__all__ = [
|
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
|
-
|
11
|
+
__all__ = [
|
12
|
+
"PLUGIN",
|
13
|
+
"PIPELINE_DATABASE",
|
14
|
+
"INPUT_DATETIME_STRFTIME",
|
15
|
+
"TIME_ISO_STRFORMAT",
|
16
|
+
"TIME_DAILY_STRFORMAT",
|
17
|
+
"CDF_TRANGE_STRFORMAT",
|
18
|
+
"TIME_GEN_STRFORMAT",
|
19
|
+
"TIME_JSON_STRFORMAT",
|
20
|
+
"TIME_L0_STRFORMAT",
|
21
|
+
"TIME_DOY1_STRFORMAT",
|
22
|
+
"TIME_DOY2_STRFORMAT",
|
23
|
+
"SCOS_HEADER_BYTES",
|
24
|
+
"DATA_VERSION",
|
25
|
+
"UNKNOWN_IDB",
|
26
|
+
"CHUNK_SIZE",
|
27
|
+
"TC_ACK_ALLOWED_STATUS",
|
28
|
+
"TEMP_DIR",
|
29
|
+
"ARCHIVE_DAILY_DIR",
|
30
|
+
"TMRAW_PREFIX_BASENAME",
|
31
|
+
"TCREPORT_PREFIX_BASENAME",
|
32
|
+
"TC_ACK_ALLOWED_STATUS",
|
33
|
+
"ANT_1_FLAG",
|
34
|
+
"ANT_2_FLAG",
|
35
|
+
"ANT_3_FLAG",
|
36
|
+
"TM_PACKET_CATEG",
|
37
|
+
"MIN_DATETIME",
|
38
|
+
"MAX_DATETIME",
|
39
|
+
"PACKET_TYPE",
|
40
|
+
"CDFCONVERT_PATH",
|
41
|
+
"TIMEOUT",
|
42
|
+
"CDF_POST_PRO_OPTS_ARGS",
|
43
|
+
"BIA_SWEEP_TABLE_NR",
|
44
|
+
"CP_START_TIME",
|
45
|
+
"SOLO_START_TIME",
|
46
|
+
"SOLO_END_TIME",
|
47
|
+
"NAIF_SPICE_ID",
|
48
|
+
"TRYOUTS",
|
49
|
+
"TIME_WAIT_SEC",
|
50
|
+
"SQL_LIMIT",
|
51
|
+
"BIA_SWEEP_TABLE_PACKETS",
|
52
|
+
]
|
44
53
|
|
45
54
|
# root directory of the module
|
46
55
|
_ROOT_DIRECTORY = osp.abspath(
|
@@ -50,52 +59,59 @@ _ROOT_DIRECTORY = osp.abspath(
|
|
50
59
|
)
|
51
60
|
|
52
61
|
# Name of the plugin
|
53
|
-
PLUGIN =
|
62
|
+
PLUGIN = "roc.film"
|
54
63
|
|
55
64
|
# Load pipeline database identifier
|
56
65
|
try:
|
57
66
|
PIPELINE_DATABASE = settings.PIPELINE_DATABASE
|
58
|
-
except:
|
59
|
-
PIPELINE_DATABASE =
|
60
|
-
logger.warning(
|
61
|
-
|
67
|
+
except AttributeError:
|
68
|
+
PIPELINE_DATABASE = "PIPELINE_DATABASE"
|
69
|
+
logger.warning(
|
70
|
+
f'settings.PIPELINE_DATABASE not defined for {__file__}, use "{PIPELINE_DATABASE}" by default!'
|
71
|
+
)
|
62
72
|
|
63
73
|
# STRING format for time
|
64
|
-
INPUT_DATETIME_STRFTIME =
|
65
|
-
TIME_ISO_STRFORMAT =
|
66
|
-
TIME_DAILY_STRFORMAT =
|
67
|
-
CDF_TRANGE_STRFORMAT =
|
68
|
-
TIME_GEN_STRFORMAT =
|
69
|
-
TIME_JSON_STRFORMAT =
|
70
|
-
TIME_L0_STRFORMAT =
|
71
|
-
TIME_DOY1_STRFORMAT =
|
72
|
-
TIME_DOY2_STRFORMAT =
|
74
|
+
INPUT_DATETIME_STRFTIME = "%Y-%m-%dT%H:%M:%S"
|
75
|
+
TIME_ISO_STRFORMAT = "%Y-%m-%dT%H:%M:%S.%fZ"
|
76
|
+
TIME_DAILY_STRFORMAT = "%Y%m%d"
|
77
|
+
CDF_TRANGE_STRFORMAT = "%Y%m%dT%H%M%S"
|
78
|
+
TIME_GEN_STRFORMAT = "%Y-%m-%dT%H:%M:%S.%f"
|
79
|
+
TIME_JSON_STRFORMAT = "%Y-%m-%dT%H:%M:%SZ"
|
80
|
+
TIME_L0_STRFORMAT = "%Y-%m-%dT%H:%M:%S.%f000Z"
|
81
|
+
TIME_DOY1_STRFORMAT = "%Y-%jT%H:%M:%S.%fZ"
|
82
|
+
TIME_DOY2_STRFORMAT = "%Y-%jT%H:%M:%SZ"
|
73
83
|
|
74
84
|
# Datetime values min/max range
|
75
85
|
MIN_DATETIME = datetime(1999, 1, 1)
|
76
86
|
MAX_DATETIME = datetime(2100, 12, 31)
|
77
87
|
|
88
|
+
# SolO mission start/end time
|
89
|
+
SOLO_START_TIME = datetime(2020, 2, 10)
|
90
|
+
SOLO_END_TIME = datetime(2029, 6, 1)
|
91
|
+
|
92
|
+
# Cruise Phase start time
|
93
|
+
CP_START_TIME = datetime(2020, 6, 15)
|
94
|
+
|
78
95
|
# Relative output directory path of the RPW file local archive
|
79
|
-
ARCHIVE_DAILY_DIR =
|
96
|
+
ARCHIVE_DAILY_DIR = "%Y/%m/%d"
|
80
97
|
|
81
98
|
# TmRaw prefix basename
|
82
|
-
TMRAW_PREFIX_BASENAME =
|
99
|
+
TMRAW_PREFIX_BASENAME = "solo_TM_rpw"
|
83
100
|
|
84
101
|
# TcReport prefix basename
|
85
|
-
TCREPORT_PREFIX_BASENAME =
|
102
|
+
TCREPORT_PREFIX_BASENAME = "solo_TC_rpw"
|
86
103
|
|
87
104
|
# SOLO HK prefix basename
|
88
|
-
SOLOHK_PREFIX_BASENAME =
|
105
|
+
SOLOHK_PREFIX_BASENAME = "solo_HK_platform"
|
89
106
|
|
90
107
|
# DDS TmRaw SCOS header length in bytes
|
91
108
|
SCOS_HEADER_BYTES = 76
|
92
109
|
|
93
|
-
|
94
110
|
# Default value for data_version
|
95
|
-
DATA_VERSION =
|
111
|
+
DATA_VERSION = "01"
|
96
112
|
|
97
113
|
# Default IDB source/version values
|
98
|
-
UNKNOWN_IDB =
|
114
|
+
UNKNOWN_IDB = "UNKNOWN"
|
99
115
|
|
100
116
|
# Temporary dir
|
101
117
|
TEMP_DIR = tempfile.gettempdir()
|
@@ -104,7 +120,7 @@ TEMP_DIR = tempfile.gettempdir()
|
|
104
120
|
CHUNK_SIZE = 10000
|
105
121
|
|
106
122
|
# TC Packet ack possible status in L0 files
|
107
|
-
TC_ACK_ALLOWED_STATUS = [
|
123
|
+
TC_ACK_ALLOWED_STATUS = ["PASSED", "FAILED"]
|
108
124
|
|
109
125
|
# Antenna flags
|
110
126
|
ANT_1_FLAG = 1
|
@@ -112,24 +128,44 @@ ANT_2_FLAG = 2
|
|
112
128
|
ANT_3_FLAG = 3
|
113
129
|
|
114
130
|
# Packet category list
|
115
|
-
TM_PACKET_CATEG = [
|
131
|
+
TM_PACKET_CATEG = ["ev", "hk", "oth", "ll", "sci", "sbm"]
|
116
132
|
|
117
133
|
# Packet type list
|
118
|
-
PACKET_TYPE = [
|
134
|
+
PACKET_TYPE = ["TM", "TC"]
|
119
135
|
|
120
|
-
# Path to the
|
121
|
-
|
136
|
+
# Path to the cdfconvert executable (default)
|
137
|
+
CDFCONVERT_PATH = "/pipeline/lib/cdf/current/bin/cdfconvert"
|
122
138
|
|
123
139
|
# Max process timeout
|
124
140
|
TIMEOUT = 14400
|
125
141
|
|
126
142
|
# Allowed values for keyword --options in l1_post_pro command
|
127
|
-
CDF_POST_PRO_OPTS_ARGS = [
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
143
|
+
CDF_POST_PRO_OPTS_ARGS = [
|
144
|
+
"soop_type",
|
145
|
+
"obs_id",
|
146
|
+
"resize_wf",
|
147
|
+
"update_cdf",
|
148
|
+
"quality_bitmask",
|
149
|
+
"cdf_convert",
|
150
|
+
]
|
133
151
|
|
134
152
|
# Number of max. values that can be stored in the bias sweep table
|
135
153
|
BIA_SWEEP_TABLE_NR = 256
|
154
|
+
|
155
|
+
# List of NAIF SPICE IDs
|
156
|
+
NAIF_SPICE_ID = {
|
157
|
+
"SUN": 10,
|
158
|
+
"SOLAR_ORBITER": -144,
|
159
|
+
}
|
160
|
+
|
161
|
+
# Number of database connexion tryouts
|
162
|
+
TRYOUTS = 3
|
163
|
+
|
164
|
+
# Time to wait in seconds between two database connection tryouts
|
165
|
+
TIME_WAIT_SEC = 3
|
166
|
+
|
167
|
+
# Limit of rows to be returned by the database
|
168
|
+
SQL_LIMIT = 1000000000
|
169
|
+
|
170
|
+
# Names of TC handling Bias sweep table
|
171
|
+
BIA_SWEEP_TABLE_PACKETS = ["TC_DPU_LOAD_BIAS_SWEEP", "TC_DPU_CLEAR_BIAS_SWEEP"]
|