% 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 % only the lines I want... % variable ibb=0; while (ibb < length(bpl)) { bpl[ibb].lfit = 0.0; bpl[ibb].afit = 0.0; bpl[ibb].aclo = 0.0; bpl[ibb].achi = 0.0; bpl[ibb].ignore = 1; bpl[ibb].rgfit = "N/A"; ibb = ibb + 1; } % Capella: lines to use rmf_bps = [26,27,29,33,34,36,42,47,51,53,55,57,58,59,60,61,63,66,67,70]; % test: %%rmf_bps = [53]; % "Narrow" Simulation: lines to use %%rmf_bps = [1,14,26,27,29,33,34,36,42,51,52,53,55,57,58,64,68]; ibb=0; while (ibb < length(rmf_bps)) { bpl[rmf_bps[ibb]-1].ignore = 0; ibb=ibb + 1; } } % - - - - - % - - - % Plot Output to .ps files or not... %%psplot = 1; psplot = 0; % - - - % 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"); % - - - - -