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

Instrumental background #670

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open

Instrumental background #670

wants to merge 51 commits into from

Conversation

s-silvestri
Copy link
Collaborator

@s-silvestri s-silvestri commented Nov 23, 2022

Changed the workflow for creating a background template and implemented a default background template.

How to create a background:
· Launch instr.py with pha1 files of the background as positional arguments.
· Optionally choose the output file name (default: IXPEOBSSIM_SRCMODEL/ascii/instrumental_bkg_template.txt)
· To generate a background then one needs to create a config file and this is essentially unchanged. The default path for the template file, however, is now IXPEOBSSIM_SRCMODEL/ascii/instrumental_bkg_template.txt, that is the class xTemplateInstrumentalBackground has that as default file_path

New features
· The spline smoothing parameter can be defined as an argument when launching instr.py
· instr.py now plots the input spectra and the average, which is saved by default into the ascii template file. If only one observation is provided, this will be the average of the 3 DUs
· instr.py has a built-in function that tries to mitigate spline oscillations below 1 keV that essentially forces the spline to be monothonic by altering the gradient of the function.

·smcx1 is not special anymore so i deleted its template.

i have not implemented the pha1 files in ixpeobssim/bkg/data as we did for smcx1 since i don't believe that they can be interesting for the user now that we plan to write a documentation for this procedure, but in case they can be implemented in no time.

@s-silvestri
Copy link
Collaborator Author

The build fails because some unit tests were relying on old background templates which are no longer there.

Note that even if we redirect the paths of these templates to the new ones, the default template which is just for the residual background, could yield to unexpected results.

s-silvestri and others added 25 commits November 30, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants