Welcome to iraf.net Tuesday, May 21 2024 @ 12:08 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 script writing
   
ranisb
 09/11/2008 05:24AM (Read 2291 times)  
++---
Junior

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

 
Profile Email Website
 Quote
fitz
 09/11/2008 05:24AM  
AAAAA
Admin

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

 
Profile Email
 Quote
ranisb
 09/11/2008 05:24AM  
++---
Junior

Status: offline


Registered: 05/26/2008
Posts: 17
Thanks Mike..........I will try with your suggestions
regards,

 
Profile Email Website
 Quote
   
Content generated in: 0.11 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login