[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62069] masking negative pixels incorrectly for huge values (larger
From: |
Mohammad Akhlaghi |
Subject: |
[bug #62069] masking negative pixels incorrectly for huge values (larger than int16) |
Date: |
Wed, 16 Feb 2022 19:14:03 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?62069>
Summary: masking negative pixels incorrectly for huge values
(larger than int16)
Project: GNU Astronomy Utilities
Submitted by: pedram
Submitted on: Thu 17 Feb 2022 12:14:02 AM UTC
Should Start On: Wed 16 Feb 2022 12:00:00 AM UTC
Should be Finished on: Wed 16 Feb 2022 12:00:00 AM UTC
Category: None
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Percent Complete: 0%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Effort: 0.00
_______________________________________________________
Details:
# steps to reproduce
$ astarithmetic 200 200 2 makenew 5 mknoise-sigma int16 -o test.fits -q
$ aststatistics test.fits --minimum
-21
$ astarithmetic test.fits set-i i i 65535 gt nan where -q -oout.fits
$ aststatistics out.fits --minimum
0
# workaround
$ astarithmetic 200 200 2 makenew 5 mknoise-sigma int16 -o test.fits -q
$ aststatistics test.fits --minimum
-21
$ astarithmetic test.fits set-i i i 65535 int32 gt nan where -q -oout.fits
$ aststatistics out.fits --minimum
-21
# proposed solution
We should check the minimum of the input image. If it contains negative
values, then we should let 'arithmetic' know that '65535' --which it looks
like is considered to be an unsigned integer-- should be taken as a 'signed
integer'.
# acknowledgement
This problem was first reported by Zohreh Ghaffari.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62069>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #62069] masking negative pixels incorrectly for huge values (larger than int16),
Mohammad Akhlaghi <=