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
Item Group:  Output not reasonable Status:  Postponed
Privacy:  Public Assigned to:  None
Open/Closed:  Open

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

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-8eb0.
    Corresponding source code