View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

mscred - ccdproc - trim: MERGING PROBLEM in column number

Robert Janusz wrote on Aug 04, 2008

I have a problem with merging 2 amplifiers into 1 frame by means of "mscred.ccdproc" - I can have only odd number of columns {(2n+1): where n = 1, 2 , 3, 4...}. Why is it so? It seems that 1 column in the middle is averaged? I deal with 1 physical CCD 2 readout amps giving one MEF.

I run:

mscred
setinstr ...
ccdproc(s1,ccdtype='',overs+,trim+,zeroc-,darkc-,flatc-,merge+)

The 1st extension header is:
EXTNAME = 'im1 ' / Extension name
IMAGEID = 1 / Image ID
CCDNAME = 'ccd1 ' / CCD name
DETSIZE = '[1:2032,1:2032]' / Detector size
CCDSIZE = '[1:2032,1:2032]' / CCD size
DATASEC = '[1:1016,1:2032]' / Data section
BIASSEC = '[1017:1036,1:2032]' / Bias section
TRIMSEC = '[1:1016,1:2032]' / Trim section
AMPSEC = '[1:1016,1:2032]' / Amplifier section
DETSEC = '[1:1016,1:2032]' / Detector section
CCDSEC = '[1:1016,1:2032]' / CCD section

The 2nd extension header is:
EXTNAME = 'im2 ' / Extension name
IMAGEID = 2 / Image ID
CCDNAME = 'ccd1 ' / CCD name
DETSIZE = '[1:2032,1:2032]' / Detector size
CCDSIZE = '[1:2032,1:2032]' / CCD size
DATASEC = '[1:1016,1:2032]' / Data section
BIASSEC = '[1017:1036,1:2032]' / Bias section
TRIMSEC = '[1:1016,1:2032]' / Trim section
AMPSEC = '[1:1016,1:2032]' / Amplifier section
DETSEC = '[2032:1017,1:2032]' / Detector section
CCDSEC = '[2032:1017,1:2032]' / CCD section

ccdproc.biassec = "[1020:1035,1:2032]"
ccdproc.trimsec = "[9:1016,1:2015]"

After ccdproc: # WHY NOT [2016,...] but below is [2015,...] #

a0001[2015,2015][real]
...
IMAGEID = 1 / Image ID
CCDNAME = 'ccd1 ' / CCD name
CCDSIZE = '[1:2032,1:2032]' / CCD size
AMPSEC = '[1:1016,1:2032]' / Amplifier section
DETSEC = '[9:1016,1:2015]' / Detector section
CCDSEC = '[9:2023,1:2015]' / CCD section
WCSDIM = 2
LTM1_1 = 1.
LTM2_2 = 1.
WAT0_001= 'system=physical'
WAT1_001= 'wtype=linear'
WAT2_001= 'wtype=linear'
OVSNMEAN= 2038.048
LTV1 = -8.
TRIM = 'Aug 4 21:43 Trim is [9:1016,1:2015]'
OVERSCAN= 'Aug 4 21:43 Overscan is [1020:1035,1:2032], mean 2038.048'
CCDMEAN = 6.53615

So I lose 1 unit in x. :cry:

Thank you for explanation.

Francisco Valdes wrote on Aug 04, 2008

Hi,

I'm not sure what is happening. Could you email me (valdes@noao.edu) the full headers for the two extensions and I will make dummy data to repeat the ccdproc operation.

Yours,
Frank Valdes

Francisco Valdes wrote on Aug 04, 2008

Hi Robert,

Thanks for the data. I found the source of the problem. For the last version (the one identified as
V4.8 ) there was a bug fix for binned data. However it causes you error where you have
flipped CCDSEC/DETSEC in the raw data. The bug log is reproduced below. I have put a
fixed version of the source and binaries for some systems in the ftp://iraf.noao.edu/iraf/extern/
directory.

Yours,
Frank


NUMBER: 562
MODULE: mscred.ccdproc
SYSTEM: V4.8
DATE: Tue Aug 12 12:19:30 MST 2008
FROM: valdes

BUG: The fix for bug number 546 was not fully correct. It works for
binned data but results in an error for data which is flipped
(e.g. when CCDSEC/DETSEC have a starting column greater than
the ending column as in '[2048:1025,1:2048]'. The error
is that the resulting CCDSEC in the processed image will
be off by one. This can result is losing a column when
merging multiple amps.

STATUS: Fixed for mscred V4.9.

Last post on Aug 04, 2008