spectre-core 0.0.9__py3-none-any.whl → 0.0.11__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.
- spectre_core/__init__.py +0 -3
- spectre_core/_file_io/__init__.py +15 -0
- spectre_core/_file_io/file_handlers.py +128 -0
- spectre_core/capture_configs/__init__.py +29 -0
- spectre_core/capture_configs/_capture_config.py +85 -0
- spectre_core/capture_configs/_capture_templates.py +222 -0
- spectre_core/capture_configs/_parameters.py +110 -0
- spectre_core/capture_configs/_pconstraints.py +82 -0
- spectre_core/capture_configs/_ptemplates.py +450 -0
- spectre_core/capture_configs/_pvalidators.py +171 -0
- spectre_core/chunks/__init__.py +17 -201
- spectre_core/chunks/{base.py → _base.py} +15 -60
- spectre_core/chunks/_chunks.py +200 -0
- spectre_core/chunks/{factory.py → _factory.py} +6 -7
- spectre_core/chunks/library/{callisto/chunk.py → _callisto.py} +4 -7
- spectre_core/chunks/library/{fixed/chunk.py → _fixed_center_frequency.py} +7 -64
- spectre_core/chunks/library/_swept_center_frequency.py +103 -0
- spectre_core/config/__init__.py +20 -0
- spectre_core/config/_paths.py +77 -0
- spectre_core/config/_time_formats.py +15 -0
- spectre_core/exceptions.py +4 -5
- spectre_core/logging/__init__.py +11 -0
- spectre_core/logging/_configure.py +35 -0
- spectre_core/logging/_decorators.py +19 -0
- spectre_core/{logging.py → logging/_log_handlers.py} +13 -58
- spectre_core/plotting/__init__.py +7 -1
- spectre_core/plotting/{base.py → _base.py} +40 -20
- spectre_core/plotting/_format.py +18 -0
- spectre_core/plotting/{panel_stack.py → _panel_stack.py} +48 -48
- spectre_core/plotting/_panels.py +234 -0
- spectre_core/post_processing/__init__.py +10 -2
- spectre_core/post_processing/_base.py +119 -0
- spectre_core/post_processing/{factory.py → _factory.py} +7 -6
- spectre_core/post_processing/{post_processor.py → _post_processor.py} +3 -3
- spectre_core/post_processing/library/_fixed_center_frequency.py +115 -0
- spectre_core/post_processing/library/_swept_center_frequency.py +382 -0
- spectre_core/receivers/__init__.py +13 -2
- spectre_core/receivers/_base.py +180 -0
- spectre_core/receivers/{factory.py → _factory.py} +2 -2
- spectre_core/receivers/_spec_names.py +20 -0
- spectre_core/receivers/gr/__init__.py +3 -0
- spectre_core/receivers/gr/_base.py +33 -0
- spectre_core/receivers/gr/_rsp1a.py +158 -0
- spectre_core/receivers/gr/_rspduo.py +227 -0
- spectre_core/receivers/gr/_test.py +123 -0
- spectre_core/receivers/library/_rsp1a.py +61 -0
- spectre_core/receivers/library/_rspduo.py +69 -0
- spectre_core/receivers/library/_sdrplay_receiver.py +185 -0
- spectre_core/receivers/library/_test.py +221 -0
- spectre_core/spectrograms/__init__.py +18 -0
- spectre_core/spectrograms/{analytical.py → _analytical.py} +29 -27
- spectre_core/spectrograms/{array_operations.py → _array_operations.py} +47 -1
- spectre_core/spectrograms/{spectrogram.py → _spectrogram.py} +62 -35
- spectre_core/spectrograms/{transform.py → _transform.py} +76 -89
- spectre_core/{post_processing/library → wgetting}/__init__.py +4 -5
- spectre_core/wgetting/_callisto.py +155 -0
- {spectre_core-0.0.9.dist-info → spectre_core-0.0.11.dist-info}/METADATA +1 -1
- spectre_core-0.0.11.dist-info/RECORD +64 -0
- spectre_core/cfg.py +0 -116
- spectre_core/chunks/library/__init__.py +0 -8
- spectre_core/chunks/library/callisto/__init__.py +0 -0
- spectre_core/chunks/library/fixed/__init__.py +0 -0
- spectre_core/chunks/library/sweep/__init__.py +0 -0
- spectre_core/chunks/library/sweep/chunk.py +0 -400
- spectre_core/dynamic_imports.py +0 -22
- spectre_core/file_handlers/base.py +0 -68
- spectre_core/file_handlers/configs.py +0 -271
- spectre_core/file_handlers/json.py +0 -40
- spectre_core/file_handlers/text.py +0 -21
- spectre_core/plotting/factory.py +0 -26
- spectre_core/plotting/format.py +0 -19
- spectre_core/plotting/library/__init__.py +0 -7
- spectre_core/plotting/library/frequency_cuts/panel.py +0 -74
- spectre_core/plotting/library/integral_over_frequency/panel.py +0 -34
- spectre_core/plotting/library/spectrogram/panel.py +0 -92
- spectre_core/plotting/library/time_cuts/panel.py +0 -77
- spectre_core/plotting/panel_register.py +0 -13
- spectre_core/post_processing/base.py +0 -132
- spectre_core/post_processing/library/fixed/__init__.py +0 -0
- spectre_core/post_processing/library/fixed/event_handler.py +0 -40
- spectre_core/post_processing/library/sweep/event_handler.py +0 -54
- spectre_core/receivers/base.py +0 -422
- spectre_core/receivers/library/__init__.py +0 -7
- spectre_core/receivers/library/rsp1a/__init__.py +0 -0
- spectre_core/receivers/library/rsp1a/gr/__init__.py +0 -0
- spectre_core/receivers/library/rsp1a/gr/fixed.py +0 -104
- spectre_core/receivers/library/rsp1a/gr/sweep.py +0 -129
- spectre_core/receivers/library/rsp1a/receiver.py +0 -68
- spectre_core/receivers/library/rspduo/__init__.py +0 -0
- spectre_core/receivers/library/rspduo/gr/__init__.py +0 -0
- spectre_core/receivers/library/rspduo/gr/tuner_1_fixed.py +0 -114
- spectre_core/receivers/library/rspduo/gr/tuner_1_sweep.py +0 -131
- spectre_core/receivers/library/rspduo/gr/tuner_2_fixed.py +0 -120
- spectre_core/receivers/library/rspduo/gr/tuner_2_sweep.py +0 -119
- spectre_core/receivers/library/rspduo/receiver.py +0 -97
- spectre_core/receivers/library/test/__init__.py +0 -0
- spectre_core/receivers/library/test/gr/__init__.py +0 -0
- spectre_core/receivers/library/test/gr/cosine_signal_1.py +0 -83
- spectre_core/receivers/library/test/gr/tagged_staircase.py +0 -93
- spectre_core/receivers/library/test/receiver.py +0 -203
- spectre_core/receivers/validators.py +0 -231
- spectre_core/web_fetch/callisto.py +0 -101
- spectre_core-0.0.9.dist-info/RECORD +0 -74
- /spectre_core/chunks/{chunk_register.py → _register.py} +0 -0
- /spectre_core/post_processing/{event_handler_register.py → _register.py} +0 -0
- /spectre_core/receivers/{receiver_register.py → _register.py} +0 -0
- {spectre_core-0.0.9.dist-info → spectre_core-0.0.11.dist-info}/LICENSE +0 -0
- {spectre_core-0.0.9.dist-info → spectre_core-0.0.11.dist-info}/WHEEL +0 -0
- {spectre_core-0.0.9.dist-info → spectre_core-0.0.11.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,155 @@
|
|
1
|
+
# SPDX-FileCopyrightText: © 2024 Jimmy Fitzpatrick <jcfitzpatrick12@gmail.com>
|
2
|
+
# This file is part of SPECTRE
|
3
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
4
|
+
|
5
|
+
import os
|
6
|
+
import subprocess
|
7
|
+
import shutil
|
8
|
+
import gzip
|
9
|
+
from datetime import datetime
|
10
|
+
from typing import Optional
|
11
|
+
|
12
|
+
from spectre_core.config import get_spectre_data_dir_path, get_chunks_dir_path, TimeFormats
|
13
|
+
|
14
|
+
CALLISTO_INSTRUMENT_CODES = [
|
15
|
+
"ALASKA-ANCHORAGE",
|
16
|
+
"ALASKA-COHOE",
|
17
|
+
"ALASKA-HAARP",
|
18
|
+
"ALGERIA-CRAAG",
|
19
|
+
"ALMATY",
|
20
|
+
"AUSTRIA-Krumbach",
|
21
|
+
"AUSTRIA-MICHELBACH",
|
22
|
+
"AUSTRIA-OE3FLB",
|
23
|
+
"AUSTRIA-UNIGRAZ",
|
24
|
+
"Australia-ASSA",
|
25
|
+
"BIR",
|
26
|
+
"Croatia-Visnjan",
|
27
|
+
"DENMARK",
|
28
|
+
"EGYPT-Alexandria",
|
29
|
+
"EGYPT-SpaceAgency",
|
30
|
+
"FINLAND-Siuntio",
|
31
|
+
"Finland-Kempele",
|
32
|
+
"GERMANY-DLR",
|
33
|
+
"GLASGOW",
|
34
|
+
"GREENLAND",
|
35
|
+
"HUMAIN",
|
36
|
+
"HURBANOVO",
|
37
|
+
"INDIA-GAURI",
|
38
|
+
"INDIA-OOTY",
|
39
|
+
"INDIA-UDAIPUR",
|
40
|
+
"JAPAN-IBARAKI",
|
41
|
+
"KASI",
|
42
|
+
"MEXART",
|
43
|
+
"MEXICO-FCFM-UANL",
|
44
|
+
"MEXICO-LANCE-A",
|
45
|
+
"MEXICO-LANCE-B",
|
46
|
+
"MONGOLIA-UB",
|
47
|
+
"MRO",
|
48
|
+
"MRT3",
|
49
|
+
"Malaysia-Banting",
|
50
|
+
"NORWAY-EGERSUND",
|
51
|
+
"NORWAY-NY-AALESUND",
|
52
|
+
"NORWAY-RANDABERG",
|
53
|
+
"POLAND-Grotniki",
|
54
|
+
"ROMANIA",
|
55
|
+
"ROSWELL-NM",
|
56
|
+
"SPAIN-PERALEJOS",
|
57
|
+
"SSRT",
|
58
|
+
"SWISS-HB9SCT",
|
59
|
+
"SWISS-HEITERSWIL",
|
60
|
+
"SWISS-IRSOL",
|
61
|
+
"SWISS-Landschlacht",
|
62
|
+
"SWISS-MUHEN",
|
63
|
+
"TRIEST",
|
64
|
+
"TURKEY",
|
65
|
+
"UNAM",
|
66
|
+
"URUGUAY",
|
67
|
+
"USA-BOSTON",
|
68
|
+
]
|
69
|
+
|
70
|
+
_temp_dir = os.path.join(get_spectre_data_dir_path(), "temp")
|
71
|
+
|
72
|
+
|
73
|
+
def _get_chunk_name(station: str, date: str, time: str, instrument_code: str) -> str:
|
74
|
+
dt = datetime.strptime(f"{date}T{time}", '%Y%m%dT%H%M%S')
|
75
|
+
formatted_time = dt.strftime(TimeFormats.DATETIME)
|
76
|
+
return f"{formatted_time}_callisto-{station.lower()}-{instrument_code}.fits"
|
77
|
+
|
78
|
+
|
79
|
+
def _get_chunk_components(gz_path: str):
|
80
|
+
file_name = os.path.basename(gz_path)
|
81
|
+
if not file_name.endswith(".fit.gz"):
|
82
|
+
raise ValueError(f"Unexpected file extension in {file_name}. Expected .fit.gz")
|
83
|
+
|
84
|
+
file_base_name = file_name.rstrip(".fit.gz")
|
85
|
+
parts = file_base_name.split('_')
|
86
|
+
if len(parts) != 4:
|
87
|
+
raise ValueError("Filename does not conform to the expected format of [station]_[date]_[time]_[instrument_code]")
|
88
|
+
|
89
|
+
return parts
|
90
|
+
|
91
|
+
|
92
|
+
def _get_chunk_path(gz_path: str) -> str:
|
93
|
+
station, date, time, instrument_code = _get_chunk_components(gz_path)
|
94
|
+
fits_chunk_name = _get_chunk_name(station, date, time, instrument_code)
|
95
|
+
chunk_start_time = fits_chunk_name.split('_')[0]
|
96
|
+
chunk_start_datetime = datetime.strptime(chunk_start_time, TimeFormats.DATETIME)
|
97
|
+
chunk_parent_path = get_chunks_dir_path(year = chunk_start_datetime.year,
|
98
|
+
month = chunk_start_datetime.month,
|
99
|
+
day = chunk_start_datetime.day)
|
100
|
+
if not os.path.exists(chunk_parent_path):
|
101
|
+
os.makedirs(chunk_parent_path)
|
102
|
+
return os.path.join(chunk_parent_path, fits_chunk_name)
|
103
|
+
|
104
|
+
|
105
|
+
def _unzip_file_to_chunks(gz_path: str):
|
106
|
+
fits_path = _get_chunk_path(gz_path)
|
107
|
+
with gzip.open(gz_path, 'rb') as f_in, open(fits_path, 'wb') as f_out:
|
108
|
+
shutil.copyfileobj(f_in, f_out)
|
109
|
+
|
110
|
+
|
111
|
+
def _unzip_to_chunks():
|
112
|
+
for entry in os.scandir(_temp_dir):
|
113
|
+
if entry.is_file() and entry.name.endswith('.gz'):
|
114
|
+
_unzip_file_to_chunks(entry.path)
|
115
|
+
os.remove(entry.path)
|
116
|
+
|
117
|
+
|
118
|
+
def _wget_callisto_data(instrument_code: str,
|
119
|
+
year: int,
|
120
|
+
month: int,
|
121
|
+
day: int):
|
122
|
+
date_str = f"{year:04d}/{month:02d}/{day:02d}"
|
123
|
+
base_url = f"http://soleil.i4ds.ch/solarradio/data/2002-20yy_Callisto/{date_str}/"
|
124
|
+
command = [
|
125
|
+
'wget', '-r', '-l1', '-nd', '-np',
|
126
|
+
'-R', '.tmp',
|
127
|
+
'-A', f'{instrument_code}*.fit.gz',
|
128
|
+
'-P', _temp_dir,
|
129
|
+
base_url
|
130
|
+
]
|
131
|
+
|
132
|
+
try:
|
133
|
+
subprocess.run(command, check=True)
|
134
|
+
except subprocess.CalledProcessError as e:
|
135
|
+
print(f"An error occurred: {e}")
|
136
|
+
|
137
|
+
|
138
|
+
def download_callisto_data(instrument_code: Optional[str],
|
139
|
+
year: Optional[int],
|
140
|
+
month: Optional[int],
|
141
|
+
day: Optional[int]):
|
142
|
+
|
143
|
+
|
144
|
+
if (year is None) or (month is None) or (day is None):
|
145
|
+
raise ValueError(f"All of year, month and day should be specified")
|
146
|
+
|
147
|
+
if not os.path.exists(_temp_dir):
|
148
|
+
os.mkdir(_temp_dir)
|
149
|
+
|
150
|
+
if instrument_code not in CALLISTO_INSTRUMENT_CODES:
|
151
|
+
raise ValueError(f"No match found for '{instrument_code}'. Expected one of {CALLISTO_INSTRUMENT_CODES}")
|
152
|
+
|
153
|
+
_wget_callisto_data(instrument_code, year, month, day)
|
154
|
+
_unzip_to_chunks()
|
155
|
+
shutil.rmtree(_temp_dir)
|
@@ -0,0 +1,64 @@
|
|
1
|
+
spectre_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
spectre_core/exceptions.py,sha256=3MhbhqRzPgVEx4Z4r6jdyhviQZ1n0GJChAl0aY3dhmA,566
|
3
|
+
spectre_core/_file_io/__init__.py,sha256=YlkTZsmzuvxYW4kbmzaOv4WcqhbyoV00D-V4mJyNfBQ,334
|
4
|
+
spectre_core/_file_io/file_handlers.py,sha256=CfAmUvgwRe3PD_Fe3StJ6tmbvc5siatPQDzpal8Tukk,3352
|
5
|
+
spectre_core/capture_configs/__init__.py,sha256=-OFfB1UMuKnfjq6UDYdEA8ihu5uObzv8FqxVMRUYpCU,973
|
6
|
+
spectre_core/capture_configs/_capture_config.py,sha256=An0B4sQ3OQPTIZrDwOY6mqLTQTQX8NvyYpS3tuHwv8w,2630
|
7
|
+
spectre_core/capture_configs/_capture_templates.py,sha256=P-oU_c8ICIuIkXDgfIsWtsGdiMqP8G6VDSq4X-cAsd0,7736
|
8
|
+
spectre_core/capture_configs/_parameters.py,sha256=TYMrRwdqI8nruBKmZbxOcqmWinBJNro-efHl_0yYLpM,3708
|
9
|
+
spectre_core/capture_configs/_pconstraints.py,sha256=262ocQn11v3sJIiaQ-5Ihr4ZoLGTH2_pyFSA2dJb_pc,3241
|
10
|
+
spectre_core/capture_configs/_ptemplates.py,sha256=TzOcJG1RthYEXIsekInmV6Hp4kncEQQi9Fn7fozOGQs,23578
|
11
|
+
spectre_core/capture_configs/_pvalidators.py,sha256=uE9ZkQgGWtgTIbMrshj58ItI0GH3Nn-CsGRkXa8qVtQ,7188
|
12
|
+
spectre_core/chunks/__init__.py,sha256=w2PPNbw0kyRL7EV4ERRhObX1y3yt_uqSpYL75i1TeVE,604
|
13
|
+
spectre_core/chunks/_base.py,sha256=bm9EwsUUqCpaLMWqI9rgcMHpJoYhnlJsz9u1ewqaoUU,3561
|
14
|
+
spectre_core/chunks/_chunks.py,sha256=na4dCwdCpIRZzPUJ4wjVGcezyn03E4JMxzfKAQJbWuc,6968
|
15
|
+
spectre_core/chunks/_factory.py,sha256=kgydFL0nAtDJpjAh04kKJ8wXDbRBfmlk6HR9JNvGv5Q,1042
|
16
|
+
spectre_core/chunks/_register.py,sha256=sS-T6d59zbh8_trr_7bYlq2O9Ak7k_XXHM6-yalwxaE,435
|
17
|
+
spectre_core/chunks/library/_callisto.py,sha256=jleMpsQPZ9_HuNBP-vEYa08lk5hzmjziMCwd49Nrdh4,3867
|
18
|
+
spectre_core/chunks/library/_fixed_center_frequency.py,sha256=j9dhdCwM-HVjnTmP4Bss5LO_wMqFks896wXBZRhLr8g,4701
|
19
|
+
spectre_core/chunks/library/_swept_center_frequency.py,sha256=IMvOWGilQPO31QrLG-X9nyD6QGosA44euWm3czaY7wA,4667
|
20
|
+
spectre_core/config/__init__.py,sha256=CI0qnFG4ohWtsCcTK2XHxhKoezptwoCPmEx5ty8LjZs,530
|
21
|
+
spectre_core/config/_paths.py,sha256=w_2FAUi3y1usQk30T2lY9UaBGR6sljnPBYj6_0A19pY,2367
|
22
|
+
spectre_core/config/_time_formats.py,sha256=5R_bf_HXv5w06miCfrCP-W9QTmNvnsVShbPyrq95Jno,365
|
23
|
+
spectre_core/logging/__init__.py,sha256=bdfcLby8VMDXI1aGg5VqJK7NPx20HIyMg5DUIVEYw80,370
|
24
|
+
spectre_core/logging/_configure.py,sha256=_nYYydRpTE7HkhdNHnPfirVtLUChz7IBlFYCS9cjXjY,1248
|
25
|
+
spectre_core/logging/_decorators.py,sha256=89vJ_JZhfL7Azg2iFxMbj22c3Ajetgv6TOBkArTzx4A,639
|
26
|
+
spectre_core/logging/_log_handlers.py,sha256=DiK7fd1TcjdYwB967hKdHaFacAg0vzoSbK8F2aAElF4,4884
|
27
|
+
spectre_core/plotting/__init__.py,sha256=eYovaSQfdadspCTItTDyAhznLegXWifpki7c3RRjh3I,310
|
28
|
+
spectre_core/plotting/_base.py,sha256=cXHKk15NwWt0lJADwndxWM5mXUTMj23qzVIlEvpwA1E,5339
|
29
|
+
spectre_core/plotting/_format.py,sha256=3nB3xiiCjjerxkfMdhcOoeknLb2FimoN5sPPkrp1LQw,532
|
30
|
+
spectre_core/plotting/_panel_stack.py,sha256=T1aASyTJEeJcSzy3vkxLcrFg5SpyVnPjV_0mS5t1W8A,5023
|
31
|
+
spectre_core/plotting/_panels.py,sha256=dasPkarjfFHmWf6I9a-Te6BXUP_HPM6NsOxLBRrdGp0,8661
|
32
|
+
spectre_core/post_processing/__init__.py,sha256=zQlqEEvhPkWQvBRjOWNqmfdo-jczNsusqEnalZotXtk,486
|
33
|
+
spectre_core/post_processing/_base.py,sha256=hYGvUEUB1IXee-ns70ZjFoxx0xAR4qKhOJ33l2wqUdE,4925
|
34
|
+
spectre_core/post_processing/_factory.py,sha256=AwTN74mrq87Hraaa8prrEHwKTpfgTUlI9LLjxxSa_ws,1119
|
35
|
+
spectre_core/post_processing/_post_processor.py,sha256=2hIBGng5xx_uZJg-EjVg0gBNI_iNKJidoCRTnejCCmA,1414
|
36
|
+
spectre_core/post_processing/_register.py,sha256=DwlkU92IFkZ1_qvGfhep_OfuqTOIR_efY5qFpn1perw,498
|
37
|
+
spectre_core/post_processing/library/_fixed_center_frequency.py,sha256=ctSDzOTcAroBeV_iN_h4xEgzCO2pXJPzX6-qLZVnLV0,4349
|
38
|
+
spectre_core/post_processing/library/_swept_center_frequency.py,sha256=VKo838E17yzkwSLxSVHRxmvj18DelzAVCtEfCFyYv3o,19476
|
39
|
+
spectre_core/receivers/__init__.py,sha256=ZYoKKkv6ml8mOAYameUmuh2b6UESmnGeVMe8fR2wZHs,553
|
40
|
+
spectre_core/receivers/_base.py,sha256=hBNs0om8g7uaTNEOuSZE4OVCII8q37rwrmOBNHOKeCw,5011
|
41
|
+
spectre_core/receivers/_factory.py,sha256=3P1bxNnt4OxQS0tRNUEZ0Wc1iGc0hgjE9_qS8fGJPRM,822
|
42
|
+
spectre_core/receivers/_register.py,sha256=xHcRnT-3NQxyIWL3nyT3P9qT14Wl5liM9HbflOvOUAM,617
|
43
|
+
spectre_core/receivers/_spec_names.py,sha256=RlQzzD10V0-_ZyqaMUmG9LCoSLGAzyxmQ_eS7e6qvqY,936
|
44
|
+
spectre_core/receivers/gr/__init__.py,sha256=oFSWmGoXQLK5X5xHvWzTdNr9amuaiiGjZirXZVogACU,154
|
45
|
+
spectre_core/receivers/gr/_base.py,sha256=uBtV-nFMzfp8YFeoSbfWmxhEtpLplyjdvfGOqPBmzVI,882
|
46
|
+
spectre_core/receivers/gr/_rsp1a.py,sha256=5kDZMYR_xYT2P0Nk4nLtFQAKNSSO00-aqsNHK5ODJOc,7223
|
47
|
+
spectre_core/receivers/gr/_rspduo.py,sha256=z17gItngH-iW7qM658rF6PR3_0QVs97uAWpFtr544VQ,10852
|
48
|
+
spectre_core/receivers/gr/_test.py,sha256=re0gnHxGcrpT4VabR2EeXA6krziitT3xzeZimbqlHrE,5894
|
49
|
+
spectre_core/receivers/library/_rsp1a.py,sha256=a1BY27MzFgrSMH3zf2BbQxwYMRfcl1WZmX6FURe7-04,2533
|
50
|
+
spectre_core/receivers/library/_rspduo.py,sha256=T5NIOsyEO1eiS7V44L-GtZSLWp6B6me_7jtusyCX2YQ,3180
|
51
|
+
spectre_core/receivers/library/_sdrplay_receiver.py,sha256=br8uX_m-vpZB1Z-TZtSTHREoNm3YMhiL_Kx5BqU0LUM,6334
|
52
|
+
spectre_core/receivers/library/_test.py,sha256=VeGveqfQJ4RsgapQEUuul-AFmzEaZlghJmThWWwd1_c,8278
|
53
|
+
spectre_core/spectrograms/__init__.py,sha256=3_BmRi41isVW8oEM_-Ce61eg9kaF_WUZFNciITTDlhY,721
|
54
|
+
spectre_core/spectrograms/_analytical.py,sha256=k6ZDKwAyVbT4QhQDaso84yENvp6uiV4hoCKn7ID89zo,9054
|
55
|
+
spectre_core/spectrograms/_array_operations.py,sha256=H0TC2G_cos-LQ6_kqjJ9iIw7Kb9zXq9FQ46g2doISDs,4945
|
56
|
+
spectre_core/spectrograms/_spectrogram.py,sha256=f8q6V3V4_fVMJox1oX-L76FdTcOyFJuPUtY9X-718O0,19988
|
57
|
+
spectre_core/spectrograms/_transform.py,sha256=GQqL8LlP1EdqK-1HX4nmnQV3YZXZ9hRpeBV0_EQZCZk,12564
|
58
|
+
spectre_core/wgetting/__init__.py,sha256=dP7qu__escq8w47x0fRCa4gd481f1Bv4drGTo8b7AEQ,301
|
59
|
+
spectre_core/wgetting/_callisto.py,sha256=cOpTaI7L0dNN8R5VsRkcRaPjkV0n5_JwWdspfoyFuWw,4667
|
60
|
+
spectre_core-0.0.11.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
61
|
+
spectre_core-0.0.11.dist-info/METADATA,sha256=2S0_bvGt_0nmlHJuAoy0vYsEa8Mcw1QLWA4hMWtzdMw,42151
|
62
|
+
spectre_core-0.0.11.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
63
|
+
spectre_core-0.0.11.dist-info/top_level.txt,sha256=-UsyjpFohXgZpgcZ9QbVeXhsIyF3Am8RxNFNDV_Ta2Y,13
|
64
|
+
spectre_core-0.0.11.dist-info/RECORD,,
|
spectre_core/cfg.py
DELETED
@@ -1,116 +0,0 @@
|
|
1
|
-
# SPDX-FileCopyrightText: © 2024 Jimmy Fitzpatrick <jcfitzpatrick12@gmail.com>
|
2
|
-
# This file is part of SPECTRE
|
3
|
-
# SPDX-License-Identifier: GPL-3.0-or-later
|
4
|
-
|
5
|
-
import os
|
6
|
-
|
7
|
-
SPECTRE_DATA_DIR_PATH = os.environ.get("SPECTRE_DATA_DIR_PATH")
|
8
|
-
if SPECTRE_DATA_DIR_PATH is None:
|
9
|
-
raise ValueError("The environment variable SPECTRE_DATA_DIR_PATH has not been set")
|
10
|
-
|
11
|
-
CHUNKS_DIR_PATH = os.environ.get("SPECTRE_CHUNKS_DIR_PATH",
|
12
|
-
os.path.join(SPECTRE_DATA_DIR_PATH, 'chunks'))
|
13
|
-
os.makedirs(CHUNKS_DIR_PATH,
|
14
|
-
exist_ok=True)
|
15
|
-
|
16
|
-
LOGS_DIR_PATH = os.environ.get("SPECTRE_LOGS_DIR_PATH",
|
17
|
-
os.path.join(SPECTRE_DATA_DIR_PATH, 'logs'))
|
18
|
-
os.makedirs(LOGS_DIR_PATH,
|
19
|
-
exist_ok=True)
|
20
|
-
|
21
|
-
CONFIGS_DIR_PATH = os.environ.get("SPECTRE_CONFIGS_DIR_PATH",
|
22
|
-
os.path.join(SPECTRE_DATA_DIR_PATH, "configs"))
|
23
|
-
os.makedirs(CONFIGS_DIR_PATH,
|
24
|
-
exist_ok=True)
|
25
|
-
|
26
|
-
DEFAULT_TIME_FORMAT = "%H:%M:%S"
|
27
|
-
DEFAULT_DATE_FORMAT = "%Y-%m-%d"
|
28
|
-
DEFAULT_DATETIME_FORMAT = f"{DEFAULT_DATE_FORMAT}T{DEFAULT_TIME_FORMAT}"
|
29
|
-
|
30
|
-
CALLISTO_INSTRUMENT_CODES = [
|
31
|
-
"ALASKA-ANCHORAGE",
|
32
|
-
"ALASKA-COHOE",
|
33
|
-
"ALASKA-HAARP",
|
34
|
-
"ALGERIA-CRAAG",
|
35
|
-
"ALMATY",
|
36
|
-
"AUSTRIA-Krumbach",
|
37
|
-
"AUSTRIA-MICHELBACH",
|
38
|
-
"AUSTRIA-OE3FLB",
|
39
|
-
"AUSTRIA-UNIGRAZ",
|
40
|
-
"Australia-ASSA",
|
41
|
-
"BIR",
|
42
|
-
"Croatia-Visnjan",
|
43
|
-
"DENMARK",
|
44
|
-
"EGYPT-Alexandria",
|
45
|
-
"EGYPT-SpaceAgency",
|
46
|
-
"FINLAND-Siuntio",
|
47
|
-
"Finland-Kempele",
|
48
|
-
"GERMANY-DLR",
|
49
|
-
"GLASGOW",
|
50
|
-
"GREENLAND",
|
51
|
-
"HUMAIN",
|
52
|
-
"HURBANOVO",
|
53
|
-
"INDIA-GAURI",
|
54
|
-
"INDIA-OOTY",
|
55
|
-
"INDIA-UDAIPUR",
|
56
|
-
"JAPAN-IBARAKI",
|
57
|
-
"KASI",
|
58
|
-
"MEXART",
|
59
|
-
"MEXICO-FCFM-UANL",
|
60
|
-
"MEXICO-LANCE-A",
|
61
|
-
"MEXICO-LANCE-B",
|
62
|
-
"MONGOLIA-UB",
|
63
|
-
"MRO",
|
64
|
-
"MRT3",
|
65
|
-
"Malaysia-Banting",
|
66
|
-
"NORWAY-EGERSUND",
|
67
|
-
"NORWAY-NY-AALESUND",
|
68
|
-
"NORWAY-RANDABERG",
|
69
|
-
"POLAND-Grotniki",
|
70
|
-
"ROMANIA",
|
71
|
-
"ROSWELL-NM",
|
72
|
-
"SPAIN-PERALEJOS",
|
73
|
-
"SSRT",
|
74
|
-
"SWISS-HB9SCT",
|
75
|
-
"SWISS-HEITERSWIL",
|
76
|
-
"SWISS-IRSOL",
|
77
|
-
"SWISS-Landschlacht",
|
78
|
-
"SWISS-MUHEN",
|
79
|
-
"TRIEST",
|
80
|
-
"TURKEY",
|
81
|
-
"UNAM",
|
82
|
-
"URUGUAY",
|
83
|
-
"USA-BOSTON",
|
84
|
-
]
|
85
|
-
|
86
|
-
def _get_date_based_dir_path(base_dir: str, year: int = None,
|
87
|
-
month: int = None, day: int = None
|
88
|
-
) -> str:
|
89
|
-
if day and not (year and month):
|
90
|
-
raise ValueError("A day requires both a month and a year")
|
91
|
-
if month and not year:
|
92
|
-
raise ValueError("A month requires a year")
|
93
|
-
|
94
|
-
date_dir_components = []
|
95
|
-
if year:
|
96
|
-
date_dir_components.append(f"{year:04}")
|
97
|
-
if month:
|
98
|
-
date_dir_components.append(f"{month:02}")
|
99
|
-
if day:
|
100
|
-
date_dir_components.append(f"{day:02}")
|
101
|
-
|
102
|
-
return os.path.join(base_dir, *date_dir_components)
|
103
|
-
|
104
|
-
|
105
|
-
def get_chunks_dir_path(year: int = None,
|
106
|
-
month: int = None,
|
107
|
-
day: int = None
|
108
|
-
) -> str:
|
109
|
-
return _get_date_based_dir_path(CHUNKS_DIR_PATH, year, month, day)
|
110
|
-
|
111
|
-
|
112
|
-
def get_logs_dir_path(year: int = None,
|
113
|
-
month: int = None,
|
114
|
-
day: int = None
|
115
|
-
) -> str:
|
116
|
-
return _get_date_based_dir_path(LOGS_DIR_PATH, year, month, day)
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# SPDX-FileCopyrightText: © 2024 Jimmy Fitzpatrick <jcfitzpatrick12@gmail.com>
|
2
|
-
# This file is part of SPECTRE
|
3
|
-
# SPDX-License-Identifier: GPL-3.0-or-later
|
4
|
-
|
5
|
-
from spectre_core.dynamic_imports import import_target_modules
|
6
|
-
|
7
|
-
import_target_modules(__file__, __name__, "chunk")
|
8
|
-
|
File without changes
|
File without changes
|
File without changes
|