Triplett line energies

From Remeis-Wiki
Jump to navigation Jump to search
require("isisscripts");

%read in data from the drake 1998 table
variable dk = ascii_read_table("drake_table3_cm.dat",
                               [{"%d"},{"%F"},{"%F"},{"%F"},{"%F"},{"%F"}]); 

%conversion factor from cm^-1 to keV
variable cf  = 8065730;

%list of elements
variable elem = ["He","Li","Be","B","C","N","O","F","Ne","Na","Mg","Al",
                 "Si","P","S","Cl","Ar","K","Ca","Sc","Ti","V","Cr","Mn",
                 "Fe","Co","Ni","Cu","Zn","Ga","Ge","As","Se","Br","Kr"];

%define structure for the lines; line conversion from the values in
%Drake is according to what Natalie told me what the individual columns
%in the table represent
variable tri = struct{element = elem,
  w = dk.col3/cf,
  y = dk.col2/cf,
  x = (dk.col6-dk.col5+dk.col2)/cf,
  z = (dk.col2 - dk.col5)/cf};

%write fits fite and ascii file
fits_write_binary_table("tripletts.fits","DATA",tri);
print_struct("tripletts.dat",tri);

print("STACK:");
_print_stack;
exit;