% file: get_bish_data.i % % "get_" file for general analyses of CXC HETGS PHA data files % % - - - - Input Parameters : % define the data set to be read in % % For nominal 12 order pha files the mapping to % the +/-1 order MEG/HEG spectra are given by: % megm=9; megp=10; hegm=3; hegp=4; % % these four spectra will be loaded from these PHA-file rows % and then the indices will be changed to 1,2,3,4 if ( 1 > 0) { % this is everything in front of "_pha2.fits": % %%data_dir = "/nfs/etacar/d1/bish/CAPELLA/CALIB/1103_v3/PHA"; data_dir = "/nfs/etacar/d1/bish/CAPELLA/CALIB/0057_v3/PHA"; %%data_dir = "/nfs/etacar/d1/bish/CAPELLA/CALIB/1010_v3/PHA"; %%data_dir = "/nfs/etacar/d1/bish/CAPELLA/CALIB/2583_v3/PHA"; %%data_dir = "/nfs/etacar/d1/bish/CAPELLA/CALIB/3674_v3/PHA"; %%data_dir = "/nfs/etacar/d1/bish/CAPELLA/CALIB/5040_v3/PHA"; % %%data_set_name = "acisf01103_002N002"; data_set_name = "acisf00057_002N002"; %%data_set_name = "acisf01010_002N002"; %%data_set_name = "acisf02583_002N001"; %%data_set_name = "acisf03674_002N001"; %%data_set_name = "acisf05040_002N001"; % %%data_exposure = 40.5e3; data_exposure = 28.8e3; %%data_exposure = 30.3e3; %%data_exposure = 27.6e3; %%data_exposure = 28.7e3; %%data_exposure = 28.7e3; % % data_n_spectra = 4; data_nh = 0.0; % x10^22 for wabs zpg = 0.0; data_got_rmf = 1; data_got_arf = 0; data_got_ignores = 0; fil_group = 1; rgbprange=0.1; } % - - - - % get rid of previous data sets % could have been from type 2 PHA... delete_data(all_data); delete_rmf(all_rmfs); delete_arf(all_arfs); % 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) { % Use the same '1103 Rmfs for all... ()=load_rmf("/nfs/etacar/d1/bish/CAPELLA/CALIB/1103_v3/Rmf/" + "acisf01103_custom_rmfMEG-1.fits"); ()=load_rmf("/nfs/etacar/d1/bish/CAPELLA/CALIB/1103_v3/Rmf/" + "acisf01103_custom_rmfMEG1.fits"); assign_rmf(1,1); assign_rmf(2,2); } % Get the arf files if (data_got_arf == 1) { ()=load_arf("/nfs/etacar/d1/bish/CAPELLA/CALIB/1103_v3/Arf/" + "acisf01103MEG_-1_garf.fits"); ()=load_arf("/nfs/etacar/d1/bish/CAPELLA/CALIB/1103_v3/Arf/" + "acisf01103MEG_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; if (data_got_rmf == 1) { ()=load_rmf("/nfs/etacar/d1/bish/CAPELLA/CALIB/1103_v3/Rmf/" + "acisf01103_custom_rmfHEG-1.fits"); ()=load_rmf("/nfs/etacar/d1/bish/CAPELLA/CALIB/1103_v3/Rmf/" + "acisf01103_custom_rmfHEG1.fits"); assign_rmf(3,3); assign_rmf(4,4); } if (data_got_arf == 1) { ()=load_arf("/nfs/etacar/d1/bish/CAPELLA/CALIB/1103_v3/Arf/" + "acisf01103HEG_-1_garf.fits"); ()=load_arf("/nfs/etacar/d1/bish/CAPELLA/CALIB/1103_v3/Arf/" + "acisf01103HEG_1_garf.fits"); assign_arf(3,3); assign_arf(4,4); } if (fil_group > 1) { % Group the data! group_data(3,fil_group); group_data(4,fil_group); } 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; % Select statistic for fitting... set_fit_statistic ("chisqr;sigma=gehrels");