script writing
ranisb wrote on Sep 11, 2008
Hi,
I wrote small procedure script .
#Script for Data Reduction steps
# task reduction1 = reduction1.cl
procedure reduction (biasimage, infile_lis)
string biasimage
string infile_lis
struct *l_list
begin
string l_bias
struct line
l_bias = biasimage
l_list = infile_lis
# Combine all bias image to make one master bias #
zerocombine (input=l_bias,output="mbias.fits",combine="average",reject="minmax",nlow=0,nhigh=1)
# Read file (halogen,arc and object) from list and subtract master bias from all image using 'ccdproc'#
while (fscan (l_list, line) != EOF)
print (line)
ccdproc (images=line,output="",ccdtype="",zerocor=yes,zero="mbias.fits")
end
The output of the script will be , first make master bias using zerocombine and then using CCDPROC subtract the master bias from science and flat images.
But I am getting following error;
cc> reduction1
biasimage (biasimage_lis ): biasimage_lis
infile_lis (image_lis ): image_lis
Warning: Cannot open image (biasimage_lis)
ERROR on line 46: No images to combine
zerocombine (input=biasimage_lis, output=mbias.fits, combine=average, reject=minmax, nlow=0,
My first question is what is this error and how to solve this?
Second thing I like to ask ,if I want declare ZEROCOMBINE and CCDPROC as parameter (before begin) how to declare it? how my script will look and work?
Kindly write me.
Thanks,
RANI
I wrote small procedure script .
#Script for Data Reduction steps
# task reduction1 = reduction1.cl
procedure reduction (biasimage, infile_lis)
string biasimage
string infile_lis
struct *l_list
begin
string l_bias
struct line
l_bias = biasimage
l_list = infile_lis
# Combine all bias image to make one master bias #
zerocombine (input=l_bias,output="mbias.fits",combine="average",reject="minmax",nlow=0,nhigh=1)
# Read file (halogen,arc and object) from list and subtract master bias from all image using 'ccdproc'#
while (fscan (l_list, line) != EOF)
print (line)
ccdproc (images=line,output="",ccdtype="",zerocor=yes,zero="mbias.fits")
end
The output of the script will be , first make master bias using zerocombine and then using CCDPROC subtract the master bias from science and flat images.
But I am getting following error;
cc> reduction1
biasimage (biasimage_lis ): biasimage_lis
infile_lis (image_lis ): image_lis
Warning: Cannot open image (biasimage_lis)
ERROR on line 46: No images to combine
zerocombine (input=biasimage_lis, output=mbias.fits, combine=average, reject=minmax, nlow=0,
My first question is what is this error and how to solve this?
Second thing I like to ask ,if I want declare ZEROCOMBINE and CCDPROC as parameter (before begin) how to declare it? how my script will look and work?
Kindly write me.
Thanks,
RANI
Mike Fitzpatrick wrote on Sep 11, 2008
The output of the script will be , first make master bias using zerocombine and then using CCDPROC subtract the master bias from science and flat images.
But I am getting following error;
cc> reduction1
biasimage (biasimage_lis ): biasimage_lis
infile_lis (image_lis ): image_lis
Warning: Cannot open image (biasimage_lis)
ERROR on line 46: No images to combine
zerocombine (input=biasimage_lis, output=mbias.fits, combine=average, reject=minmax, nlow=0,
My first question is what is this error and how to solve this?
I suspect the problem is that you are passing in the name of the file containing the image list, but without the '@' preceeding it. For example, if 'images.txt' is a list of images to reduce you would call your script as e.g.
cl> reduction bias.fits @images.txtSecond thing I like to ask ,if I want declare ZEROCOMBINE and CCDPROC as parameter (before begin) how to declare it? how my script will look and work?
I don't understand what you're asking: You cannot declare tasks as parameters. If what you want is to define some of the task parameters as a separate step then you would do something like
zerocombine.combine="average"
zerocombine.reject="minmax"
... and so on
zerocombine (input=l_bias, output="mbias.fits")
If you want e.g. the 'reject' parameter to ZEROCOMBINE to also be a parameter to your script you would declare it as such and then set it as above.
-Mike
ranisb wrote on Sep 11, 2008
Thanks Mike..........I will try with your suggestions
regards,
regards,
Last post on Sep 11, 2008