View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

ccdproc and flat correction within script

smp wrote on Nov 11, 2008

Hi,
(1)
Following is a segment of my procedure script.

I want to do flat correction using ccdproc:

I have list of images : joinlist_sci
Output should be flat corrected images which form a list: reducedlist

i.e. joinlist_sci contains
j_sci_bs_os_1.fits
j_sci_bs_os_2.fits
j_sci_bs_os_3.fits
j_sci_bs_os_4.fits
j_sci_bs_os_5.fits

and reducedlist contains
reduced_sci_1.fits
reduced_sci_2.fits
reduced_sci_3.fits
reduced_sci_4.fits
reduced_sci_5.fits


  ccdproc(images = "@"//joinlist_sci, output = "@"//reducedlist, ccdtype = "", fixpix = no,
        overscan = no, trim = no, zerocor = no, darkcor = no, flatcor = yes, flat = "mb_os_mflat.fits")



I run the script, I get the error:

ERROR on line 354: ambiguous parameter `flat' within `<searchpath>'


So how to correct this?
-------------------------------------------------------------------------------------------------
(2)

So, I try following in the command mode (for checking purpose):



PACKAGE = ccdred
   TASK = ccdproc

images  =        @joinlist_sci  List of CCD images to correct
(output =         @reducedlist) List of output CCD images
(ccdtype=                     ) CCD image type to correct
                      :
                      :
(fixpix =                   no) Fix bad CCD lines and columns?
(oversca=               no) Apply overscan strip correction?
(trim   =                    no) Trim the image?
(zerocor=                no) Apply zero level correction?
(darkcor=                no) Apply dark count correction?
(flatcor=                  yes) Apply flat field correction?
(illumco=                 no) Apply illumination correction?
(fringec=                  no) Apply fringe correction?
(readcor=                no) Convert zero level image to readout correction?
(scancor=                   no) Convert flat field image to scan correction?
(readaxi=                 line) Read out axis (column|line)
(flat   =     mb_os_mflat.fits) Flat field images
                      :
                      :


After executing ccdproc, I get error:


cc> ccdproc
Bad param assignment, line 1: `j_sci_bs_os_1.fits'
Bad param assignment, line 2: `j_sci_bs_os_2.fits'
Bad param assignment, line 3: `j_sci_bs_os_3.fits'
Bad param assignment, line 4: `j_sci_bs_os_4.fits'
Bad param assignment, line 5: `j_sci_bs_os_5.fits'
ERROR: Iraf Main: Unknown task name ()


Then I unlearned ccdproc, and repeated (2) above. Then I get following error:


cc> ccdproc
List of CCD images to correct (@joinlist_sci):
ERROR: Input and output lists do not match


I get two different errors for two runs of ccdproc in command mode!
Why does this happen?
--------------------------------------------------------------------------------------------------------
Please help to sort out this problem.

regards

Francisco Valdes wrote on Nov 11, 2008

1) This error occurs in scripts when there is a parameter which matches a variable with a minimum match. One solution is typically to declare a dummy parameter in your script "string flat" even if you don't use it. I can't tell more without the whole script.

2) It is hard to spot the problem. Send the result of listing all the parameters right before you execute the task:


cl> lpar ccdproc
cl> ccdproc


Yours,
Frank Valdes

Last post on Nov 11, 2008