Skip to content

Feature/carrington#12

Open
mudhoney wants to merge 4 commits into
Helioviewer-Project:mainfrom
mudhoney:feature/carrington
Open

Feature/carrington#12
mudhoney wants to merge 4 commits into
Helioviewer-Project:mainfrom
mudhoney:feature/carrington

Conversation

@mudhoney

@mudhoney mudhoney commented Jul 2, 2026

Copy link
Copy Markdown

Add /hgc2hpc: Heliographic Carrington → Helioprojective conversion

  • Adds GET /hgc2hpc (single) and POST /hgc2hpc (batch) endpoints that convert Heliographic Carrington coordinates into Helioprojective coordinates in Helioviewer's point of view, mirroring the existing /hgs2hpc routes.
  • Introduces an optional observer parameter (defaulting to earth) since Carrington longitude is apparent and observer-dependent; it is validated against the solar-system bodies astropy/sunpy can resolve, returning HTTP 422 for anything else.
  • Supports batch requests where a single observer and target time apply to a list of one or more coordinates, each keeping its own coord_time.
  • Adds three test functions covering validation (422 cases), differential rotation, single-vs-batch consistency to 1e-9, and observer handling — full suite passes (16 tests), black and flake8 clean.
  • Documents the endpoints in the README, in the auto-generated OpenAPI/Swagger docs (observer list + 422 note + multi-coordinate example), and in a standalone docs/carrington.html report.

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.

1 participant