astropy / astropy/astroquery

Getting ESO headers fails to retrieve keyword values which include a /

Open
#3,208 2 comments 0 reactions 0 assignees View on GitHub
eso
Dominant language
Python
Stars
791
Forks
451
Avg merge
1d 3h
Merged PRs (30d)
4

Description

Code tries to figure out the comment splitting on / leaving out the right part reading ESO headers. But keyword values are truncated before / when it includes one or more in its value.

The output of next python code snippet should provide the full instrument name with a revision ID on top of next input values:
```
HIERARCH ESO INS ID = 'GRAVITY/176642' / Instrument ID.
HIERARCH ESO INS ID = 'PIONIER/$Revision: 350678 $' / Instrument ID.
```

```python
from astroquery.eso.core import EsoClass
eso = EsoClass()
headers = eso.get_headers(["GRAVI.2024-09-27T07:22:10.935","PIONI.2024-01-12T08:55:01.576"])
print(headers["HIERARCH ESO INS ID"])
```

At present time, the output is :
```
HIERARCH ESO INS ID
-------------------
GRAVIT
PIONIE
```

If this is a bug, I guess that a fix should also manage multiple quotes occurences with and without escaping and maybe other tricky cases ...

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the example through astroquery.eso.core.EsoClass.get_headers and inspect the ESO header parsing it invokes. Verify that values such as 'GRAVITY/176642' and 'PIONIER/$Revision: 350678 $' are returned in full, including the slash, and check the related parsing behavior for quoted values.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
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.