Integer values of 0 are treated as blanks.
There is a bug in the Python CALDB module that misinterprets the integer value zero (0) as a blank. For example:
>>> from caldb4 import * >>> c = Caldb( "CHANDRA", "ACIS", "BKGRND", "acisf04469N003_evt2.fits") >>> c.ccd_id=0 >>> ret = c.search >>> print(ret) ['/soft/ciao-4.9/CALDB/data/chandra/acis/bkgrnd/acis6iD2000-12-01bkgrnd_ctiN0004.fits']
In the above example the wrong CALDB file was identified. The example requested the data for ccd_id=0, but the file that was returned, acis6..., is for ccd_id=6.
This is a specific special case for the integer value equal to 0. Other non-zero integer values work correctly.
Users can work around this problem by using a string representation for the value rather than an integer. For example:
>>> from caldb4 import * >>> c = Caldb( "CHANDRA", "ACIS", "BKGRND", "acisf04469N003_evt2.fits") >>> c.ccd_id=str(0) >>> ret = c.search >>> print(ret) ['/soft/ciao-4.9/CALDB/data/chandra/acis/bkgrnd/acis0iD2000-12-01bkgrnd_ctiN0004.fits']
By replacing the integer 0 with the string "0", the correct file is located.