Status: offline
Registered: 05/26/2008
Posts: 17
|
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")endThe 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
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
[quote:35e8ed5d1a]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?[/quote:35e8ed5d1a]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.[code:1:35e8ed5d1a]cl> reduction bias.fits @images.txt[/code:1:35e8ed5d1a]
[quote:35e8ed5d1a]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? [/quote:35e8ed5d1a]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[code:1:35e8ed5d1a]
zerocombine.combine="average"
zerocombine.reject="minmax"
... and so onzerocombine (input=l_bias, output="mbias.fits")
[/code:1:35e8ed5d1a]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
|