cositools / cosipy

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

Add the point source response content to the DetectorResponse notebook #150

Closed Yong2Sheng closed 3 months ago

Yong2Sheng commented 4 months ago

Caution: This is a draft PR. I opened it because @israelmcmc will work on his part based on this PR.

My changes for this PR are:

Changed file(s):

  1. DetectorResponse.ipynb

    • I removed the hard-coded part of the point source response. It's replaced by the method with the SpacecraftFile module.
    • To view the added contents, please go to the Point source response section in the notebook
  2. Point_source_response.ipynb

    • Updated the method for get_dwell_map to accelerate the calculation
    • In general, I use the Hadamard product of matrices to replace the for-loop over the time intervals
    • Using the old get_ts_map, it needs 153 minutes to calculate the dwell time map for Crab over the full 3-month orientation
    • Using the new get_ts_map, it only need 9.58s to do the same calculation.
  3. SpacecraftFile.py, scatt_map.py, TSMap.py, fast_ts_fit.py

    • Added or updated the doc string.

Added file(s):

  1. Crab_DwellMap.fits
    • This is the dwell time map for Crab over the 3-month orientation.

Deleted files(s)

  1. Cygx1_balloon_dtpoins_remove_none.npy
  2. Cygx1_balloon_timestamp_random_remove_none.npy
  3. Cygx1_balloon_xpoins_remove_none.npy
  4. Cygx1_balloon_ypoins_remove_none.npy
  5. Cygx1_balloon_zpoins_remove_none.npy
ckarwin commented 4 months ago

Hi @Yong2Sheng I converted your PR to a draft, based on your cation message.

Yong2Sheng commented 4 months ago

Thank you @ckarwin! I didn't know PR has a draft mode haha.

israelmcmc commented 3 months ago

@Yong2Sheng I'm cleaning up issues and PRs, so I'm closing this one since all your commits and changes are now in #149 (as we discussed). If I missed anything, please feel free to reopen it and let me know.