unit SDO_param;

interface


{Parametry pro sesazeni obrazu SDO AIA}
const RefWavelen   = 171;
      RefCenterX   = 2048;        // pix - nemenit
      RefCenterY   = 2048;        // pix - nemenit
      RefRotation  = 0.019243;    // stupen - musi byt stejne ve vsech programech !
      RefPixelSize = 0.599489;    // arcsec - musi byt stejne ve vsech programech !

function FilterStr(Wavelenght: integer; Content : string) : string;
function SetTimeFormat(s : string) : string;
function NmStr(Wavelenght: integer) : string;
function SetFileTimeFormat(s : string) : string;

implementation

uses SysUtils;

function FilterStr(Wavelenght: integer; Content : string) : string;
begin
  case Wavelenght of
    6173 : FilterStr:=LowerCase(Content);  // pro SDO AIA
    4500 : FilterStr:='continuum';
    1700 : FilterStr:='continuum';
    304  : FilterStr:='He II';  // 60-80 kK
    1600 : FilterStr:='C IV + cont';
    171  : FilterStr:='Fe IX';  // 1.0 MK
    195  : FilterStr:='Fe XII'; // 1.4 MK
    193  : FilterStr:='Fe XII + Fe XXIV';
    211  : FilterStr:='Fe XIV';
    284  : FilterStr:='Fe XV';  // 2.2 MK
    335  : FilterStr:='Fe XVI';
    94   : FilterStr:='Fe XVIII';
    131  : FilterStr:='Fe VIII + Fe XXI';
    else FilterStr:=Content;
  end{case};
end;

function NmStr(Wavelenght: integer) : string;
begin
  case Wavelenght of
    6173 : NmStr:='617,3 nm'; // pro SDO HMI
    4500 : NmStr:='450 nm';
    1700 : NmStr:='170 nm';
    304  : NmStr:='30.4 nm';
    1600 : NmStr:='160 nm';
    171  : NmStr:='17.1 nm';
    195  : NmStr:='19.5 nm';  // pro TRACE
    193  : NmStr:='19.3 nm';
    211  : NmStr:='21.1 nm';
    284  : NmStr:='28.4 nm';  // pro STEREO
    335  : NmStr:='33.5 nm';
    94   : NmStr:='9.4 nm';
    131  : NmStr:='13.1 nm';
    else NmStr:='';
  end{case};
end;

function SetTimeFormat(s : string) : string;
var y,m,d,t : string;
    n       : integer;
begin
  if s='' then
    begin
      SetTimeFormat:='';
      Exit;
    end;
  n:=Pos('T',s);
  t:=copy(s,n+1,8);
  d:=copy(s,n-2,2);
  y:=copy(s,1,4);
  n:=Pos('-',s);
  m:=copy(s,n+1,2);
  SetTimeFormat:=d+'. '+m+'. '+y+'    '+t;
end;

function SetFileTimeFormat(s : string) : string;
var i : integer;
begin
  for i:=1 to Length(s) do
   if ((s[i]<'0') or (s[i]>'9')) and (s[i]<>'T') then s[i]:='_';
  SetFileTimeFormat:=s; 
end;



end.
--------------------------------------------------
 Filtry a kamery
 335 (0), 131 (1)                      camera 1   // PixelSize 0.600698
 211 (2), 193 (3)                      camera 2   // PixelSize 0.600714
 1600 (4), 1700 (5), 4500 (6), 171 (7) camera 3   // PixelSize 0.599489
 304 (8), 94 (9)                       camera 4   // PixelSize 0.600165

