diff --git a/stix/idl/processing/spectrogram/stx_convert_pixel_data.pro b/stix/idl/processing/spectrogram/stx_convert_pixel_data.pro index 28820c0d..99cafa92 100644 --- a/stix/idl/processing/spectrogram/stx_convert_pixel_data.pro +++ b/stix/idl/processing/spectrogram/stx_convert_pixel_data.pro @@ -94,7 +94,12 @@ pro stx_convert_pixel_data, fits_path_data = fits_path_data, fits_path_bk = fit det_ind = det_ind, pix_ind = pix_ind, $ shift_duration = shift_duration, no_attenuation = no_attenuation, sys_uncert = sys_uncert, $ generate_fits = generate_fits, specfile = specfile, srmfile = srmfile,$ - background_data = background_data, plot = plot, ospex_obj = ospex_obj + background_data = background_data, plot = plot, ospex_obj = ospex_obj, $ + ; ********************************* ADDED BY ANDREA (29-Mar-2022) ********************************* + ; This has to be removed once the Github issue #154 (https://github.com/i4Ds/STIX-GSW/issues/154) + ; is solved. Afterwards, we can think of merging the imaging-spectroscopy branch to the main branch + sav_srm = sav_srm + ; ************************************************************************************************* if n_elements(time_shift) eq 0 then begin @@ -292,7 +297,7 @@ pro stx_convert_pixel_data, fits_path_data = fits_path_data, fits_path_bk = fit stx_convert_science_data2ospex, spectrogram = spectrogram, specpar=specpar, time_shift = time_shift, $ data_level = data_level, data_dims = data_dims, fits_path_bk = fits_path_bk, distance = distance, $ fits_path_data = fits_path_data, flare_location = flare_location, eff_ewidth = eff_ewidth, sys_uncert = sys_uncert, $ - plot = plot, background_data = background_data, fits_info_params = fits_info_params, ospex_obj = ospex_obj + plot = plot, background_data = background_data, fits_info_params = fits_info_params, ospex_obj = ospex_obj, sav_srm=sav_srm end diff --git a/stix/idl/processing/spectrogram/stx_convert_science_data2ospex.pro b/stix/idl/processing/spectrogram/stx_convert_science_data2ospex.pro index c2a84ebb..049c26d1 100644 --- a/stix/idl/processing/spectrogram/stx_convert_science_data2ospex.pro +++ b/stix/idl/processing/spectrogram/stx_convert_science_data2ospex.pro @@ -79,7 +79,12 @@ ;- pro stx_convert_science_data2ospex, spectrogram = spectrogram, specpar = specpar, time_shift = time_shift, data_level = data_level, data_dims = data_dims, fits_path_bk = fits_path_bk,$ distance = distance, fits_path_data = fits_path_data, fits_info_params = fits_info_params, flare_location = flare_location, eff_ewidth = eff_ewidth, sys_uncert = sys_uncert, $ - xspec = xspec, background_data = background_data, plot = plot, generate_fits = generate_fits, pickfile = pickfile, ospex_obj = ospex_obj + xspec = xspec, background_data = background_data, plot = plot, generate_fits = generate_fits, pickfile = pickfile, ospex_obj = ospex_obj, $ + ; ********************************* ADDED BY ANDREA (29-Mar-2022) ********************************* + ; This has to be removed once the Github issue #154 (https://github.com/i4Ds/STIX-GSW/issues/154) + ; is solved. Afterwards, we can think of merging the imaging-spectroscopy branch to the main branch + sav_srm = sav_srm + ; ************************************************************************************************* default, plot, 0 @@ -267,7 +272,7 @@ pro stx_convert_science_data2ospex, spectrogram = spectrogram, specpar = specpar ospex_obj = stx_fsw_sd_spectrogram2ospex( spectrogram, specpar = specpar, time_shift= time_shift, ph_energy_edges = ph_in, $ /include_damage, generate_fits = generate_fits, xspec = xspec, /tail, livetime_fraction = eff_livetime_fraction, $ - dist_factor = dist_factor, flare_location = flare_location, sys_uncert = sys_uncert, fits_info_params = fits_info_params, background_data = background_data) + dist_factor = dist_factor, flare_location = flare_location, sys_uncert = sys_uncert, fits_info_params = fits_info_params, background_data = background_data, sav_srm=sav_srm) if keyword_set(plot) then begin ospex_obj ->gui diff --git a/stix/idl/processing/spectrogram/stx_fsw_sd_spectrogram2ospex.pro b/stix/idl/processing/spectrogram/stx_fsw_sd_spectrogram2ospex.pro index f4ae0141..10b27c5b 100755 --- a/stix/idl/processing/spectrogram/stx_fsw_sd_spectrogram2ospex.pro +++ b/stix/idl/processing/spectrogram/stx_fsw_sd_spectrogram2ospex.pro @@ -46,7 +46,12 @@ ;- function stx_fsw_sd_spectrogram2ospex, spectrogram, specpar = specpar, time_shift = time_shift, ph_energy_edges = ph_edges, generate_fits = generate_fits, plotman_obj = pobj, $ specfilename = specfilename, srmfilename = srmfilename, flare_location = flare_location, gtrans32 = gtrans32, livetime_fraction = livetime_fraction, sys_uncert = sys_uncert, $ - fits_info_params = fits_info_params, xspec = xspec, background_data = background_data, _extra = _extra + fits_info_params = fits_info_params, xspec = xspec, background_data = background_data, _extra = _extra, $ + ; ********************************* ADDED BY ANDREA (29-Mar-2022) ********************************* + ; This has to be removed once the Github issue #154 (https://github.com/i4Ds/STIX-GSW/issues/154) + ; is solved. Afterwards, we can think of merging the imaging-spectroscopy branch to the main branch + sav_srm = sav_srm + ; ************************************************************************************************* default, sys_uncert, 0.05 default, gtrans32, 1 @@ -196,6 +201,16 @@ function stx_fsw_sd_spectrogram2ospex, spectrogram, specpar = specpar, time_shif origunits.data_name = 'STIX' ospex_obj->set, spex_data_origunits = origunits + ; ********************************* ADDED BY ANDREA (29-Mar-2022) ********************************* + ; This has to be removed once the Github issue #154 (https://github.com/i4Ds/STIX-GSW/issues/154) + ; is solved. Afterwards, we can think of merging the imaging-spectroscopy branch to the main branch + if keyword_set(sav_srm) then begin + srm = rep_tag_name(srm,'smatrix','drm') + break_file,srmfilename,disk_log,ddir,fn_srm_file,ext_srm_file + save,filename=fn_srm_file+'_IDL-save.sav',srm + endif + ;;; *********************************************************************************************** + return, ospex_obj end