% file: bp_extract.i % % Output a set of fits files with the fitting results % for selected bumps in the spectra... % variable ibb, rmf_bps; % Define the bp_reset function: % Will use the bump wavelength to aviod fitting HEG to too long values define bp_reset () { % Reset afit's to zero, and set the ignores to include % the lines I want... % variable ibb=0; while (ibb < length(bpl)) { bpl[ibb].afit = 0.0; bpl[ibb].ignore = 1; bpl[ibb].rgfit = "Not Valid"; ibb = ibb + 1; } % Add in the Ar line for now... % (3) 3.7311 {181801} ArLyAlpha bpl[3-1].id = 3; bpl[3-1].lam = 3.7311; bpl[3-1].grp = 181801; bpl[3-1].desc = "ArLyAlpha"; % Capella: lines to use rmf_bps = [5,6,8,11,12,14,18,27,28,29,31,33,34,38,42]; % "Narrow" Simulation: lines to use %%rmf_bps = [1,3,5,6,8,11,12,14,18,27,28,29,31,33,34,38,42]; ibb=0; while (ibb < length(rmf_bps)) { bpl[rmf_bps[ibb]-1].ignore = 0; ibb=ibb + 1; } } % - - - - - % - - - % Plot Output to .ps files psplot = 1; % - - - % MEGM data % bp_reset; % rgbprange = 0.050; fdata = megm; cfdata = cmegm; % ibb=0; while(ibb < length(bpl) ) { bpsel=ibb+1; if (bpl[ibb].ignore == 0 and bpl[ibb].lam > 0 and bpl[ibb].lam > 2.0) { ()=evalfile("bp_fit_counts.i"); } ibb=ibb+1; } % list_bp; bp_write_fits(data_set_name+"_bp_megm.fits"); % - - - - - % MEGP data % bp_reset; % rgbprange = 0.050; fdata = megp; cfdata = cmegp; % ibb=0; while(ibb < length(bpl) ) { bpsel=ibb+1; if (bpl[ibb].ignore == 0 and bpl[ibb].lam > 0 and bpl[ibb].lam > 2.0) { ()=evalfile("bp_fit_counts.i"); } ibb=ibb+1; } % list_bp; bp_write_fits(data_set_name+"_bp_megp.fits"); % - - - - - % HEGM data % bp_reset; % rgbprange = 0.030; fdata = hegm; cfdata = chegm; % ibb=0; while(ibb < length(bpl) ) { bpsel=ibb+1; if (bpl[ibb].ignore == 0 and bpl[ibb].lam > 0 and bpl[ibb].lam < 15.5 ) { ()=evalfile("bp_fit_counts.i"); } ibb=ibb+1; } % list_bp; bp_write_fits(data_set_name+"_bp_hegm.fits"); % - - - - - % HEGP data % bp_reset; % rgbprange = 0.030; fdata = hegp; cfdata = chegp; % ibb=0; while(ibb < length(bpl) ) { bpsel=ibb+1; if (bpl[ibb].ignore == 0 and bpl[ibb].lam > 0 and bpl[ibb].lam < 15.5 ) { ()=evalfile("bp_fit_counts.i"); } ibb=ibb+1; } % list_bp; bp_write_fits(data_set_name+"_bp_hegp.fits"); % - - - - -