astropy / astropy/ccdproc

Allow FITS writer to write to an existing `HDUList`?

Open
#172 0 comments 0 reactions 0 assignees View on GitHub
effort-low enhancement
Dominant language
Python
Stars
93
Forks
92
Avg merge
14h 44m
Merged PRs (30d)
30

Description

I was reading the ccdproc docs for the first time in the context of [APE 6](https://github.com/astrofrog/astropy-APEs/pull/1) and hit upon the [section on writing](http://ccdproc.readthedocs.org/en/latest/ccdproc/ccddata.html#getting-data-out) particularly to a FITS file.

The `to_hdu()` method seems potentially useful in its own right, so that's fine. But I wonder if, in addition to writing a CCDData to a new file, the FITS writer could also accept an already open FITS file. That would include options for which HDU to write the data to or to create a new HDU (so basically there are 3 operations: update, insert, or append). I'm not sure what the best default is.

The same idea should pertain to the `Table` writer for FITS as well--just yesterday I had this question come up. So I'm going to suggest something like this over in Astropy too.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.