Skip to content

Commit

Permalink
Change the Em and Ei axis scale to linear, which is the default one.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yong2Sheng committed Oct 17, 2024
1 parent 8392ae7 commit a0471cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cosipy/source_injector/source_injector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a0471cb

Please sign in to comment.