Bug 125329 - FITS blank pixel value ignored
Summary: FITS blank pixel value ignored
Status: RESOLVED INTENTIONAL
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-11 01:59 UTC by D. V. Wiebe
Modified: 2008-05-12 20:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot of kst with BLANK pixels shown (70.60 KB, image/png)
2006-04-11 16:01 UTC, Matthew Truch
Details
FITS header for image from above screenshot (7.51 KB, text/plain)
2006-04-11 16:03 UTC, Matthew Truch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description D. V. Wiebe 2006-04-11 01:59:41 UTC
Version:           1.3.0_devel (using KDE 3.5.1, compiled sources)
Compiler:          gcc version 3.4.5
OS:                Linux (i686) release 2.6.14.6

kst fails to honour the BLANK card of the FITS header.

FITS files generally have a BLANK card in the headers which indicate the value which is assigned to pixels that are uninitialised.

kst ignores this value: instead it paints these unintialised pixels the colour corresponding to the BLANK pixel value.

Ideally, these pixels should not be painted.
Comment 1 Ted Kisner 2006-04-11 08:56:53 UTC
According to the FITSIO standard, tables and images containing 
*floating-point* NULL values have these cells/pixels set to NaN.  So kst 
should already ignore such entries.

Could you provide an example FITS file where the file has NULL pixel/element 
values that are not returned as NaN's in fits_read_col?

-Ted

On Monday 10 April 2006 16:59, D.V.Wiebe wrote:
| kst fails to honour the BLANK card of the FITS header.
|
| FITS files generally have a BLANK card in the headers which indicate the
| value which is assigned to pixels that are uninitialised.
|
| kst ignores this value: instead it paints these unintialised pixels the
| colour corresponding to the BLANK pixel value.
|
| Ideally, these pixels should not be painted.
Comment 2 Matthew Truch 2006-04-11 16:01:36 UTC
Created attachment 15565 [details]
Screenshot of kst with BLANK pixels shown

Screenshot of kst viewing file where BLANK card in FITS header is set to 0.,
and instead of ignoring those pixels, kst plots them as 0. (This is the area
outside the tilted rectangle.
Comment 3 Matthew Truch 2006-04-11 16:03:19 UTC
Created attachment 15566 [details]
FITS header for image from above screenshot

The header from the FITS file plotted above (includes the BLANK key).
Comment 4 Ted Kisner 2006-04-11 17:12:18 UTC
ok, sorry.  I thought you were talking about NULL values, not BLANK image 
pixels.  I'll fix this shortly.

-Ted

On Tuesday 11 April 2006 07:01, Matthew Truch wrote:
| ------- You are receiving this mail because: -------
| You are the assignee for the bug, or are watching the assignee.
|
| http://bugs.kde.org/show_bug.cgi?id=125329
|
|
|
|
| ------- Additional Comments From matt truch net  2006-04-11 16:01 -------
| Created an attachment (id=15565)
|  --> (http://bugs.kde.org/attachment.cgi?id=15565&action=view)
| Screenshot of kst with BLANK pixels shown
|
| Screenshot of kst viewing file where BLANK card in FITS header is set to
| 0., and instead of ignoring those pixels, kst plots them as 0. (This is the
| area outside the tilted rectangle.
| _______________________________________________
| Kst mailing list
| Kst@kde.org
| https://mail.kde.org/mailman/listinfo/kst
Comment 5 Andrew Walker 2008-04-30 23:30:44 UTC
The BLANK keyword is defined as follows:

"This keyword shall be used only in headers with positive values of BITPIX (i.e., in arrays with integer data). Columns 1-8 contain the string, ``BLANK   '' (ASCII blanks in columns 6-8). The value field shall contain an integer that specifies the representation of array values whose physical values are undefined."
Comment 6 Andrew Walker 2008-05-01 20:00:21 UTC
If I read the definition of BLANK correctly it is only valid for positive BITPIX values. However, the FITS image mentioned in the bug report has a BITPIX value of -64.
Comment 7 Andrew Walker 2008-05-01 21:17:02 UTC
Could someone (Don?) please attach the FITS file that is referred to in the bug report. Thanks.
Comment 8 Andrew Walker 2008-05-12 20:15:00 UTC
Please reopen this bug after attaching the FITS image that is referred to in the bug report.