View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

mscred/ccdproc problem

vicky wrote on Jan 05, 2006

Hi,

I am using mscred/ccdproc for data reduction of some binned data, but the values of CCDSEC and DATASEC are different in the headers. When I tired to run zerocombine/ccdproc, I got the fellowing error message:

ERROR on line 491: Size of DATASEC and CCDSEC do not agree
ccdproc (images=@biaslist)

I have read some README for mscred V3.2 said that the error is fixed, so I have no idea what happen to my mscred. I am using V4.8

Thank you very much for any help.

Vicky

Mike Fitzpatrick wrote on Jan 05, 2006

Check that you have a DATASEC keyword in the image header, if not it will default to the entire image size and produce the mismatch with any specified CCDSEC value. Other users have had this in the past, search the forums for previous mail.

-Mike

vicky wrote on Jan 05, 2006

Hi Mike,

I have both DATASEC and CCDSEC keywords in the image header, but they are different because it is a binned image.

For seaching the forum, I have tried to use the search but didn't find anything about datasec. Does the search include the emails as well?

Thanks again for your help.

Vicky

vicky wrote on Jan 05, 2006

Hi Mike,

I found something in the mails, should I delete the CCDSEC keyword? Is there any way other than delete the CCDSEC keyword, in order to make it works.

Thanks!

vicky

Mike Fitzpatrick wrote on Jan 05, 2006

Depends on what your header looks like. See

http://iraf.net/phpBB2/viewtopic.php?t=82531&highlight=ccdsec+datasec+binned

for sample mail on when/why you would delete CCDSEC but with binned data I'm not sure. Frank will see this and may reply once he's free for a minute, assuming you don't find the answer sooner.

-Mike

vicky wrote on Jan 05, 2006

Hi Mike,

I am not sure whether I should delete the CCDSEC or not because I have both the TRIMSEC and DATASEC, here is a sample header for you or Frank to look at:


DETSIZE = '[1:4128,1:4098] ' / UNBIN DET SIZE
CCDSUM = '2 2 '
SECPIX1 = 0.6720000
SECPIX2 = 0.6720000
NAMPS = 4
DATASEC = '[9:1032,1:1024] ' / BINNED DATA SECT
TRIMSEC = '[9:1032,1:1024] ' / BINNED DATA SECT
ORIGSEC = '[1:1024,1:1024] ' / BINNED DATA SECT
LTV1 = 8.2500000
LTV2 = 0.2500000
ATV1 = 0.0000000
ATV2 = 0.0000000
LTM1_1 = 0.5000000
LTM2_2 = 0.5000000
ATM1_1 = 1.0000000
ATM2_2 = 1.0000000
DTM1_1 = 1.0000000
DTM2_2 = 1.0000000
DETSEC = '[2049:4128,2049:4098]' / UNBIN AMPSECT
CCDSEC = '[2049:4128,2049:4098]' / UNBIN AMPSIZE
DTV1 = 2064.0000000
DTV2 = 2048.0000000
BIASSEC = '[2:7,3:1020] ' / BINNED DATA SECT
CD1_1 = -0.0001867
CD1_2 = 0.0000000
CD2_1 = 0.0000000
CD2_2 = 0.0001867
CRPIX1 = 8.0000000


What I need to do is datat reduction then will do photometry on it.

Thank you very much again for your help.

Regards,
Vicky

Francisco Valdes wrote on Jan 05, 2006

When the size of a section is discussed, such as with the error message, the size is computed as (max-min+1). With binning you then have to add a binning factor. In this case it seems the sizes are really not the same.

DATASEC = [9:1032,1:1024] = 1024x1024 -> x2 = 2048x2048
CCDSEC = [2049:4128,2049:4098] = 2080x2050

I think your CCDSEC should be [2049:4096,2049:4096]

It looks like the CCDSEC is including the psuedo bias pixels/region. But the definition is that CCDSEC is the active CCD pixels that map to the pixels stored in the image in the DATASEC.

The note you found about a bug being fixed was probably an "off by one" error.

BTW the attempt to use binned pixels for what is in the image file and unbinned pixels to refer to the CCD is correct for MSCRED. In the earlier CCDRED package this was not the case.

Yours,
Frank

Guest wrote on Jan 05, 2006

Hi Frank,

Thanks! I edited the CCDSEC and that solved the mismatch problem but I have another problem concerning the zerocor now.

After zerocombine I have the Zero.fits, then I tried to apply the zero level correction to other images (e.g. ms>ccdproc flat001.fits), but I got an error:


ERROR: Error processing flat001.fits


Here is the parameters file for ccdproc:

(output = ) List of output processed images
(bpmasks= ) List of output bad pixel masks
(ccdtype= ) CCD image type to process
(noproc = no) List processing steps only?

(xtalkco= no) Apply crosstalk correction?
(fixpix = yes) Apply bad pixel mask correction?
(oversca= no) Apply overscan strip correction?
(trim = no) Trim the image?
(zerocor= yes) Apply zero level correction?
(darkcor= no) Apply dark count correction?
(flatcor= no) Apply flat field correction?
(sflatco= no) Apply sky flat field correction?
(split = no) Use split images during processing?
(merge = yes) Merge amplifiers from same CCD?

(xtalkfi= ) Crosstalk file
(fixfile= ) List of bad pixel masks
(saturat= INDEF) Saturated pixel threshold
(sgrow = 0) Saturated pixel grow radius
(bleed = INDEF) Bleed pixel threshold
(btrail = 20) Bleed trail minimum length
(bgrow = 0) Bleed pixel grow radius
(biassec= image) Overscan strip image section
(trimsec= image) Trim data section
(zero = Zero) List of zero level calibration images
(dark = ) List of dark count calibration images
(flat = *FLAT*) List of flat field images
(sflat = ) List of secondary flat field images
(minrepl= 1.) Minimum flat field value

(interac= no) Fit overscan interactively?
(functio= spline3) Fitting function
(order = 3) Number of polynomial terms or spline pieces
(sample = *) Sample points to fit
(naverag= 1) Number of sample points to combine
(niterat= 3) Number of rejection iterations
(low_rej= 3.) Low sigma rejection factor
(high_re= 3.) High sigma rejection factor
(grow = 0.) Rejection growing radius
(fd = )
(fd2 = )
(mode = ql)


When I turned off the zerocor, it worked fine but I need to apply the zero correction.

Thank you very much for any help.

Regards,
Vicky

    Francisco Valdes wrote on Jan 05, 2006

    Hi Vicky,

    The error message means that CCDPROC decided that a calibration file, one needed to process the specified file which is the flat in this case, needs additional calibration. The reason it is an error is that in MSCRED.CCDPROC it cannot automatically recurse and process any dependencies.

    So the possiblities I can think of are:


    • You did not have processing turned on when you ran ZEROCOMBINE
    • You change the processing options between processing the zero and processing the flat; e.g. you turned on "fixpix" but it was not turned on when you did the zero.
    • There is something going on with the fixpix option which you have turned on but don't have anything specified for the fixfile.
      </ul>

      It seems funny to me that you don't have overscan and trim turned on, though it is legal and might mean you don't have any or useful overscan information.

      I hope this help.

      Frank </div> --- *Last post on Jan 05, 2006*