Move the processing code under pipeline/
Preparing to merge this repository into a combined astrophotography repo. session-scripts/ becomes pipeline/ because the scripts import layout.py from their own directory and must stay together, and because 'pipeline' says what it is rather than how it came about. observing/ stays at the top level: observing plans are not processing code.
This commit is contained in:
parent
653ca103cd
commit
c6299f41ab
53 changed files with 0 additions and 0 deletions
|
|
@ -1,62 +0,0 @@
|
|||
"""Side-by-side of the three renderings, full field and a matched core crop.
|
||||
|
||||
Same pixels in all three panels, so any difference is processing and nothing
|
||||
else.
|
||||
"""
|
||||
import os
|
||||
|
||||
import matplotlib
|
||||
matplotlib.use("Agg")
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
|
||||
import layout
|
||||
|
||||
OUT = layout.SESSION
|
||||
# The finished renderings live in their own directory: they are the
|
||||
# deliverables, and keeping them apart from the masters, the
|
||||
# intermediates and the analysis figures makes it obvious which
|
||||
# files are meant to be looked at.
|
||||
FINAL = layout.path("final")
|
||||
PANELS = [
|
||||
("NGC5128-final-1-stacked.png", "1. Stacked + standard stretch",
|
||||
"align, average, stretch - nothing else"),
|
||||
("NGC5128-final-2-processed.png", "2. Conventionally processed",
|
||||
"gradient removal, colour balance, denoise"),
|
||||
("NGC5128-final-3-best.png", "3. Science-informed",
|
||||
"halo-preserving background, solar-analogue colour,\n"
|
||||
"core recovered, star-protected deconvolution"),
|
||||
]
|
||||
CROP = (1950, 1200, 2850, 1875) # the dust lane, at full resolution
|
||||
|
||||
fig, axes = plt.subplots(2, 3, figsize=(21, 11.5),
|
||||
gridspec_kw=dict(height_ratios=[1.35, 1]))
|
||||
fig.patch.set_facecolor("#111111")
|
||||
|
||||
for col, (fname, title, sub) in enumerate(PANELS):
|
||||
im = Image.open(layout.path(fname))
|
||||
wide = im.copy()
|
||||
wide.thumbnail((1500, 1500), Image.LANCZOS)
|
||||
axes[0, col].imshow(np.asarray(wide))
|
||||
axes[0, col].set_title(title, color="white", fontsize=15, pad=10)
|
||||
axes[0, col].text(0.5, -0.055, sub, color="#9fb8d0", fontsize=10,
|
||||
ha="center", va="top", linespacing=1.4, wrap=True,
|
||||
transform=axes[0, col].transAxes)
|
||||
axes[1, col].imshow(np.asarray(im.crop(CROP)))
|
||||
axes[1, col].set_title("core, 1:1", color="#9fb8d0", fontsize=11, pad=6)
|
||||
for row in (0, 1):
|
||||
axes[row, col].set_xticks([])
|
||||
axes[row, col].set_yticks([])
|
||||
for s in axes[row, col].spines.values():
|
||||
s.set_color("#333333")
|
||||
|
||||
fig.suptitle("NGC 5128 (Centaurus A) - iTelescope T32, 2026-07-21 - "
|
||||
"L 12x300s, RGB 4x300s each - the same data, three treatments",
|
||||
color="white", fontsize=17, y=0.975)
|
||||
fig.tight_layout(rect=[0, 0.01, 1, 0.955])
|
||||
fig.subplots_adjust(hspace=0.16)
|
||||
path = layout.path("NGC5128-final-comparison.jpg")
|
||||
fig.savefig(path, dpi=100, facecolor=fig.get_facecolor(),
|
||||
pil_kwargs={"quality": 92})
|
||||
print("wrote", path)
|
||||
Loading…
Add table
Add a link
Reference in a new issue