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
@@ -1,231 +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 logging import getLogger
|
6
|
-
_LOGGER = getLogger(__name__)
|
7
|
-
|
8
|
-
from math import floor
|
9
|
-
import warnings
|
10
|
-
|
11
|
-
from scipy.signal import get_window
|
12
|
-
|
13
|
-
|
14
|
-
def closed_upper_bound_RF_gain(RF_gain: float,
|
15
|
-
RF_gain_upper_bound: float) -> None:
|
16
|
-
if not (RF_gain <= RF_gain_upper_bound):
|
17
|
-
raise ValueError((f"RF gain must be less than or equal to {RF_gain_upper_bound} [dB]. "
|
18
|
-
f"Got {RF_gain} [dB]"))
|
19
|
-
|
20
|
-
|
21
|
-
def closed_upper_bound_IF_gain(IF_gain: float,
|
22
|
-
IF_gain_upper_bound: float) -> None:
|
23
|
-
if not (IF_gain <= IF_gain_upper_bound):
|
24
|
-
raise ValueError((f"IF gain must be less than or equal to {IF_gain_upper_bound} [dB]. "
|
25
|
-
f"Got {IF_gain} [dB]"))
|
26
|
-
|
27
|
-
|
28
|
-
def closed_confine_center_freq(center_freq: float,
|
29
|
-
center_freq_lower_bound: float,
|
30
|
-
center_freq_upper_bound: float) -> None:
|
31
|
-
if not (center_freq_lower_bound <= center_freq <= center_freq_upper_bound):
|
32
|
-
raise ValueError((f"Center frequency must be between {center_freq_lower_bound*1e-3} [kHz] and {center_freq_upper_bound*1e-9} [GHz]. "
|
33
|
-
f"Got {center_freq*1e-6} [MHz]"))
|
34
|
-
|
35
|
-
|
36
|
-
def closed_confine_samp_rate(samp_rate: int,
|
37
|
-
samp_rate_lower_bound: int,
|
38
|
-
samp_rate_upper_bound: int) -> None:
|
39
|
-
if not (samp_rate_lower_bound <= samp_rate <= samp_rate_upper_bound):
|
40
|
-
raise ValueError((f"Sampling rate must be between {samp_rate_lower_bound*1e-6} [MHz] and {samp_rate_upper_bound*1e-6} [MHz]. "
|
41
|
-
f"Got {samp_rate*1e-6} [MHz]"))
|
42
|
-
|
43
|
-
|
44
|
-
def closed_confine_bandwidth(bandwidth: float,
|
45
|
-
bandwidth_lower_bound: float,
|
46
|
-
bandwidth_upper_bound: float) -> None:
|
47
|
-
if not (bandwidth_lower_bound <= bandwidth <= bandwidth_upper_bound):
|
48
|
-
raise ValueError((f"Bandwidth must be between {bandwidth_lower_bound*1e-3} [kHz] and {bandwidth_upper_bound*1e-6} [MHz]. "
|
49
|
-
f"Got {bandwidth*1e-6} [MHz]"))
|
50
|
-
|
51
|
-
|
52
|
-
def is_power_of_two(n):
|
53
|
-
return (n != 0) and (n & (n-1) == 0)
|
54
|
-
|
55
|
-
|
56
|
-
def window(window_type: str,
|
57
|
-
window_kwargs: dict,
|
58
|
-
window_size: int,
|
59
|
-
chunk_size: int,
|
60
|
-
samp_rate: float) -> None:
|
61
|
-
|
62
|
-
if not is_power_of_two(window_size):
|
63
|
-
raise ValueError((f"Window size must be some power of two. "
|
64
|
-
f"Got {window_size} [samples]"))
|
65
|
-
|
66
|
-
window_interval = window_size*(1/samp_rate)
|
67
|
-
if window_interval > chunk_size:
|
68
|
-
raise ValueError((f"The windowing interval must be strictly less than the chunk size. "
|
69
|
-
f"Computed the windowing interval to be {window_interval} [s], "
|
70
|
-
f"but the chunk size is {chunk_size} [s]"))
|
71
|
-
|
72
|
-
try:
|
73
|
-
window_params = (window_type,
|
74
|
-
*window_kwargs.values())
|
75
|
-
_ = get_window(window_params, window_size)
|
76
|
-
except Exception as e:
|
77
|
-
raise Exception((f"An error has occurred while validating the window. "
|
78
|
-
f"Got {str(e)}"))
|
79
|
-
|
80
|
-
|
81
|
-
def hop(hop: int):
|
82
|
-
if hop < 0:
|
83
|
-
raise ValueError((f"Window hop must be strictly positive. "
|
84
|
-
f"Got {hop} [samples]"))
|
85
|
-
|
86
|
-
|
87
|
-
def center_freq_strictly_positive(center_freq: float):
|
88
|
-
if center_freq <= 0:
|
89
|
-
raise ValueError((f"Center frequency must be strictly positive. "
|
90
|
-
f"Got {center_freq*1e-6} [MHz]"))
|
91
|
-
|
92
|
-
|
93
|
-
def bandwidth_strictly_positive(bandwidth: float) -> None:
|
94
|
-
if bandwidth < 0:
|
95
|
-
raise ValueError((f"Bandwidth must be non-negative. "
|
96
|
-
f"Got {bandwidth*1e-6} [MHz]"))
|
97
|
-
|
98
|
-
|
99
|
-
def nyquist_criterion(samp_rate: int,
|
100
|
-
bandwidth: float) -> None:
|
101
|
-
if samp_rate < bandwidth:
|
102
|
-
raise ValueError((f"Sample rate must be greater than or equal to the bandwidth. "
|
103
|
-
f"Got sample rate {samp_rate} [Hz], and bandwidth {bandwidth} [Hz]"))
|
104
|
-
|
105
|
-
|
106
|
-
def samp_rate_strictly_positive(samp_rate: int) -> None:
|
107
|
-
if samp_rate <= 0:
|
108
|
-
raise ValueError((f"Sample rate must be strictly positive. "
|
109
|
-
f"Got {samp_rate} [Hz]"))
|
110
|
-
|
111
|
-
|
112
|
-
def chunk_size_strictly_positive(chunk_size: int) -> None:
|
113
|
-
if chunk_size <= 0:
|
114
|
-
raise ValueError((f"Chunk size must be strictly positive. "
|
115
|
-
f"Got {chunk_size} [s]"))
|
116
|
-
|
117
|
-
|
118
|
-
def time_resolution(time_resolution: float,
|
119
|
-
chunk_size: int) -> None:
|
120
|
-
if time_resolution < 0:
|
121
|
-
raise ValueError((f"Time resolution must be non-negative. "
|
122
|
-
f"Got {time_resolution} [s]"))
|
123
|
-
|
124
|
-
if time_resolution > chunk_size:
|
125
|
-
raise ValueError(f"Time resolution must be less than or equal to chunk size. "
|
126
|
-
f"Got time resolution {time_resolution} [s], "
|
127
|
-
f"and chunk size {chunk_size} [s]")
|
128
|
-
|
129
|
-
|
130
|
-
def frequency_resolution(frequency_resolution: float,
|
131
|
-
bandwidth: float = None) -> None:
|
132
|
-
if frequency_resolution < 0:
|
133
|
-
raise ValueError((f"Frequency resolution must be non-negative. "
|
134
|
-
f"Got {frequency_resolution} [Hz]"))
|
135
|
-
|
136
|
-
if bandwidth is not None and frequency_resolution >= bandwidth:
|
137
|
-
raise ValueError((f"Frequency resolution must be less than the bandwidth. "
|
138
|
-
f"Got frequency resolution to be {frequency_resolution} [Hz], "
|
139
|
-
f"with bandwidth {bandwidth} [Hz]"))
|
140
|
-
|
141
|
-
|
142
|
-
def chunk_key(chunk_key: str,
|
143
|
-
expected_chunk_key: str) -> None:
|
144
|
-
if chunk_key != expected_chunk_key:
|
145
|
-
raise ValueError((f"Expected {expected_chunk_key} for the chunk key. "
|
146
|
-
f"Got {chunk_key}"))
|
147
|
-
|
148
|
-
|
149
|
-
def event_handler_key(event_handler_key: str,
|
150
|
-
expected_event_handler_key: str) -> None:
|
151
|
-
if event_handler_key != expected_event_handler_key:
|
152
|
-
raise ValueError((f"Expected {expected_event_handler_key} for the event handler key. "
|
153
|
-
f"Got {event_handler_key}"))
|
154
|
-
|
155
|
-
|
156
|
-
def gain_is_negative(gain: float) -> None:
|
157
|
-
if gain > 0:
|
158
|
-
raise ValueError(f"Gain must be non-positive. "
|
159
|
-
f"Got {gain} [dB]")
|
160
|
-
|
161
|
-
|
162
|
-
def _compute_num_steps_per_sweep(min_freq: float,
|
163
|
-
max_freq: float,
|
164
|
-
samp_rate: int,
|
165
|
-
freq_step: float) -> int:
|
166
|
-
return floor((max_freq - min_freq + samp_rate/2) / freq_step)
|
167
|
-
|
168
|
-
|
169
|
-
def num_steps_per_sweep(min_freq: float,
|
170
|
-
max_freq: float,
|
171
|
-
samp_rate: int,
|
172
|
-
freq_step: float) -> None:
|
173
|
-
num_steps_per_sweep = _compute_num_steps_per_sweep(min_freq,
|
174
|
-
max_freq,
|
175
|
-
samp_rate,
|
176
|
-
freq_step)
|
177
|
-
if num_steps_per_sweep <= 1:
|
178
|
-
raise ValueError((f"We need strictly greater than one step per sweep. "
|
179
|
-
f"Computed {num_steps_per_sweep} step per sweep"))
|
180
|
-
|
181
|
-
|
182
|
-
def sweep_interval(min_freq: float,
|
183
|
-
max_freq: float,
|
184
|
-
samp_rate: int,
|
185
|
-
freq_step: float,
|
186
|
-
samples_per_step: int,
|
187
|
-
chunk_size: float) -> None:
|
188
|
-
num_steps_per_sweep = _compute_num_steps_per_sweep(min_freq,
|
189
|
-
max_freq,
|
190
|
-
samp_rate,
|
191
|
-
freq_step)
|
192
|
-
num_samples_per_sweep = num_steps_per_sweep * samples_per_step
|
193
|
-
sweep_interval = num_samples_per_sweep * 1/samp_rate
|
194
|
-
if sweep_interval > chunk_size:
|
195
|
-
raise ValueError((f"Sweep interval must be less than the chunk size. "
|
196
|
-
f"The computed sweep interval is {sweep_interval} [s], "
|
197
|
-
f"but the given chunk size is {chunk_size} [s]"))
|
198
|
-
|
199
|
-
|
200
|
-
def num_samples_per_step(samples_per_step: int,
|
201
|
-
window_size: int) -> None:
|
202
|
-
if window_size >= samples_per_step:
|
203
|
-
raise ValueError((f"Window size must be strictly less than the number of samples per step. "
|
204
|
-
f"Got window size {window_size} [samples], which is more than or equal "
|
205
|
-
f"to the number of samples per step {samples_per_step}"))
|
206
|
-
|
207
|
-
|
208
|
-
def non_overlapping_steps(freq_step: float,
|
209
|
-
samp_rate: int) -> None:
|
210
|
-
if freq_step < samp_rate:
|
211
|
-
raise NotImplementedError(f"SPECTRE does not yet support spectral steps overlapping in frequency. "
|
212
|
-
f"Got frequency step {freq_step/1e6} [MHz] which is less than the sample "
|
213
|
-
f"rate {samp_rate/1e6} [MHz]")
|
214
|
-
|
215
|
-
|
216
|
-
def step_interval(samples_per_step: int,
|
217
|
-
samp_rate: int,
|
218
|
-
api_latency: float) -> None:
|
219
|
-
step_interval = samples_per_step * 1/samp_rate # [s]
|
220
|
-
if step_interval < api_latency:
|
221
|
-
warning_message = (f"The computed step interval of {step_interval} [s] is of the order of empirically "
|
222
|
-
f"derived api latency {api_latency} [s]; you may experience undefined behaviour!")
|
223
|
-
warnings.warn(warning_message)
|
224
|
-
_LOGGER.warning(warning_message)
|
225
|
-
|
226
|
-
|
227
|
-
def watch_extension(watch_extension: str,
|
228
|
-
target_extension: str) -> None:
|
229
|
-
if watch_extension != target_extension:
|
230
|
-
raise ValueError((f"Expected {target_extension} for the watch extension. "
|
231
|
-
f"Got {watch_extension}"))
|
@@ -1,101 +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
|
-
import subprocess
|
7
|
-
import shutil
|
8
|
-
import gzip
|
9
|
-
from datetime import datetime
|
10
|
-
from typing import Optional
|
11
|
-
|
12
|
-
from spectre_core.cfg import (
|
13
|
-
DEFAULT_DATETIME_FORMAT,
|
14
|
-
CALLISTO_INSTRUMENT_CODES
|
15
|
-
)
|
16
|
-
from spectre_core.cfg import get_chunks_dir_path
|
17
|
-
|
18
|
-
temp_dir = os.path.join(os.environ['SPECTRE_DATA_DIR_PATH'], "tmp")
|
19
|
-
|
20
|
-
def get_chunk_name(station: str, date: str, time: str, instrument_code: str) -> str:
|
21
|
-
dt = datetime.strptime(f"{date}T{time}", '%Y%m%dT%H%M%S')
|
22
|
-
formatted_time = dt.strftime(DEFAULT_DATETIME_FORMAT)
|
23
|
-
return f"{formatted_time}_callisto-{station.lower()}-{instrument_code}.fits"
|
24
|
-
|
25
|
-
|
26
|
-
def get_chunk_components(gz_path: str):
|
27
|
-
file_name = os.path.basename(gz_path)
|
28
|
-
if not file_name.endswith(".fit.gz"):
|
29
|
-
raise ValueError(f"Unexpected file extension in {file_name}. Expected .fit.gz")
|
30
|
-
|
31
|
-
file_base_name = file_name.rstrip(".fit.gz")
|
32
|
-
parts = file_base_name.split('_')
|
33
|
-
if len(parts) != 4:
|
34
|
-
raise ValueError("Filename does not conform to the expected format of [station]_[date]_[time]_[instrument_code]")
|
35
|
-
|
36
|
-
return parts
|
37
|
-
|
38
|
-
|
39
|
-
def get_chunk_path(gz_path: str) -> str:
|
40
|
-
station, date, time, instrument_code = get_chunk_components(gz_path)
|
41
|
-
fits_chunk_name = get_chunk_name(station, date, time, instrument_code)
|
42
|
-
chunk_start_time = fits_chunk_name.split('_')[0]
|
43
|
-
chunk_start_datetime = datetime.strptime(chunk_start_time, DEFAULT_DATETIME_FORMAT)
|
44
|
-
chunk_parent_path = get_chunks_dir_path(year = chunk_start_datetime.year,
|
45
|
-
month = chunk_start_datetime.month,
|
46
|
-
day = chunk_start_datetime.day)
|
47
|
-
if not os.path.exists(chunk_parent_path):
|
48
|
-
os.makedirs(chunk_parent_path)
|
49
|
-
return os.path.join(chunk_parent_path, fits_chunk_name)
|
50
|
-
|
51
|
-
|
52
|
-
def unzip_file_to_chunks(gz_path: str):
|
53
|
-
fits_path = get_chunk_path(gz_path)
|
54
|
-
with gzip.open(gz_path, 'rb') as f_in, open(fits_path, 'wb') as f_out:
|
55
|
-
shutil.copyfileobj(f_in, f_out)
|
56
|
-
|
57
|
-
|
58
|
-
def unzip_to_chunks():
|
59
|
-
for entry in os.scandir(temp_dir):
|
60
|
-
if entry.is_file() and entry.name.endswith('.gz'):
|
61
|
-
unzip_file_to_chunks(entry.path)
|
62
|
-
os.remove(entry.path)
|
63
|
-
|
64
|
-
|
65
|
-
def download_callisto_data(instrument_code: str,
|
66
|
-
year: int,
|
67
|
-
month: int,
|
68
|
-
day: int):
|
69
|
-
date_str = f"{year:04d}/{month:02d}/{day:02d}"
|
70
|
-
base_url = f"http://soleil.i4ds.ch/solarradio/data/2002-20yy_Callisto/{date_str}/"
|
71
|
-
command = [
|
72
|
-
'wget', '-r', '-l1', '-nd', '-np',
|
73
|
-
'-R', '.tmp',
|
74
|
-
'-A', f'{instrument_code}*.fit.gz',
|
75
|
-
'-P', temp_dir,
|
76
|
-
base_url
|
77
|
-
]
|
78
|
-
|
79
|
-
try:
|
80
|
-
subprocess.run(command, check=True)
|
81
|
-
except subprocess.CalledProcessError as e:
|
82
|
-
print(f"An error occurred: {e}")
|
83
|
-
|
84
|
-
def fetch_chunks(instrument_code: Optional[str],
|
85
|
-
year: Optional[int],
|
86
|
-
month: Optional[int],
|
87
|
-
day: Optional[int]):
|
88
|
-
|
89
|
-
|
90
|
-
if (year is None) or (month is None) or (day is None):
|
91
|
-
raise ValueError(f"All of year, month and day should be specified")
|
92
|
-
|
93
|
-
if not os.path.exists(temp_dir):
|
94
|
-
os.mkdir(temp_dir)
|
95
|
-
|
96
|
-
if instrument_code not in CALLISTO_INSTRUMENT_CODES:
|
97
|
-
raise ValueError(f"No match found for '{instrument_code}'. Expected one of {CALLISTO_INSTRUMENT_CODES}")
|
98
|
-
|
99
|
-
download_callisto_data(instrument_code, year, month, day)
|
100
|
-
unzip_to_chunks()
|
101
|
-
shutil.rmtree(temp_dir)
|
@@ -1,74 +0,0 @@
|
|
1
|
-
spectre_core/__init__.py,sha256=oFSWmGoXQLK5X5xHvWzTdNr9amuaiiGjZirXZVogACU,154
|
2
|
-
spectre_core/cfg.py,sha256=v9_yxV63rHMcSAsAFbWFBRDeElgcrDdY3yzGXFGJyxQ,3155
|
3
|
-
spectre_core/dynamic_imports.py,sha256=hZbFA9QSVUmAA779qrwHe6RylpjeAG_L2KTVrRZE-Qk,987
|
4
|
-
spectre_core/exceptions.py,sha256=i1uLL64DLESdzXTAPTsqc4Yg6LeU-ItOm5rhDlrDv7w,663
|
5
|
-
spectre_core/logging.py,sha256=wxhi9UubjfKtd5lpG3tklr8lJDDR0cUoA3y4GLK6wE8,6486
|
6
|
-
spectre_core/chunks/__init__.py,sha256=KqEz43Ifjbw_1cMdxt4s7iEUCOGmFruNN63qU2mgcmY,7148
|
7
|
-
spectre_core/chunks/base.py,sha256=wl2jqPTcmpK8uxnl85lDcEmpOrvZ55AvdmCdtphI3xs,5096
|
8
|
-
spectre_core/chunks/chunk_register.py,sha256=sS-T6d59zbh8_trr_7bYlq2O9Ak7k_XXHM6-yalwxaE,435
|
9
|
-
spectre_core/chunks/factory.py,sha256=gi0x7nsZZR8HUBxnpEfwZG5fI1jSzM2OVPwGR8i45YE,1133
|
10
|
-
spectre_core/chunks/library/__init__.py,sha256=w2G2Ew_yLK1q--1pwN-UsDSSa73Z6VHnn3jC-XXQNWE,272
|
11
|
-
spectre_core/chunks/library/callisto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
-
spectre_core/chunks/library/callisto/chunk.py,sha256=J_xZIL_9YChLZSK1pMjQZmNoUpcENPXeLlu7x7TbPZI,3931
|
13
|
-
spectre_core/chunks/library/fixed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
|
-
spectre_core/chunks/library/fixed/chunk.py,sha256=ckBiEtSa6_S06d_H9LQ0ske5JT2ycF-LstWbDX1oo1c,6941
|
15
|
-
spectre_core/chunks/library/sweep/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
spectre_core/chunks/library/sweep/chunk.py,sha256=bXpC43kylsaAc88VEc0lnLy8AFXZivejqXUyovDz51U,21219
|
17
|
-
spectre_core/file_handlers/base.py,sha256=PbZkgCeZnkkO0TstuFf39oXh8VQDzwlEhwMWzplUDB0,1727
|
18
|
-
spectre_core/file_handlers/configs.py,sha256=5V_egP1R5uXsCbbG_NcHorpY6wJCderBk0KBT3LM3OI,8483
|
19
|
-
spectre_core/file_handlers/json.py,sha256=PBwjtM29jqfa9ozeRIuarkCJBD8uYIKyDCbM1V2GmtE,1230
|
20
|
-
spectre_core/file_handlers/text.py,sha256=K84BIab_qmbR5igCVJZu3uE47ykpM_bnsasd3WGNEuo,677
|
21
|
-
spectre_core/plotting/__init__.py,sha256=ZRQmBzZ0HWcVDaM5a8AneGbyHwx7dhtBs2z5H8VVspc,192
|
22
|
-
spectre_core/plotting/base.py,sha256=4HhPPP7BNe5_SUAl1Ee52_QP62Zzh3kmNJwLzCHKG3c,4808
|
23
|
-
spectre_core/plotting/factory.py,sha256=pYil7PbTs3e08ek6nq-y8mSEtNu7DI6uloiCwsuIoOw,940
|
24
|
-
spectre_core/plotting/format.py,sha256=Et-uc4juDl_2spLRZOzqaUVBP8-J3LPnV5M6CllM74E,512
|
25
|
-
spectre_core/plotting/panel_register.py,sha256=rsmG2hXnvVOy6vfWsEZlZQAXej7bRtqtvjnXObyUCg4,351
|
26
|
-
spectre_core/plotting/panel_stack.py,sha256=fB1kz9NgsnMl4l41cncNPaVmg5DtYRRvO4lhX8OLOOo,5239
|
27
|
-
spectre_core/plotting/library/__init__.py,sha256=lQhj4kme2eKb-JSrHvLWkAjI7eVqexOxxUguo8LUXno,270
|
28
|
-
spectre_core/plotting/library/frequency_cuts/panel.py,sha256=LtCWNad4Z1gxBOxi_Ni1d6KZxsgoR5Mbm2tWXN7VDqI,2772
|
29
|
-
spectre_core/plotting/library/integral_over_frequency/panel.py,sha256=tvro2MCtY4Q0q7WdMUz9eW5Cvrweeqqse20q3x4D4fM,1274
|
30
|
-
spectre_core/plotting/library/spectrogram/panel.py,sha256=CAaPz7sDYoWZ3-4Jb1kVRu9bvJYaBRiXvoMkV7QXWqk,3556
|
31
|
-
spectre_core/plotting/library/time_cuts/panel.py,sha256=u9Sbnwy6ex61y5Jl-D77HlYvuuXdK8_YB-o2gCovCTY,2947
|
32
|
-
spectre_core/post_processing/__init__.py,sha256=pRzy46C32j9sfQjbCJKuVw0tQjuOErfrievq2m1Vx8c,239
|
33
|
-
spectre_core/post_processing/base.py,sha256=h0qtoigD6ZBkHm0_wV1lJX55AwppKC5htfXVWUWMMLQ,5403
|
34
|
-
spectre_core/post_processing/event_handler_register.py,sha256=DwlkU92IFkZ1_qvGfhep_OfuqTOIR_efY5qFpn1perw,498
|
35
|
-
spectre_core/post_processing/factory.py,sha256=7KZBysPymsYhpW4KI4H1jvjssmZY1mIvhkln91joeUM,1133
|
36
|
-
spectre_core/post_processing/post_processor.py,sha256=dQX71pUh83i6mNedTk-EVAYnxjAUs6S2Q8HkCXkiwns,1428
|
37
|
-
spectre_core/post_processing/library/__init__.py,sha256=vEwAnAV-sv7WcNYOdnjr1JVqZYr29Wr2cv01eoxwdmg,282
|
38
|
-
spectre_core/post_processing/library/fixed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
|
-
spectre_core/post_processing/library/fixed/event_handler.py,sha256=wfOdahnY78Movu0ESbuUy-QmpBbXhNk6_DKzsXS9G0Y,1394
|
40
|
-
spectre_core/post_processing/library/sweep/event_handler.py,sha256=ap7K8hOxgb8wsX9uJfEDW7lYXCyNKFlsva7vinW_6Ak,2194
|
41
|
-
spectre_core/receivers/__init__.py,sha256=kKfhqrGs9sSPGLbrpTqScv816iPZOvT3ry3zSMcqLkM,227
|
42
|
-
spectre_core/receivers/base.py,sha256=szW7BfJEQiZ7dEiD_Oyk2lG16Kns3zKmnl_lIqKHP1o,16478
|
43
|
-
spectre_core/receivers/factory.py,sha256=aE-Yw_cnlkhRe5HxK0JqhDzd2AwZcKmB2QkAKwaq27Y,873
|
44
|
-
spectre_core/receivers/receiver_register.py,sha256=xHcRnT-3NQxyIWL3nyT3P9qT14Wl5liM9HbflOvOUAM,617
|
45
|
-
spectre_core/receivers/validators.py,sha256=ZWnFsZJsbHBB-ZIrp3WK8BPqb4ev7TYm6VPQPbljTE4,9965
|
46
|
-
spectre_core/receivers/library/__init__.py,sha256=xmtF5p3_ZkGfso_pKnxSgUcXXFLEBwERGPq1Pek7cOU,274
|
47
|
-
spectre_core/receivers/library/rsp1a/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
|
-
spectre_core/receivers/library/rsp1a/receiver.py,sha256=xs_aNMhwIYD83KwutizjBziyu9XsfHqGqvQXOFcglz4,2224
|
49
|
-
spectre_core/receivers/library/rsp1a/gr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
50
|
-
spectre_core/receivers/library/rsp1a/gr/fixed.py,sha256=P39JwuOe-ydk9m8BNOHFDpzaqjenRnTIA7tpECshfUM,3369
|
51
|
-
spectre_core/receivers/library/rsp1a/gr/sweep.py,sha256=9ZAoI0u1814lOM_cVwJnLUNSgM3VMstfvWKP67dVEV4,4741
|
52
|
-
spectre_core/receivers/library/rspduo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
|
-
spectre_core/receivers/library/rspduo/receiver.py,sha256=EMBFWwFjoIP2buwwamyb3uaYqMQwQHMzNi-we7_OfcU,3377
|
54
|
-
spectre_core/receivers/library/rspduo/gr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
55
|
-
spectre_core/receivers/library/rspduo/gr/tuner_1_fixed.py,sha256=xO9F_GBwgNnebrxoZYPwbXLL2HmH0CNLrVlpQ6Z7bx0,3887
|
56
|
-
spectre_core/receivers/library/rspduo/gr/tuner_1_sweep.py,sha256=gR5arbjvJBJjCdQnpAdwNd7bEtnvDbhL_ttUhKk0Zss,5066
|
57
|
-
spectre_core/receivers/library/rspduo/gr/tuner_2_fixed.py,sha256=O86R3tuJ-7cZXfVECuZkds-wCxKdBKJ8MhVACJFgzeo,4130
|
58
|
-
spectre_core/receivers/library/rspduo/gr/tuner_2_sweep.py,sha256=4JgJ2QRO5DFPfqUTHBojj8ERR_4QpHyTBqnAXhOzykE,4747
|
59
|
-
spectre_core/receivers/library/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
60
|
-
spectre_core/receivers/library/test/receiver.py,sha256=hr6t8jpUwVEP2zMpjORKpzqLaBllxmbqF1fQE1DLWQw,9329
|
61
|
-
spectre_core/receivers/library/test/gr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
62
|
-
spectre_core/receivers/library/test/gr/cosine_signal_1.py,sha256=6XgYjYMh-QNPs_UUGUQcU_VQFr6BG4OLdsW-M-RU5Ww,2943
|
63
|
-
spectre_core/receivers/library/test/gr/tagged_staircase.py,sha256=5rJHbB-3vdXjqT8DrcAGUSebaAqZ5RQtYHBWgH9iU2E,3465
|
64
|
-
spectre_core/spectrograms/__init__.py,sha256=OFW82_itCktN8dFm_UO5gbgmzFs51v9KEHrSZWLuIUY,155
|
65
|
-
spectre_core/spectrograms/analytical.py,sha256=c5X40YgLlutP8sbz6dqODZaCmZ98sAjubO3PtWj7ZZw,8657
|
66
|
-
spectre_core/spectrograms/array_operations.py,sha256=6qKd3y2z6Pmu_U8yxTR4FN4eMhS10KgZ8rH60B_IXqw,2577
|
67
|
-
spectre_core/spectrograms/spectrogram.py,sha256=EqeQyvjzjoKaXou4vJbPbRx85BeMPB9iiJtFZcCyimI,19488
|
68
|
-
spectre_core/spectrograms/transform.py,sha256=xo7ch2lrRkJ54cfIqbkaTHNo_AptBuK0zRELPf7SfIE,13860
|
69
|
-
spectre_core/web_fetch/callisto.py,sha256=yW0NkmHqfUf2uYgJjSRxou6e65_mYciPhHwQIvKLK_w,3630
|
70
|
-
spectre_core-0.0.9.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
71
|
-
spectre_core-0.0.9.dist-info/METADATA,sha256=15Uh828ojJg6w-HCrIv7nka9wT_eVhv9svE33hmHI7k,42150
|
72
|
-
spectre_core-0.0.9.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
73
|
-
spectre_core-0.0.9.dist-info/top_level.txt,sha256=-UsyjpFohXgZpgcZ9QbVeXhsIyF3Am8RxNFNDV_Ta2Y,13
|
74
|
-
spectre_core-0.0.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|