IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 21 years ago

Last modified 20 years ago

#236 closed defect (duplicate)

psImageWriteSection and image sizes

Reported by: Paul Price Owned by: Paul Price
Priority: normal Milestone:
Component: imageops Version: 0.3.0
Severity: minor Keywords:
Cc: Eric.VanAlst@…

Description

In the event that the FITS file exists, psImageWriteSection in rel3 does not
compare the NAXIS[12] and numCols,numRows of the psImage to ensure that they agree.

For example, I had created a 512x512 FITS file by running my program once, then
altered the setup so that it was supposed to write a larger image, 1024x1024,
but the file was consistently 512x512 because it already existed at that size.

Attachments (1)

psFitsWriteImageBug.c (960 bytes ) - added by Paul Price 21 years ago.
psFitsWriteImageBug.c

Download all attachments as: .zip

Change History (12)

comment:1 by robert.desonia@…, 22 years ago

Owner: changed from robert.desonia@… to Paul Price

This function was depreciated, but the question of what the proper behaviour is
still in question for the new image write function.

If the FITS image is 512x512, as in your example, and an 1024x1024 image is
given to psFitsUpdateImage (see bug #226), should we error, write only 512x512
of the input image, or resize the FITS image size (possibly a very costly
operation)?

-rdd

comment:2 by Paul Price, 22 years ago

Status: newassigned

I think the condition indicates that something unexpected has happened, so it
should be an error.

comment:3 by Eric.VanAlst@…, 21 years ago

Resolution: fixed
Status: assignedclosed

Funciton psFitsUpdateImage checks the region to update versus current image and
will generate error if update is outside original.

comment:4 by Paul Price, 21 years ago

Resolution: fixed
Status: closedreopened

I have not tried psFitsUpdateImage, but psFitsWriteImage does not produce an
error when writing to a file that already exists, even if the extant file
contains an image of a different size. In any case, the data is not written,
and no error is generated.

I am attaching code that demonstrates the bug. It creates two images, and
writes them out to the same file name (e.g., simulating a typo in the name). I
would expect one of the two behaviours:

  1. Not write the image and return an error; or
  2. Write the image and generate a warning.

The actual behaviour is to not write the image and not tell anyone:

price@mithrandir:/home/mithrandir/price/testing>./psFitsWriteImageBug
Done.

Inspection of the image reveals that all values are +1, corresponding to the
first image, despite writing the second image on top.

comment:5 by Paul Price, 21 years ago

Owner: changed from Paul Price to Eric.VanAlst@…
Status: reopenednew

by Paul Price, 21 years ago

Attachment: psFitsWriteImageBug.c added

psFitsWriteImageBug.c

comment:6 by Eric.VanAlst@…, 21 years ago

Owner: changed from Eric.VanAlst@… to Paul Price

Executing the write image bug software on release 6 will generate a single fits
file with multiple extensions. The first image will have values of 1 and the
second image will have values of -1. If the test is executed again, two
additional images with corresponding values of 1 and -1 are added to the file.
This is no warning or error message generated. The SDR-14 does not specify what
should be done if such a situation occurs. What should be the appropriate action?

comment:7 by Paul Price, 21 years ago

Cc: Eric.VanAlst@… added
dependson: 412
Status: newassigned

This seems to be related to bug 412.

The actual behaviour isn't what I would expect, but we need to think about how
we're going to write extensions and create new extensions.

comment:8 by robert.desonia@…, 21 years ago

The only open issue here seems to be covered by Bug 412. I would say let's just
close this bug and deal with 412.

-rdd

comment:9 by Paul Price, 21 years ago

Resolution: duplicate
Status: assignedclosed

Agreed.

* This bug has been marked as a duplicate of 412 *

comment:10 by Paul Price, 20 years ago

Keywords: VERIFIED added

Bug has been resolved.... closing.

comment:11 by Paul Price, 20 years ago

Keywords: VERIFIED removed

Bugs have been fixed... closing.

Note: See TracTickets for help on using tickets.