intake / intake/intake-astro

header/wcs from remote catalog?

Open
#2 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

Description

If I have a FITS file on disk locally, I see that I can access the header/WCS info if I read it in first; e.g.,

```python
source = intake.open_fits_array('/Users/tdm/Downloads/ACTPol_148_D6_PA1_S1_1way_I.fits')
arr = source.read()
source.wcs
```
and that gives me
```
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---CEA' 'DEC--CEA'
CRVAL : 0.0 0.0
CRPIX : 5832.0 1302.0
PC1_1 PC1_2 : 1.0 0.0
PC2_1 PC2_2 : 0.0 1.0
CDELT : -0.008333333333333333 0.008333333333333333
NAXIS : 3521 1505
```
However, I'd like to access this data via a YAML catalog; for example (`actpol.yaml`):
```
sources:
ACTPol_148_D6_PA1_S1_1way_I:
driver: fits_array
cache:
- argkey: urlpath
type: file
args:
url: https://lambda.gsfc.nasa.gov/data/suborbital/ACT/actpol_2016_maps/ACTPol_148_D6_PA1_S1_1way_I.fits
ext: 0
direct_access: force
```
I then define the catalog
```python
cat = intake.open_catalog('actpol.yaml')
```
and I can read in the data array, e.g.,
```python
arr = cat.ACTPol_148_D6_PA1_S1_1way_I.read()
```
but how do I access the header or wcs? The `.arr` attribute (as well as `header`, `wcs`, etc., are not set for this remote source after read, unlike the local one. Am I not understanding about how remote (or catalog-defined) sources work, or is this a bug in intake-astro?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.