Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: 2 April 2013

URL: http://cxc.harvard.edu/ciao/bugs/dmimgcalc.html

Bugs: dmimgcalc


Table of Contents

Caveats

Bugs


Caveats

Mixing scalar and array values  (07 Mar 2008)

Users need to be careful when trying to mix scalar and array operations to get the correct results. For example

unix% dmimgcalc img.fits none out.fits op="imgout=5"

Does not produce an image the same size as img.fits whose values are all 5. Rather one gets a 1x1 image with the value=5. To get an image with all values set to 5 we can do something like

unix% dmimgcalc img.fits none out.fits op="imgout=(img1*0)+5"
unix% dmimgcalc img.fits none out.fits op="imgout=(img1/img1)*5"

Bugs

Boolean operators - such as < and > - are not working on arrays (e.g. images).

Note that threshold conditions may be more easily applied by using dmimgthresh instead of this tool.

dmimgcalc corrupts the file history  (07 Mar 2008)

dmimgcalc corrupts the history records in the file header, duplicating previous history entries.

Error status is not set when lookupTab is missing  (19 Aug 2011)

unix% dmimgcalc thresh.img bin4.0.expmap out.img look=mylookup.lis op=div
ERROR Could not open the lookup table : mylookup.lis

The exit status is not set to an error code:

unix% echo $status
0

The tool segmentation faults if the input file is a table  (28 Feb 2012)

unix% dmimgcalc infile=img.a,img.b infile2= \
      outfile=sub.fits op='imgout=img1-img2'
warning: ASPTYPE has different value...Merged...
BTIMDRFT not present in all input files...FAIL...
BTIMNULL not present in all input files...FAIL...
BTIMRATE not present in all input files...FAIL...
warning: DATAMODE has different value...Merged...
warning: DS_IDENT has different value...Merged...
omit - FOC_LEN values different more than 1.000000
warning: OBJECT has different value...Merged...
warning: OBSERVER has different value...Merged...
omit - ROLL_NOM values different more than 1.000000
warning: SEQ_NUM has different value...Merged...
warning: TITLE has different value...Merged...
# 49970: Received error signal SIGSEGV-segmentation violation.
# 49970: An invalid memory reference was made.
# 49970: segmentation fault: dmimgcalc (1) is: exit_upon_error->NULL

unix% dmlist img.a blocks

--------------------------------------------------------------------------------
Dataset: img.a
--------------------------------------------------------------------------------

     Block Name                          Type         Dimensions
--------------------------------------------------------------------------------
Block    1: PRIMARY                        Null        
Block    2: EVENTS                         Table        15 cols x 634221   rows
Block    3: GTI7                           Table         2 cols x 1        rows

Last modified: 2 April 2013
CXC logo

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2012. All rights reserved.