How to set observer coordinate in a Map?

Open
#4,189 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
api, data

Research direction

Start by reading the decision in PR 3911 and the Map observer_coordinate property, then compare it with the existing FITS-keyword path using hgln_obs, hglt_obs, and dsun_obs. Define the supported user-facing way to apply a SkyCoord to existing maps and verify the resulting behavior with focused Map tests.

Written by the indexing model from the issue text.

Description

Effort Medium map Package Expert Priority Low Refactoring

I currently have a lot of maps with missing observer coordinate information, and I would like to set this information to the location of the earth at the time the map was observed.

One way of doing this is to manually calculate what the values of the 'hgln_obs', 'hglt_obs', 'dsun_obs' FITS keywords should be, manually add them to the existing header, and create a new map. But I think a user should not have to worry about or know anything about FITS to do this.

Another way of doing this would be giving the observer_coordinate property a setter, and I could then set the observer coordinate to a SkyCoord (and internally sunpy would handle with the FITS stuff). But it has been decided not to support property setters on Map ☹️ (https://github.com/sunpy/sunpy/pull/3911)

So my questions are

  • Should I learn FITS to do this?
  • Should we revise the decision to not have any setters for Map?
  • Is there another way to do this?
Dominant language
Python
Stars
1k
Forks
682
Avg merge
1d 17h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sunpy/sunpy

All issues in sunpy/sunpy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.