Opened 11 years ago
Closed 10 years ago
#209 closed defect (fixed)
size of mask image can be bigger than input image
Reported by: | MatthewWhiting | Owned by: | MatthewWhiting |
---|---|---|---|
Priority: | normal | Milestone: | Release-1.6 |
Component: | Output | Version: | 1.5 |
Severity: | normal | Keywords: | |
Cc: |
Description
When running Duchamp on H201, I noticed that the mask output (tagging objects with the ID number) is bigger than the input image.
aquarius-107% ls -ltr total 220472 -rw-r--r-- 1 hsu004 at-vacstu 55779840 Nov 25 11:50 H201_abcde_luther_chop.fits -rw-r--r-- 1 hsu004 at-vacstu 48185280 Nov 25 11:50 atlas-cdfs.fits -rw-r--r-- 1 hsu004 at-vacstu 102 Nov 25 11:50 duchampHIPASS.in~ -rw-r--r-- 1 hsu004 at-vacstu 105 Nov 25 11:50 duchampATLAS.in -rw-r--r-- 1 hsu004 at-vacstu 8311314 Nov 25 11:50 Whiting_3D_sourcefinding.pdf -rw-r--r-- 1 hsu004 at-vacstu 809919 Nov 25 14:27 UserGuide-1.5.pdf -rw-r--r-- 1 hsu004 at-vacstu 14318 Dec 4 14:06 duchampDefaultParameters~ -rw-r--r-- 1 hsu004 at-vacstu 14318 Dec 4 14:06 duchampDefaultParameters -rw-r--r-- 1 hsu004 at-vacstu 118 Dec 6 14:25 duchampHIPASS.txt~ -rw-r--r-- 1 hsu004 at-vacstu 118 Dec 6 14:25 duchampHIPASS.txt -rw-r--r-- 1 hsu004 at-vacstu 14318 Dec 6 14:26 duchampDefaultParameters.txt -rw-r--r-- 1 hsu004 at-vacstu 177 Jan 10 16:12 duchampHIPASS.in -rw-r--r-- 1 hsu004 at-vacstu 7038 Jan 10 16:15 duchamp-Results.txt -rw-r--r-- 1 hsu004 at-vacstu 427224 Jan 10 16:15 duchamp-MomentMap.ps -rw-r--r-- 1 hsu004 at-vacstu 213333 Jan 10 16:15 duchamp-DetectionMap.ps -rw-r--r-- 1 hsu004 at-vacstu 506223 Jan 10 16:15 duchamp-Spectra.ps -rw-r--r-- 1 hsu004 at-vacstu 7558 Jan 10 16:15 duchamp-Catalogue.dpc -rw-r--r-- 1 hsu004 at-vacstu 111418560 Jan 10 16:16 H201_abcde_luther_chop.MASK.fits -rw-r--r-- 1 hsu004 at-vacstu 7196 Jan 10 16:16 duchamp-Results.ann
Not clear why this is - look at encoding of the FITS file?
Change History (3)
comment:1 Changed 10 years ago by
Status: | new → assigned |
---|
comment:2 Changed 10 years ago by
[1354] makes several changes to the writing classes.
The first changes the default value of BITPIX for the mask images to SHORT_IMG, as that will be sufficient for most cases.
For the mask images, if there are 32768 or more objects and we are tagging by object ID, then we change it to LONG_IMG.
I have also made a few front-end functions that handle the fitsio writing-to-FITS-file functionality. There is one for floats (that has the option of doing the flagging of blank pixels), one for ints and one for longs.
These functions are now used by all the derived classes that write the different types of FITS files.
The mask writing now has different writing functions depending on which mode (tagging by object ID or not) and datatype we are using.
Need to confirm it is working correctly, then will close.
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Looks fine after testing on cuscus. Closing ticket.
Mask image defaults to LONG_IMG bitpix type, but in this case the input image (a HIPASS image) is stored as int i.e. bitpix =INT_IMG which uses half the space.
Solution might be to adaptively set (in the WriteMask? constructor) the bitpix according to how many objects there are. Long is probably overkill in the majority of cases anyway.