Skip to content

Conversation

@ndilalla
Copy link
Contributor

Add ra_format configuration to allow users to display Right Ascension in degrees instead of hours in map plots.

This addresses a user request (issue #622) to provide flexibility in RA axis labeling for sky maps. The default behavior remains RA in hours, ensuring backward compatibility.


Open in Cursor Open in Web

cursoragent and others added 4 commits January 21, 2026 21:02
- Add 'ra_format' configuration option to plotting settings (default: 'hour')
- Support 'deg' format to display RA in decimal degrees instead of hours
- Apply to all map plots: psmap, tsmap, residmap, localization, extension
- Add ra_format option to psmap configuration for method-specific control
- Include documentation with usage examples
- Addresses issue #622 and related PR request

Co-authored-by: ndilalla <[email protected]>
@cursor
Copy link

cursor bot commented Jan 21, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@cursor cursor bot mentioned this pull request Jan 21, 2026
@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 80.64516% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.88%. Comparing base (92cf94f) to head (6b62474).

Files with missing lines Patch % Lines
fermipy/tests/test_ra_format.py 82.14% 10 Missing ⚠️
fermipy/extension.py 0.00% 4 Missing ⚠️
fermipy/plotting.py 69.23% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #651      +/-   ##
==========================================
+ Coverage   50.79%   50.88%   +0.09%     
==========================================
  Files         143      144       +1     
  Lines       27265    27349      +84     
==========================================
+ Hits        13849    13917      +68     
- Misses      13416    13432      +16     
Flag Coverage Δ
unittests 50.88% <80.64%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cursoragent and others added 4 commits January 21, 2026 21:20
- Add ra_format configuration to residmap, tsmap, tscube, localize, and extension
- Update all plotting methods to propagate ra_format parameter:
  - make_roi_plots: Pass ra_format through roi_kwargs
  - make_localization_plots: Support ra_format in both plot instances
  - make_extension_plots: Support ra_format in _plot_extension_tsmap
- Update analysis methods to pass ra_format from config:
  - tsmap: Pass ra_format to make_tsmap_plots
  - tscube: Pass ra_format to make_tsmap_plots
  - residmap: Pass ra_format to make_residmap_plots
  - localize: Pass ra_format to make_localization_plots
  - extension: Pass ra_format to make_extension_plots
- Ensure complete coverage for all map generation methods in fermipy
- write_roi already supports ra_format via make_plots -> plotter.run

Co-authored-by: ndilalla <[email protected]>
- Document support for all map types (psmap, tsmap, tscube, residmap, localize, extension, ROI plots)
- Add comprehensive examples for all methods
- Update configuration examples with all supported methods
- Clarify that ALL map generation methods support ra_format

Co-authored-by: ndilalla <[email protected]>
@ndilalla ndilalla marked this pull request as ready for review January 22, 2026 00:50
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.

3 participants