Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of the imaging-spectroscopy branch #174

Open
wants to merge 1 commit into
base: imaging-spectroscopy
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions stix/idl/processing/spectrogram/stx_convert_pixel_data.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
17 changes: 16 additions & 1 deletion stix/idl/processing/spectrogram/stx_fsw_sd_spectrogram2ospex.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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