bugGNU Astronomy Utilities - Bugs: bug #53362, Can't use max 8-bit value in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #53362: Can't use max 8-bit value in Arithmetic

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Fri 16 Mar 2018 05:23:59 PM UTC
   
 
Category:  Arithmetic Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Output not reasonable
Status:  Postponed Privacy:  Public
Assigned to:  None Open/Closed:  Open

Discussion

Wed 06 Nov 2024 11:54:05 AM UTC, comment #1: 

Until this bug is fixed, you can use the following command to take the 8-bit image (assumed it is called 'uint8.fits') to a larger integer width type, and convert the NaN/blanks to 255. All the operations and programs will work as expected on the output 'uint16.fits' file.


astarithmetic uint8.fits uint16 set-i i i isblank 255 where \
              --output=uint16.fits


Mohammad Akhlaghi <makhlaghi>
Group administrator
Fri 16 Mar 2018 05:23:59 PM UTC, original submission:  

The maximum of the 8-bit (or any other unsigned integer type) or the minimum of the signed integer types cannot be used in Arithmetic because Gnuastro defines them as blank values.

But in some contexts, these values may be meaningful (for example if you want to invert the pixels in an 8-bit image, you want to calculate 255 - p). Therefore, currently such operations are not possible with Arithmetic (the output will be completely blank).

To fix this, we need to add an option to Arithmetic so for integer types, it can ignore the blank values (and just treat them as a number).

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-ed84.
    Corresponding source code