Image processing of SDO/AIA 193 images

Original Jpeg files from NASA SDO and from NOAA GOES satelites are using the same palette, which is better balanced to show both darker and lighter areas on the Sun, but middle-tone shadows are poorly resolved...


While comparing this with FITS files, I detected the following transfer functions:

On X axis is value 0..1280 with grid by 100, on Y axis is color component 0..255 with grid by 16, low values at bottom...

I failed to guess the original transfer functions, but somehow I simulated them using following expressions for R,G,B components, differing significantly rather only in low parts:
function fR(x) {
  return SClip( (x>=91) ? (Power(Max(0,Log((x-64)/20,10)),1.01) *100 +20) : Power((x/28),3) );
}

function fG(x) {
  return SClip( (x>80) ? (Power(Log(x/12,10),1.7) *58 -36) : (Power((x/20),2) / 3) );
}

function fB(x) {
  return SClip( (x<1800) ? ( (x>300) ? Power(Max(log(x/100,90)-0.08,-10),1.08)*190-10 : Power((x/118),3) ) : Power((x/41.5),1.2) );
}

function SClip(x) {
  var C=240, W=40, S=0.27,
      M=1/(1+exp(0-(x-C)/W/S)); // sigmoid 0 before C-W, 1 after C+w
  return Min(x-x*M+255*M,255); // smooth clip to 255 with linear start...
}


Which produces following transfer functions:

And the color palette:

XML file with the ColorScale Scale193_O.xml, which has been manually edited to remove duplicities, contains both the code and the color-value pairs...
(In this text, "ColorScale" is a mapping from Floating-point values to RGB Colors and/or back...)

For the purpose of examining "shadows" (weak Coronal Holes) in this channel, I apply Contrast(222,41) and Gamma(-133) (implementation see below), which produces following image, and for the purpose of printing, the black border is replaced with white by putting intensity into alpha channel while preserving the solar disk, and copying that onto white background... The third one is same image converted from 1024x1024 FITS file using this ColorScale and copied onto white background:
   

Function for copying onto white background:
  ...
  var Alpha;
  if (WBg) {
    // Make alpha from intensity, preserve inner circle:
    var FMask:=FMap.Clone().Scale(1/255).Clip(0,1);
    FMask.MaskRange(72/255,1).FillEmpty(0).Power(3);
    Rep(10,FMask.BoxCar(5)); // blur
    var BMask:=NBm().Assign(FMask); // convert to New Bitmap image...
    delete FMask;
    BMask.Circle(FMap.Info.Center,FMap.Info.Radius+5*(FMap.Width/1024),'#ffffff');
    Alpha:=(new ByteMap(Bmp.Width,Bmp.Height)).Assign(BMask);
    delete BMask;
    //
    var B2:=NBm(Bmp.Width,Bmp.Height);
    B2.Clear(0xffffffff);
    Bmp.WriteChannel(3,Alpha);
    Bmp.DrawMode:=dmBlend;
    B2.Draw(0,0,Bmp);
    Bmp:=B2;
  }


When processing numeric FITS files, values must be multiplied by a time-dependent coefficient to use a same ColorScale for older and newer files, since the SDO/AIA 193 channel is more and more darker...
The table I determined is in Eval.zip in file Sample/FlowLib.lib in function SDO_response_193()...
Presently (year 2020 and 2021) the multiplier is 2.1113 =~= 1/0.4736 == 1290/611 to match values from start of year 2015, as determined by comparing average limb brightness...

It is possible to apply Histogram Equalization function for even better examining the "shadows" (mildly darker areas). The first image is processed from 2048x2048 Jpeg from NASA, the second image is processed from 1024x1024 FITS file from JSOC. They differ slightly in level of details due to different image resolution...
 

For this, the input Jpeg image is first converted into numeric form using the above mentioned ColorScale, then after the processing, it is converted to image using a ColorScale, where the Contrast and Gamma have already been applied... When compared with previous ColorScale code, at start of SClip function before clipping values to range 0 .. 255 it adds this code:
  x:=Max(IntGamma(Contrast(Max(x,0),222,41),-133),0);

  function IntGamma(x,G) {
    G:=(256-G)/256;
    return 255*Power((x/255),G);
  }
  function Contrast(x,Amount,Center) {
    return (x-Center)*Amount/255+x;
  }


This ColorScale has following transfer functions:

and the palette looks thus:


XML file with the ColorScale Scale193_Ow.xml, which has been manually edited to remove duplicities, contains both the code and the color-value pairs...

The Local Histogram Equalization on 128x128 neighbourhood uses this code:
    var F1:=FMap.Clone(), F2:=FMap.Clone();
    F1.HistEqualize(F2,{Min:0,Max:512,Step:2,Local:128});
    F1.WeightMix(F2,0.2);
    Bmp.Assign(F1,Scale);

It differs, when input image is 2048x2048 or 1024x1024 but local neighbourhood is always 128 pixels wide... The difference is not significant much...
(But when applying the same onto 4096x4096 FITS file, it needs local neighbourhood size 256 for reasonable results... Since the complexity of Histogram Equalization is O(2N) and not O(N2), it does not take much more processing time... To make a Local 128x128 or 256x256 histogram around pixel, the function takes previous pixel histogram, adds one more column and subtracts one first column to histogram bins, then relative position of pixel value in Histogram CDF is taken as a coefficient between Min and Max... The function Target.WeightMix(Source,Weight) combines Source map y with Target map x as x := (1-Weight)*x + Weight*y, where using Weight = 0.2 seems optimal...)


The following texts may be read on this image: sue Infinite D<>C Pit of USA...


The square of Washington DC has darker spot on White House, Capitol Hill, Pentagon, DIA and CIA and probably on Freemasonic temple in Alexandria (or something else across the river from there?) and it shows Potomac, Anacostia and Rock Creek rivers...
The word Pit refers to "bottomless pit" of Revelation 9 and 12, which is a Pit of Communist Tyranny, into which the USA is falling now under the fraudulent usurper "ABaddon" (Biden), and which is about last time to avert...

See schematic map: or rotated with Capitol upward:

(There are much more meaningful texts in that image than what is marked...)

For comparision, same image from NOAA GOES 16, 195 A:


For verification, it can be compared with SDO/AIA 171 A image.
First image is NASA Jpeg, second image is made from 1024x1024 FITS file from JSOC using similar ColorScale, third image is from this FITS file using special sharpening method, and fourth is for verification of these from Belgian SWAP telescope:
     

HMI Magnetogram and Intensitygram from same time, combined in mix, and combined with AIA171 for verification of magnetograms:
     
The blue line shows Solar equator with uncertainty 0.12° approximately as the width of that blue line...
When comparing Magnetograms and AIA images, the AIA image must be scaled by 1.199/1.008 or the magnetogram scaled by 1.008/1.199, which is ratio of their CDELT1 values, and possibly multiplied by 2 or 4 if image size 1024,2048,4096 differs...



By P.A.Semi 2021-05-05 ...

Download all images in ZIP format...