% file: get_pha_data.i % % "get_" file for general analyses of CXC HETGS PHA data files % % - - - - Input Parameters : % define the data set to be read in % % Capella 01010 observation if ( 0 > 0) { % this is everything in front of "_pha2.fits": data_set_name = "acism01010N000"; data_dir = "/nfs/wiwaxia/dc/hetgs/obsid_01010/Request_727"; data_n_spectra = 4; data_nh = 0.0; % x10^22 for wabs zpg = 0.0; data_got_rmf = 0; data_got_arf = 0; fil_group = 0; } % /nfs/spectra/d2/Reproc_1103/acisf01103N002_pha2.fits if ( 1 > 0) { % this is everything in front of "_pha2.fits": data_set_name = "acisf01103N002"; data_dir = "/nfs/spectra/d2/Reproc_1103"; data_n_spectra = 4; data_nh = 0.0; % x10^22 for wabs zpg = 0.0; data_got_rmf = 0; data_got_arf = 0; fil_group = 0; } if ( 0 > 0) { % this is everything in front of "_pha2.fits": data_set_name = "acisf00057N002"; data_dir = "/nfs/spectra/d2/Reproc_57"; data_n_spectra = 4; data_nh = 0.0; % x10^22 for wabs zpg = 0.0; data_got_rmf = 0; data_got_arf = 0; fil_group = 0; } if (0 > 0) { % this is everything in front of "_pha2.fits": data_set_name = "acisf01318N002"; data_dir = "/nfs/spectra/d2/Reproc_1318"; data_n_spectra = 4; data_nh = 0.0; % x10^22 for wabs zpg = 0.0; data_got_rmf = 0; data_got_arf = 0; fil_group = 0; } % - - - - % get rid of previous data sets % could have been from type 2 PHA... delete_data([1:12]); delete_rmf([1:12]); delete_arf([1:12]); % point to the MEG/HEG -1/+1 data sets % the four spectra will be loaded from these rows: % (then the indices will be changed to 1,2,3,4) % megm=9; megp=10; hegm=3; hegp=4; % % don't set the colors so that models can be plotted in % different color... %set_data_color(megm,cmegm); %set_data_color(megp,cmegp); %set_data_color(hegm,chegm); %set_data_color(hegp,chegp); % get the pha files ()=load_data(data_dir+"/"+data_set_name+"_pha2.fits", megm); ()=load_data(data_dir+"/"+data_set_name+"_pha2.fits", megp); megm=1; megp=2; % assign the rmf files if (data_got_rmf == 1) { ()=load_rmf("/nfs/wiwaxia/d9/dsd/grmfs/meg1_new.rmf"); ()=load_rmf("/nfs/wiwaxia/d9/dsd/grmfs/meg1_new.rmf"); assign_rmf(1,1); assign_rmf(2,2); } % Get the arf files % Use Dale's (will be N0002 ?) if (data_got_arf == 1) { ()=load_arf("/nfs/spectra/d2/CXC_ARD/acism00057N000MEG_-1_garf.fits"); ()=load_arf("/nfs/spectra/d2/CXC_ARD/acism00057N000MEG_1_garf.fits"); assign_arf(1,1); assign_arf(2,2); } if (fil_group > 1) { % Group the data! group_data(1,fil_group); group_data(2,fil_group); } % OK, fix the errors here... gds = get_data_counts (megm); gds.err = sqrt(gds.value); put_data_counts (megm, gds); gds = get_data_counts (megp); gds.err = sqrt(gds.value); put_data_counts (megp, gds); % flux correct it so we can see fluxed spectrum if desired... if (data_got_arf == 1) { flux_corr(1,0); flux_corr(2,0); } % do it all for the HEG spectra... if (data_n_spectra > 2){ ()=load_data(data_dir+"/"+data_set_name+"_pha2.fits", hegm); ()=load_data(data_dir+"/"+data_set_name+"_pha2.fits", hegp); hegm=3; hegp=4; % assign the rmf files if (data_got_rmf == 1) { ()=load_rmf("/nfs/wiwaxia/d9/dsd/grmfs/heg1.rmf"); ()=load_rmf("/nfs/wiwaxia/d9/dsd/grmfs/heg1.rmf"); assign_rmf(3,3); assign_rmf(4,4); } if (data_got_arf == 1) { ()=load_arf("/nfs/spectra/d2/CXC_ARD/acism00057N000HEG_-1_garf.fits"); ()=load_arf("/nfs/spectra/d2/CXC_ARD/acism00057N000HEG_1_garf.fits"); assign_arf(3,3); assign_arf(4,4); } if (fil_group > 1) { group_data(3,fil_group); group_data(4,fil_group); } % OK, fix the errors here... gds = get_data_counts (hegm); gds.err = sqrt(gds.value); put_data_counts (hegm, gds); gds = get_data_counts (hegp); gds.err = sqrt(gds.value); put_data_counts (hegp, gds); if (data_got_arf == 1) { flux_corr(3,0); flux_corr(4,0); } } % Show what we have list_arf; list_rmf; list_data; use_counts;