Add SpectrumFileProcessor class for automated spectral data conversion and formatting#257
Conversation
krishnatejavedula
commented
Oct 24, 2024
- Implemented SpectrumFileProcessor class to handle energy and flux data conversion for spectrum files not in the MEGAlib spectrum file format.
- Added energy conversion feature: converts frequency (Hz) to energy (keV) and flux from ergs/cm²/sec to ph/cm²/sec/keV using astropy units.
- Implemented data filtering to restrict energy range to 100 keV - 10,000 keV for accurate source injector functionality.
- Reformatted output to ensure compatibility with SpecFromDat class and consistency across cosipy and DCs spectral files.
…n and formatting - Implemented SpectrumFileProcessor class to handle energy and flux data conversion for spectrum files not in the MEGAlib spectrum file format. - Added energy conversion feature: converts frequency (Hz) to energy (keV) and flux from ergs/cm²/sec to ph/cm²/sec/keV using astropy units. - Implemented data filtering to restrict energy range to 100 keV - 10,000 keV for accurate source injector functionality. - Reformatted output to ensure compatibility with SpecFromDat class and consistency across cosipy and DCs spectral files.
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@krishnatejavedula Thanks for this work. Looks good. I have a quick comment. |
|
Thanks @krishnatejavedula. Any updates to this?
|
Yong2Sheng
left a comment
There was a problem hiding this comment.
I tested the module and it works well.