Interfaces refactoring#369
Merged
israelmcmc merged 320 commits intocositools:developfrom Mar 9, 2026
Merged
Conversation
This was referenced Sep 9, 2025
Closed
Closed
Closed
Signed-off-by: Israel Martinez <imc@umd.edu>
Signed-off-by: Israel Martinez <imc@umd.edu>
…ecessary. Signed-off-by: Israel Martinez <imc@umd.edu>
- Use same path variable for inputs and fetch_wasabi. - Commit dataio yaml config files. Signed-off-by: Israel Martinez <imc@umd.edu>
…hood and moving to implementation's __init__ Signed-off-by: Israel Martinez <imc@umd.edu>
Signed-off-by: Israel Martinez <imc@umd.edu>
- remove get_bin_data from interfaces - add event metadata Signed-off-by: Israel Martinez <imc@umd.edu>
- add profiles - fix hidden issue before separating main() Signed-off-by: Israel Martinez <imc@umd.edu>
Signed-off-by: Israel Martinez <imc@umd.edu>
… implementation Signed-off-by: Israel Martinez <imc@umd.edu>
Signed-off-by: Israel Martinez <imc@umd.edu>
# Conflicts: # cosipy/__init__.py # cosipy/response/FullDetectorResponse.py # cosipy/response/PointSourceResponse.py # cosipy/response/__init__.py # cosipy/spacecraftfile/SpacecraftFile.py # cosipy/threeml/COSILike.py # cosipy/ts_map/TSMap.py # docs/tutorials/image_deconvolution/511keV/GalacticCDS/511keV-Galactic-ImageDeconvolution.ipynb # docs/tutorials/image_deconvolution/511keV/ScAttBinning/511keV-ScAtt-DataReduction.ipynb # docs/tutorials/image_deconvolution/511keV/ScAttBinning/511keV-ScAtt-ImageDeconvolution.ipynb # docs/tutorials/ts_map/TS_map_fitting.ipynb # tests/polarization/test_polarization_asad.py # tests/source_injector/test_source_injector.py # tests/spacecraftfile/test_spacecraftfile.py
Signed-off-by: Israel Martinez <imc@umd.edu>
- Move get_lctutorial_data.py to speclc_grbdc3_prep.ipynb - Use fetch_wasabi with checksum instead of custom get_data (wasabipath,outpath,unzip) - No need for unzipping step Signed-off-by: Israel Martinez <imc@umd.edu>
Signed-off-by: Israel Martinez <imc@umd.edu>
# Conflicts: # cosipy/pipeline/src/io.py # cosipy/pipeline/task/task.py
… mistakes and missed some calculations while trying to refactor the GRB tutorial based off the Crab tutorial. Those issues are fixed now and the last plot looks better.
…al to work with interfaces
- Use .fits orientation file from develop instead of .ori from DC2 - Add missing poisson_conf_interval import - Use updated response file from develop instead of DC2 Signed-off-by: Israel Martinez <imc@umd.edu>
# Conflicts: # docs/tutorials/spectral_fits/continuum_fit/grb/SpectralFit_GRB.ipynb
- The source variable was not updated after the transform_to(self._gcrs) call (is not an inplace operation) - ez_cart was not normalized before taking the dot product to compare to the cos(angle) Signed-off-by: Israel Martinez <imc@umd.edu>
Signed-off-by: Israel Martinez <imc@umd.edu>
…11916 Signed-off-by: Israel Martinez <imc@umd.edu>
# Conflicts: # cosipy/source_injector/source_injector.py # docs/tutorials/source_injector/Point_source_injector.ipynb
Signed-off-by: Israel Martinez <imc@umd.edu>
Collaborator
Author
|
All unit tests and all tutorials are now working! This includes a lot of new code, some of which is not yet covered by the unit tests. While it would be ideal to wait to improve the unit tests, it'll be hard to continue to work with two branch. I'm going to merge this now and work on the units test during the clean up. I made a tag of the last version of the develop before merging interfaces: |
This was referenced Mar 9, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work in progress...
This is a major refactoring of cosipy to make it more modular, using interfaces (protocols) to decouple the inputs/outputs of different classes from their implementation.
There are currently three examples that serve as an entry point to see the interfaces usage:
Presentations:
20250630-CosipyInterfacesUpdate-Israel.pdf (at version 214f2ae)
Installation notes and troubleshooting:
crab.yamlandbackground.yamlin the repository or add it on wasabi incosipy_tutorialTODO list: