From a0471cb938d9b6a55c4a3523552d1cace2f08475 Mon Sep 17 00:00:00 2001 From: Yong Sheng Date: Wed, 16 Oct 2024 17:40:16 -0700 Subject: [PATCH] Change the Em and Ei axis scale to linear, which is the default one. --- cosipy/source_injector/source_injector.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cosipy/source_injector/source_injector.py b/cosipy/source_injector/source_injector.py index 267a0347..b166369b 100644 --- a/cosipy/source_injector/source_injector.py +++ b/cosipy/source_injector/source_injector.py @@ -136,6 +136,10 @@ def inject_point_source(self, spectrum, coordinate, orientation = None, source_n psr = SourceInjector.get_psr_in_galactic(coordinate = coordinate, response_path = self.response_path, spectrum = spectrum) injected = psr.get_expectation(spectrum) + # setting the Em and Ei scale to linear to match the simulated data + # The linear scale of Em and Ei is the default for COSI data + injected.axes["Em"].axis_scale = "linear" + injected.axes["Ei"].axis_scale = "linear" if project_axes is not None: injected = injected.project(project_axes)