Divide el disco por su perfil radial de brillo y estira linealmente el residuo. La fotosfera acaba en el 90,9 % del blanco; las manchas, en el negro.
Divides the disc by its own radial brightness profile and stretches the residual linearly. The photosphere ends up at 90.9 % of white; the sunspots, at black.
Cada paso opera sobre la salida del anterior. Los nombres en azul son las funciones del archivo.
Each step operates on the output of the one before it. The names in blue are the functions in the file.
gamma=(1,1), sin autoexposición, 16 bits,
demosaicado AHD, balance de la cámara. La división por el flat exige valores
proporcionales al flujo, y una curva sRGB rompe esa proporcionalidad.
[bajo, alto] al rango
completo, atenuación del último 2,5 % del radio para suprimir el aro del limbo, y
máscara de enfoque en dos escalas cuando --enfoque es mayor que cero.
gamma=(1,1), no auto-exposure, 16 bits,
AHD demosaicing, camera white balance. Division by the flat field demands values
proportional to flux, and an sRGB curve breaks that proportionality.
[bajo, alto] to the full range,
roll-off over the outermost 2.5 % of the radius to suppress the limb ring, and a
two-scale unsharp mask when --enfoque is greater than zero.
Hacia el borde, la línea de visión atraviesa capas más frías y la intensidad cae al 30 % del valor central. El gradiente supera el contraste de una mancha pequeña, así que el estirado va después de quitarlo.
Towards the edge, the line of sight crosses cooler layers and the intensity falls to 30 % of its central value. This radial gradient exceeds the contrast of a small sunspot, so the stretch comes only after it has been removed.
Solo el archivo de entrada es obligatorio. Los valores por omisión están ajustados a un disco de unos 1200 px de diámetro.
Only the input file is compulsory. The defaults are tuned to a disc of some 1200 px in diameter.
Rutas a NEF, CR2, CR3, ARW, DNG y otros RAW que abra libraw, o a TIFF, PNG y JPEG. Admite comodines del shell.
En la Z8, dispara en compresión RAW “sin pérdida”. Los NEF de “Alta eficiencia” usan TicoRAW, que libraw solo decodifica desde la versión 0.21.2; el script detecta ese error y lo indica.
Carpeta de destino. Se crea si no existe.
tiff16, entero de 16 bits, 65536 niveles. Formato de trabajo para Photoshop o Capture One; los 14 bits del NEF caben con margen.
tiff32, coma flotante, valores en [0,1] sin cuantizar. Para cadenas de varias operaciones fotométricas, donde el redondeo se acumula. Lo leen Photoshop, GIMP 2.10 en adelante, PixInsight, Siril e ImageJ.
png16, alternativa portable.
Exporta además el cociente aplanado antes del estirado y del enfoque. En tiff32 se guarda tal cual, con la fotosfera en 1,0; en los formatos enteros se divide por 1,25 para que quepa en el rango.
Es el archivo a llevar al editor para aplicar curvas propias en lugar de la ventana fija del script.
Omite el JPEG de previsualización de 8 bits.
g, r, b: un canal del RAW demosaicado. l: luminancia BT.709 de los tres. super: superpíxel 2×2 sobre el mosaico Bayer crudo sumando los cuatro fotositos de cada celda. superg: igual, con los dos verdes.
Los dos modos super no demosaican y no aplican balance de blancos: el valor es proporcional a los electrones totales de la celda. Salen a la mitad de resolución lineal.
Sobre combinar canales: una celda Bayer 2×2 tiene 1 R, 2 G y 1 B, así que el verde ya recoge la mitad de los fotones. La cota de mejora es √((NR+2NG+NB) / 2NG), es decir ×1,41 con flujo igual en los tres canales y ×1,32 con una película Baader, no √3. Medido sobre mosaico simulado con demosaicado AHD, el superpíxel da ×1,29, que coincide con la predicción. La media de los tres canales demosaicados mide ×1,92, por encima de la cota física: el exceso es paso-bajo de la interpolación de R y B, y se paga en contraste, con 0,52 de retención en manchas de 1 px de radio frente a 0,89 a 1,03 por encima de 3 px.
Paths to NEF, CR2, CR3, ARW, DNG and other RAW files that libraw can open, or to TIFF, PNG and JPEG. Shell wildcards are accepted.
On the Z8, shoot in “lossless” RAW compression. The “High efficiency” NEFs use TicoRAW, which libraw only decodes from version 0.21.2 onwards; the script detects that error and reports it.
Destination folder. It is created if it does not exist.
tiff16, 16-bit integer, 65536 levels. The working format for Photoshop or Capture One; the 14 bits of the NEF fit with room to spare.
tiff32, floating point, values in [0,1] without quantisation. For chains of several photometric operations, where rounding accumulates. It is read by Photoshop, GIMP 2.10 onwards, PixInsight, Siril and ImageJ.
png16, a portable alternative.
Additionally exports the flattened ratio, before the stretch and the sharpening. In tiff32 it is saved as it stands, with the photosphere at 1.0; in the integer formats it is divided by 1.25 so that it fits within the range.
This is the file to take into the editor in order to apply curves of your own instead of the fixed window of the script.
Omits the 8-bit preview JPEG.
g, r, b: one channel of the demosaiced RAW. l: BT.709 luminance of the three. super: a 2×2 superpixel over the raw Bayer mosaic, summing the four photosites of each cell. superg: the same, with the two greens.
The two super modes neither demosaic nor apply white balance: the value is proportional to the total electrons in the cell. They come out at half the linear resolution.
On combining channels: a 2×2 Bayer cell holds 1 R, 2 G and 1 B, so the green already collects half the photons. The upper bound on the gain is √((NR+2NG+NB) / 2NG), that is, ×1.41 with equal flux in all three channels and ×1.32 behind a Baader film, not √3. Measured on a simulated mosaic with AHD demosaicing, the superpixel gives ×1.29, in agreement with the prediction. The mean of the three demosaiced channels measures ×1.92, above the physical bound: the excess is the low-pass of the R and B interpolation, and it is paid for in contrast, with 0.52 retention on sunspots of 1 px radius against 0.89 to 1.03 above 3 px.
Promedia bloques de N×N píxeles antes de todo lo demás. Con N = 2 la relación señal/ruido se duplica y el archivo baja a la cuarta parte.
Aplicable cuando la escala de imagen está por debajo del límite de resolución del conjunto, como en tu caso con 1,58 arcsec/px.
Trata todos los archivos de la línea de órdenes como una ráfaga: alinea por el
centro del disco y promedia. Genera una sola salida, con sufijo
_apiladoN.
La alineación es solo traslación: corrige arrastre de seguimiento y vibraciones. La rotación de campo y la distorsión instantánea del seeing quedan fuera.
Recorta al disco con un margen del 15 % del radio.
Con 45 Mpx y el disco ocupando una fracción del fotograma, acelera todo lo que venga después.
Averages blocks of N×N pixels before anything else. With N = 2 the signal-to-noise ratio doubles and the file drops to a quarter of its size.
Worth using when the image scale lies below the resolution limit of the whole assembly, as it does in your case at 1.58 arcsec/px.
Treats every file on the command line as a single burst: aligns on the centre of the
disc and averages. It produces one output, with the suffix _apiladoN.
The alignment is translation only: it corrects tracking drift and vibration. Field rotation and the instantaneous distortion of the seeing lie outside its reach.
Crops to the disc with a margin of 15 % of the radius.
With 45 Mpx and the disc occupying a fraction of the frame, it speeds up everything that follows.
Definen qué valor del cociente se convierte en negro y cuál en blanco. La fotosfera, que vale 1,0 por construcción, acaba en (1 − bajo) / (alto − bajo) del rango.
These set which value of the ratio becomes black and which becomes white. The photosphere, which is 1.0 by construction, ends up at (1 − bajo) / (alto − bajo) of the range.
Disco sintético con oscurecimiento del limbo, cinco manchas y ruido de fotones, procesado con el mismo algoritmo. Los controles actualizan las tres etapas.
A synthetic disc with limb darkening, five sunspots and photon noise, put through the same algorithm. The controls update all three stages.
Valor del cociente que se mapea a negro. Fija cuánta estructura interna conservan las umbras.
A 0,40 conserva gradiente dentro de la umbra y aplana el contraste general. Por encima de 0,70 las umbras llegan a negro puro y pierden toda su estructura.
Valor del cociente que se mapea a blanco. Determina cuánto ruido de la fotosfera se va a blanco puro y, con ello, cuán limpio queda el disco.
Primer mando a tocar. Con 1,02 el disco queda más limpio y las manchas pequeñas resaltan más; con 1,10 aparece todo el grano.
Ganancia de la máscara de enfoque, que actúa a sigma 2 px con ganancia G y a sigma 8 px con ganancia 0,375 G.
Con tu escala de imagen, ponlo a 0. El análisis por
bandas de tu archivo sitúa el pico de potencia en sigma 2 a 3 px, donde actúa esta
máscara, y ahí el contenido es ruido. Sube de 0 con discos por encima de unos
1500 px de diámetro.
The value of the ratio that is mapped to black. It fixes how much internal structure the umbrae retain.
At 0.40 it preserves the gradient within the umbra and flattens the overall contrast. Above 0.70 the umbrae reach pure black and lose all their structure.
The value of the ratio that is mapped to white. It determines how much of the photospheric noise goes to pure white and, with that, how clean the disc looks.
The first control to reach for. At 1.02 the disc is cleaner and the small sunspots stand out more; at 1.10 the whole grain appears.
Gain of the unsharp mask, which acts at sigma 2 px with gain G and at sigma 8 px with gain 0.375 G.
At your image scale, set it to 0. The band analysis of your
file places the power peak at sigma 2 to 3 px, exactly where this mask acts, and there
the content is noise. Raise it above 0 for discs beyond some 1500 px in diameter.
El disco en luz blanca está limitado por ruido de fotones y por seeing, y ambos se promedian. Con 100 fotogramas el ruido cae un factor 10.
Fotosfera y umbra se diferencian en un factor 4 o 5, poco más de 2 pasos. La Z8 da más de 12 pasos útiles en 14 bits, así que la escena cabe en una exposición. El límite está en la relación señal/ruido.
In white light the disc is limited by photon noise and by seeing, and both average out. With 100 frames the noise falls by a factor of 10.
Photosphere and umbra differ by a factor of 4 or 5, little more than 2 stops. The Z8 gives over 12 usable stops in 14 bits, so the scene fits within a single exposure. The limit lies in the signal-to-noise ratio.
La horquilla sirve para calibrar, no para fusionar: al empezar la sesión, tres o cuatro exposiciones separadas un paso, te quedas con la que deja la fotosfera entre el 70 y el 80 % del rango y bloqueas esos valores. Después, ráfagas idénticas. Fusionar exposiciones distintas aporta algo con corona de eclipse o protuberancias, que abarcan varios órdenes de magnitud.
The bracket is there to calibrate, not to merge: at the start of the session, three or four exposures a stop apart, and you keep the one that leaves the photosphere between 70 and 80 % of the range and lock those values in. Identical bursts thereafter. Merging different exposures earns its keep with the eclipse corona or with prominences, which span several orders of magnitude.
El polvo en el filtro o en el sensor produce puntos oscuros fijos con el aspecto de manchas pequeñas. La prueba es geométrica: gira el filtro 90° y repite la ráfaga. Las manchas mantienen su posición respecto al disco; el polvo se desplaza con el filtro. Segundo control: desplaza el encuadre unos cientos de píxeles y el polvo del sensor se queda quieto en el fotograma mientras el disco se mueve.
Un fotograma con la tapa puesta y los mismos ajustes localiza los píxeles calientes, que en la salida aparecen como puntos brillantes aislados.
Dust on the filter or on the sensor produces fixed dark points with the look of small sunspots. The test is geometrical: rotate the filter by 90° and repeat the burst. The sunspots hold their position relative to the disc; the dust travels with the filter. A second check: shift the framing by a few hundred pixels and the sensor dust stays put in the frame while the disc moves.
A dark frame — cap on, same settings — locates the hot pixels, which appear in the output as isolated bright points.
python procesar_sol.py Z80_8280.NEF --recorte --bin 2 --enfoque 0 --alto 1.02
Sin amplificación de ruido, con binning que duplica la señal/ruido y el techo bajado para limpiar la fotosfera.
No noise amplification, binning that doubles the signal-to-noise ratio, and the ceiling lowered to clean up the photosphere.
python procesar_sol.py Z80_82*.NEF --apilar --bin 2 --enfoque 0 --recorte --salida ./out
Con 100 fotogramas puedes estrechar más la ventana: prueba después
--alto 1.01, que sin apilado solo daría grano.
With 100 frames you can narrow the window further: try --alto 1.01
afterwards, which without stacking would give nothing but grain.
python procesar_sol.py Z80_8280.NEF --formato tiff32 --lineal --enfoque 0 --recorte
Genera el cociente aplanado sin estirar, en coma flotante. Aplica tus curvas sobre
_lineal.tif y usa _manchas.tif como referencia de dónde está
cada estructura.
Produces the flattened ratio without any stretch, in floating point. Apply your own
curves to _lineal.tif and use _manchas.tif as a reference for where
each structure lies.
Toda la cadena posterior al revelado es fotométrica: la división por el flat y el estirado operan sobre una magnitud proporcional al flujo en una banda.
El color del Sol en luz blanca procede del filtro. La película Baader da un blanco azulado y el cristal un naranja. Para un tono cálido, aplícalo al final en el editor como decisión estética.
Everything in the chain after development is photometric: the division by the flat field and the stretch both operate on a quantity proportional to the flux in one band.
The colour of the Sun in white light comes from the filter. The Baader film gives a bluish white and the glass an orange. For a warm tone, apply it at the end in the editor, as an aesthetic decision — false colour, not measurement.