cositools / cosipy

The COSI high-level data analysis tools
Apache License 2.0
3 stars 16 forks source link

Add support for regional fitting and use `scatter` intead of `text` to plot the true location. #171

Open Yong2Sheng opened 3 months ago

Yong2Sheng commented 3 months ago

These changes are made for introducing the TS map method into my localization pipeline and optimizing the plotting method.

Update 1

In order to accelerate the ts map fitting in localization simulation, I modified fast_ts_fit.py to fit a specific disc region instead of the full map.

Update 2

  1. hp.projtext will place an offset between the text and the coordinate you give, which caused a noticeable systematic offset between the localized 90% containment region and the true location.

  2. Now it uses hp.projscatter, and the markers are placed at the exact location. If you run ts map tutorial notebook, you will find that the containment region is more consistent with the true location of the source than before.

israelmcmc commented 3 months ago

Thanks @Yong2Sheng . Can you please separate this into two PRs? The plotting change is simple and I'd like to include it in DC2, but I rather not merge the other one right before the release.

Yong2Sheng commented 3 months ago

Sure! I will make a new branch that has the changes in the plot method only!

israelmcmc commented 3 months ago

Thanks @Yong2Sheng !

Yong2Sheng commented 3 months ago

Hi @israelmcmc, I made another PR #172 that only contains the updates to the plotting method. I will modify this one later so it will only contain the updates to the regional fitting part.

israelmcmc commented 3 months ago

I changed the target branch to "develop". I want to avoid adding new features to the version we're releasing today. I'll explain this further tomorrow during the cosipy meeting.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 36.78%. Comparing base (852b2e1) to head (a540003).

Files Coverage Δ
cosipy/ts_map/fast_ts_fit.py 24.00% <25.00%> (+0.13%) :arrow_up: