View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Script problem

nrowell wrote on Aug 31, 2007

Hi,
I'm relatively new to writing scripts, i've used IRAF a lot but only just started combining operations into cl scripts. I've got a script that performs CCD reductions on a bunch of fits images. All steps work fine except the very last call to CCDPROC, it reaches this stage then returns an error:

** Syntax error
**: naverage=1, niterate=1, low_reject=3., high_reject=3., grow=1.)
^
I'm completely stumped as to why it's doing this. If i paste the CCDPROC command into the prompt rather than run it through the script it works fine. Is there a limit on script length or something?
Here's the script:


noao
imred
ccdred

zerocombine ("bias*",
output="Zero", combine="average", reject="minmax", ccdtype=" ", process=no,
delete=no, clobber=no, scale="none", statsec="", nlow=0, nhigh=1, nkeep=1,
mclip=yes, lsigma=3., hsigma=3., rdnoise="5.4", gain="2.43", snoise="0.",
pclip=-0.5, blank=0.)

mkdir calib
mv bias* calib/

ccdproc ("dflat*, skyflat*, Target*, SP*, Tell*, Arc*",
output=" ", ccdtype=" ", max_cache=0, noproc=no, fixpix=no, overscan=yes,
trim=yes, zerocor=yes, darkcor=no, flatcor=no, illumcor=no, fringecor=no,
readcor=no, scancor=no, readaxis="column", fixfile=" ",
biassec="[51:501,4105:4190]", trimsec="[75:501,1:2200]", zero="Zero", dark="",
flat=" ", illum=" ", fringe="", minreplace=1., scantype="shortscan", nscan=1,
interactive=no, function="chebyshev", order=9, sample="*", naverage=1,
niterate=1, low_reject=3., high_reject=3., grow=1.)

combine ("skyflat*",
"sFlat", plfile="", sigma="", ccdtype="", subsets=no, delete=no, clobber=no,
combine="median", reject="none", project=no, outtype="real", offsets="none",
masktype="none", maskvalue=0., blank=0., scale="mode", zero="none",
weight="none", statsec="", lthreshold=INDEF, hthreshold=INDEF, nlow=1,
nhigh=1, nkeep=1, mclip=yes, lsigma=3., hsigma=3., rdnoise="5.4", gain="2.43",
snoise="0.", sigscale=0.1, pclip=-0.5, grow=0)

mv skyflat* calib/

hedit ("sFlat",
"OBSTYPE", "TARGET", add=no, addonly=no, delete=no, verify=no, show=yes,
update=yes)

flatcombine ("dflat*",
output="dFlat", combine="median", reject="crreject", ccdtype=" ", process=no,
subsets=no, delete=no, clobber=no, scale="mode", statsec="", nlow=1, nhigh=1,
nkeep=1, mclip=yes, lsigma=3., hsigma=3., rdnoise="5.4", gain="2.43",
snoise="0.", pclip=-0.5, blank=1.)

twodspec
longslit

response ("dFlat",
"dFlat", "nFlat", interactive=no, threshold=INDEF, sample="*", naverage=1,
function="spline3", order=20, low_reject=0., high_reject=0., niterate=1,
grow=0., graphics="stdgraph", cursor="")

mv dflat* calib/

ccdproc ("Target*, SP*, Tell*, Arc*, sFlat*",
output=" ", ccdtype=" ", max_cache=0, noproc=no, fixpix=no, overscan=yes,
trim=yes, zerocor=yes, darkcor=no, flatcor=yes, illumcor=no, fringecor=no,
readcor=no, scancor=no, readaxis="column", fixfile=" ",
biassec="[51:501,4105:4190]", trimsec="[75:501,1:2200]", zero="Zero", dark="",
flat="nFlat", illum=" ", fringe="", minreplace=1., scantype="shortscan",
nscan=1, interactive=yes, function="chebyshev", order=9, sample="*",
naverage=1, niterate=1, low_reject=3., high_reject=3., grow=1.)

illumination ("sFlat",
"Illum", interactive=yes, bins="", nbins=5, sample="*", naverage=1,
function="spline3", order=9, low_reject=0., high_reject=0., niterate=1,
grow=0., interpolator="poly3", graphics="stdgraph", cursor="")

ccdproc ("Target*, SP*, Tell*, Arc*",
output=" ", ccdtype=" ", max_cache=0, noproc=no, fixpix=no, overscan=yes,
trim=yes, zerocor=yes, darkcor=no, flatcor=yes, illumcor=yes, fringecor=no,
readcor=no, scancor=no, readaxis="column", fixfile=" ",
biassec="[51:501,4105:4190]", trimsec="[75:501,1:2200]", zero="Zero", dark="",
flat="nFlat", illum="Illum", fringe="", minreplace=1., scantype="shortscan",
nscan=1, interactive=yes, function="chebyshev", order=9, sample="*",
naverage=1, niterate=1, low_reject=3., high_reject=3., grow=1.)



It crashes between the second last two commands, right after it's finished running ILLUMINATION.
Any help on this would be greatly appreciated!
Cheers,
Nick Rowell

Mike Fitzpatrick wrote on Aug 31, 2007

Try getting rid of the spaces in the first argument list given to CCDPROC.

-Mike

Last post on Aug 31, 2007