idl>p=mrdfits('path of working directory/acisf00596_000N001_GCORR_pha2.fits',1)
idl>meg_sum=p[9].counts
Background counts and their scaling:
idl>back_sum=0.5*0.22*(p[9].background_up+p[9].background_down)
idl>lambda_mid=0.5*(p[9].bin_lo+p[9].bin_hi)
The total counts can be checked by using the following IDL commands:
idl>print,total(meg_sum)
Effective area can be read as:
idl>arp1=mrdfits('path of working directory/meg_p1_arf.fits',1)
idl>arf_tot=arp1.specresp
The ascii file can be created :
idl>openw,8,"path of working directory/table.dat"
idl>for i=0,n_elements(meg_sum)-1 do printf,8,lambda_mid(i), meg_sum(i), back_sum(i),arf_tot(i)
idl>close,8
idl>p=mrdfits('path of working directory/acisf00596_000N001_GCORR_pha2.fits',1)
idl>meg_sum=p[8].counts+p[9].counts
idl>arp1=mrdfits('path of working directory/meg_p1_arf.fits',1)
idl>arm1=mrdfits('path of working directory/meg_m1_arf.fits',1)
idl>arf_tot=arp1.specresp+arm1.specresp