jolly-roger 0.2.0__tar.gz → 0.3.0__tar.gz
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.
Potentially problematic release.
This version of jolly-roger might be problematic. Click here for more details.
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/PKG-INFO +1 -1
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/_version.py +2 -2
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/plots.py +12 -5
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/tractor.py +12 -11
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.copier-answers.yml +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.git_archival.txt +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.gitattributes +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.github/CONTRIBUTING.md +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.github/actions/setup-deps/action.yml +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.github/dependabot.yml +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.github/release.yml +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.github/workflows/cd.yml +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.github/workflows/ci.yml +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.gitignore +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.pre-commit-config.yaml +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/.readthedocs.yaml +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/LICENSE +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/README.md +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/docs/conf.py +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/docs/index.md +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/__init__.py +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/_version.pyi +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/baselines.py +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/delays.py +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/flagger.py +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/hour_angles.py +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/logging.py +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/py.typed +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/jolly_roger/uvws.py +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/noxfile.py +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/pyproject.toml +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/tests/test_hour_angles.py +0 -0
- {jolly_roger-0.2.0 → jolly_roger-0.3.0}/tests/test_package.py +0 -0
|
@@ -85,15 +85,17 @@ def plot_baseline_comparison_data(
|
|
|
85
85
|
norm = ImageNormalize(
|
|
86
86
|
after_amp_stokesi, interval=ZScaleInterval(), stretch=SqrtStretch()
|
|
87
87
|
)
|
|
88
|
+
cmap = plt.cm.viridis
|
|
88
89
|
|
|
89
90
|
fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(
|
|
90
|
-
2, 2, figsize=(
|
|
91
|
+
2, 2, figsize=(12, 10), sharex=True, sharey="row"
|
|
91
92
|
)
|
|
92
93
|
im = ax1.pcolormesh(
|
|
93
94
|
before_baseline_data.time,
|
|
94
95
|
before_baseline_data.freq_chan,
|
|
95
96
|
before_amp_stokesi.T,
|
|
96
97
|
norm=norm,
|
|
98
|
+
cmap=cmap,
|
|
97
99
|
)
|
|
98
100
|
ax1.set(
|
|
99
101
|
ylabel=f"Frequency / {before_baseline_data.freq_chan.unit:latex_inline}",
|
|
@@ -104,12 +106,14 @@ def plot_baseline_comparison_data(
|
|
|
104
106
|
after_baseline_data.freq_chan,
|
|
105
107
|
after_amp_stokesi.T,
|
|
106
108
|
norm=norm,
|
|
109
|
+
cmap=cmap,
|
|
107
110
|
)
|
|
108
111
|
ax2.set(
|
|
109
112
|
ylabel=f"Frequency / {after_baseline_data.freq_chan.unit:latex_inline}",
|
|
110
113
|
title="After",
|
|
111
114
|
)
|
|
112
|
-
|
|
115
|
+
for ax in (ax1, ax2):
|
|
116
|
+
fig.colorbar(im, ax=ax, label="Stokes I Amplitude / Jy")
|
|
113
117
|
|
|
114
118
|
# TODO: Move these delay calculations outside of the plotting function
|
|
115
119
|
# And here we calculate the delay information
|
|
@@ -130,6 +134,7 @@ def plot_baseline_comparison_data(
|
|
|
130
134
|
before_delays.delay,
|
|
131
135
|
before_delays_i.T,
|
|
132
136
|
norm=delay_norm,
|
|
137
|
+
cmap=cmap,
|
|
133
138
|
)
|
|
134
139
|
ax3.set(ylabel="Delay / s", title="Before")
|
|
135
140
|
ax4.pcolormesh(
|
|
@@ -137,9 +142,11 @@ def plot_baseline_comparison_data(
|
|
|
137
142
|
after_delays.delay,
|
|
138
143
|
after_delays_i.T,
|
|
139
144
|
norm=delay_norm,
|
|
145
|
+
cmap=cmap,
|
|
140
146
|
)
|
|
141
147
|
ax4.set(ylabel="Delay / s", title="After")
|
|
142
|
-
|
|
148
|
+
for ax in (ax3, ax4):
|
|
149
|
+
fig.colorbar(im, ax=ax, label="Stokes I Amplitude / Jy")
|
|
143
150
|
|
|
144
151
|
if w_delays is not None:
|
|
145
152
|
for ax, baseline_data in zip( # type:ignore[call-overload]
|
|
@@ -152,8 +159,8 @@ def plot_baseline_comparison_data(
|
|
|
152
159
|
ax.plot(
|
|
153
160
|
baseline_data.time,
|
|
154
161
|
w_delays.w_delays[b_idx],
|
|
155
|
-
color="
|
|
156
|
-
linestyle="
|
|
162
|
+
color="tab:red",
|
|
163
|
+
linestyle="-",
|
|
157
164
|
label=f"Delay for {w_delays.object_name}",
|
|
158
165
|
)
|
|
159
166
|
ax.legend()
|
|
@@ -202,17 +202,16 @@ def _get_data_chunk_from_main_table(
|
|
|
202
202
|
logger.debug(f"Length of open table: {table_length} rows")
|
|
203
203
|
|
|
204
204
|
lower_row = 0
|
|
205
|
-
upper_row = chunk_size
|
|
206
205
|
|
|
207
206
|
while lower_row < table_length:
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
ant_1 =
|
|
215
|
-
ant_2 =
|
|
207
|
+
data = ms_table.getcol(data_column, startrow=lower_row, nrow=chunk_size)
|
|
208
|
+
flags = ms_table.getcol("FLAG", startrow=lower_row, nrow=chunk_size)
|
|
209
|
+
uvws = ms_table.getcol("UVW", startrow=lower_row, nrow=chunk_size)
|
|
210
|
+
time_centroid = ms_table.getcol(
|
|
211
|
+
"TIME_CENTROID", startrow=lower_row, nrow=chunk_size
|
|
212
|
+
)
|
|
213
|
+
ant_1 = ms_table.getcol("ANTENNA1", startrow=lower_row, nrow=chunk_size)
|
|
214
|
+
ant_2 = ms_table.getcol("ANTENNA2", startrow=lower_row, nrow=chunk_size)
|
|
216
215
|
|
|
217
216
|
yield DataChunkArray(
|
|
218
217
|
data=data,
|
|
@@ -226,7 +225,6 @@ def _get_data_chunk_from_main_table(
|
|
|
226
225
|
)
|
|
227
226
|
|
|
228
227
|
lower_row += chunk_size
|
|
229
|
-
upper_row += chunk_size
|
|
230
228
|
|
|
231
229
|
|
|
232
230
|
def get_data_chunks(
|
|
@@ -559,7 +557,8 @@ def _tukey_tractor(
|
|
|
559
557
|
taper = 1.0 - taper
|
|
560
558
|
|
|
561
559
|
# Delay with the elevation of the target object
|
|
562
|
-
|
|
560
|
+
# TODO: Allow elevation to be a user parameter
|
|
561
|
+
elevation_mask = w_delays.elevation < tukey_tractor_options.elevation_cut
|
|
563
562
|
taper[elevation_mask[time_idx], :, :] = 1.0
|
|
564
563
|
|
|
565
564
|
# TODO: Handle case of aliased delays
|
|
@@ -619,6 +618,8 @@ class TukeyTractorOptions:
|
|
|
619
618
|
"""apply the taper using the delay towards the target object."""
|
|
620
619
|
target_object: str = "Sun"
|
|
621
620
|
"""The target object to apply the delay towards."""
|
|
621
|
+
elevation_cut: u.Quantity = -1 * u.deg
|
|
622
|
+
"""The elevation cut-off for the target object. Defaults to 0 degrees."""
|
|
622
623
|
|
|
623
624
|
|
|
624
625
|
def tukey_tractor(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|