astropy / astropy/astroplan

Observer.target_hour_angle() and parallactic_angle() do not precess coordinates

Open
#633 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
225
Forks
121
Avg merge
28m
Merged PRs (30d)
1

Description

I am doing something that needs fairly accurate parallactic angles, and discovered that the astroplan calculation of parallactic angle does not agree with the skycalc C program, for an ICRS SkyCoord and obstime in 2025. It does agree with skycalc in year 2000. The attached script sets up a calculation for a few times from 2000 to 2099 (same date and time at 25 year intervals) and prints the hour angle and parallactic angle, and it shows only minuscule change over 99 years. The hour angle should change by almost 5 minutes of time from 2000-04-02 to 2099-04-02, with a corresponding change in parallactic angle.

I tried using the plot_airmass and plot_parallactic functions to make plots for the same object in year 2000 and year 3000, and found that the plot_airmass correctly shows transit changing by about 50 minutes from 2000 to 3000, but plot_parallactic shows no change.

I believe this is because the Observer.target_hour_angle() and .parallactic_angle() methods are using the target.ra and .dec in the native frame (like ICRS) without precessing them to the time of observation.

[astroplan_parang_test.py](https://github.com/user-attachments/files/24901859/astroplan_parang_test.py)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the attached astroplan_parang_test.py script and inspect Observer.target_hour_angle(), Observer.parallactic_angle(), plot_airmass(), and plot_parallactic(). Compare the hour-angle and parallactic-angle results across the 2000–2099 or 2000–3000 cases against skycalc; done means the angle calculations reflect the observation epoch rather than remaining nearly unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.