gnuastro-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[task #16123] masking negative pixels incorrectly for huge values (large


From: Pedram Ashofteh Ardakani
Subject: [task #16123] masking negative pixels incorrectly for huge values (larger than int16)
Date: Wed, 16 Feb 2022 03:11:08 -0500 (EST)

URL:
  <https://savannah.gnu.org/task/?16123>

                 Summary: masking negative pixels incorrectly for huge values
(larger than int16)
                 Project: GNU Astronomy Utilities
            Submitted by: pedram
            Submitted on: Wed 16 Feb 2022 08:11:06 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: Arithmetic
                Priority: 5 - Normal
              Item Group: Output not reasonable
                  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/task/?16123>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]