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

PSR with Earth occultation #258

Merged
merged 17 commits into from
Oct 25, 2024

Conversation

ckarwin
Copy link
Contributor

@ckarwin ckarwin commented Oct 24, 2024

I modified the scatt map to include Earth occultation. The ori file now needs to include columns for altitude and Earth zenith (i.e. spacecraft location). Moreover, the scatt map should only be calculated for a single source position, and likewise for the point source response. Essentially, when filling the scatt map histogram, the code sets the weights to zero for pointings where the source is blocked by Earth.

I added a simple example notebook in the response tutorial directory where I tested the changes. Everything seems to be working. As a simple test, I placed a point source at the Galactic center, and made an ori file where the instrument points to the Galactic center for 30 seconds. For the first 15 seconds the instrument is in front of Earth, and for the second 15.1 seconds it's behind earth. Summing the scatt map gives a total exposure time of 15.1 seconds, as expected.

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 70.83333% with 14 lines in your changes missing coverage. Please review.

Project coverage is 73.29%. Comparing base (d02846a) to head (91f8806).
Report is 18 commits behind head on develop.

Files with missing lines Patch % Lines
cosipy/spacecraftfile/SpacecraftFile.py 72.72% 12 Missing ⚠️
cosipy/response/FullDetectorResponse.py 50.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
cosipy/response/FullDetectorResponse.py 38.84% <50.00%> (+0.09%) ⬆️
cosipy/spacecraftfile/SpacecraftFile.py 88.22% <72.72%> (-1.16%) ⬇️

@ckarwin
Copy link
Contributor Author

ckarwin commented Oct 24, 2024

Ok, I fixed some bugs, and all checks have passed for unit tests.

@GallegoSav GallegoSav merged commit 44f85c4 into cositools:develop Oct 25, 2024
4 checks passed
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.

2 participants