Opened 20 years ago
Closed 17 years ago
#722 closed defect (fixed)
psFits ImageCube functions; Image and Table functions
| Reported by: | Paul Price | Owned by: | Paul Price |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | fits | Version: | 0.10.0 |
| Severity: | normal | Keywords: | PSLib |
| Cc: | robert.desonia@… |
Description
It's kind of annoying to have to get NAXIS3 and do multiple calls to
psFitsReadImage, etc, so I propose a new set of functions: psFitsReadImageCube,
psFitsWriteImageCube, psFitsUpdateImageCube, psFitsInsertImageCube. Instead of
working on a single 2D image, these functions will work on a psArray of images.
psArray *psFitsReadImageCube(const psFits *fits, psRegion region);
bool psFitsUpdateImageCube(psFits *fits, const psArray *input, int x0, int y0);
bool psFitsWriteImageCube(psFits *fits, psMetadata *header, const psArray
*input, const char *extname);
bool psFitsInsertImageCube(psFits *fits, psMetadata *header, const psArray
*input, const char *extname, bool after);
In the process of putting these together, I noticed differences between the
Image (or the ImageCube) functions and the Table functions, specifically in the
use of the extname.
bool psFitsWriteImageCube(psFits *fits, psMetadata *header, const psArray
*input, const char *extname);
bool psFitsWriteTable(psFits* fits, const psMetadata *header, const psArray*
table);
bool psFitsInsertImageCube(psFits *fits, psMetadata *header, const psArray
*input, const char *extname, bool after);
bool psFitsInsertTable(psFits *fits, const psMetadata *header, const psArray*
table, bool after);
I propose adding the extname to the Table functions, following the Image
functions. This would mean that it is the responsibility of pslib to update the
header with the EXTNAME.
Change History (4)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
| Status: | new → assigned |
|---|
Gene accepts these proposals; I am to write the code. I will work in the
rel10_ifa branch.
comment:3 by , 20 years ago
| bug_group: | IPP-doc? → PSLib? |
|---|---|
| Component: | PSLib SDRS → fits |
| Keywords: | PSLib added; IPP-doc removed |
| Owner: | changed from to |
| product: | IPP-doc → PSLib |
| Status: | assigned → new |
| Version: | unspecified → 0.10.0 |
comment:4 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
these were finished a long time ago.

Some code that might be helpful for psFitsWriteImageCube follows. It checks
that NAXIS3 is in the header and then makes repeated calls to psFitsWriteImage.
Number of image planes
hdu->images->n)) {
"NAXIS3"); Item with NAXIS3
PS_META_REPLACE, "Number of image planes",
hdu->extname)) {