Created
January 13, 2017 18:24
-
-
Save giacomov/a52972e5c7983c5c7f509df396902abf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsps = [] | |
phas = [] | |
baks = [] | |
for interval in intervals: | |
this_rsp = my_instrument_response_set.weight_by_counts(...) | |
this_pha = [this is what you are doing] | |
this_bak = [this is what you are doing] | |
rsps.append(this_rsp) | |
phas.append(this_pha) | |
baks.append(this_bak) | |
# Now write the RSP file | |
ebounds = EBOUNDS(...) # You can get what you need from the first matrix | |
ogip_rsps = [SPECRESP_MATRIX(this_rsp.monte_carlo_energies, this_rsp.ebounds, this_rsp.matrix) for this_rsp in rsps] | |
rsp2_file = FITSFile(fits_extensions=ogip_rsps) | |
# and so on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment