Welcome to iraf.net Wednesday, May 01 2024 @ 05:04 PM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 Another question about scombine
   
lsh20
 04/18/2006 03:34PM (Read 2945 times)  
+----
Newbie

Status: offline


Registered: 04/17/2006
Posts: 3
Hi Mike,
if i have 200 spectrums,and i want to combine them to 100 spectrums,two combine to one. Can i use a @file to be a input file? If i can, how can i write the @ file? thank you

 
Profile Email
 Quote
fitz
 04/18/2006 03:34PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Lishen,You can't really do it with a single command, you'll need to repeatedly call scombine on groups of the two spectra you want to combine until you process the entire set. The easiest way to do this depends on the image names to some extent. In the simplest case let's assume you can create a text file called 'cmds.txt' containing all the commands you want to run, e.g. something likescombine blue001,red001 combined001
scombine blue002,red002 combined002
: : :You could then execute all the commands as simplycl < cmds.txtVarious unix tools could be use to build this file, there is also the FIELDS and JOINLINES tasks in iraf to split/combine lists and tables.Another method would be to create a list of the input and output image names, e.g. in 'files.txt' something likeblue001 red001 combined001
blue002 red002 combined002
: : :Then you could write a small loop to read the file and run scombine, e.g.cl> list = "files.txt"
cl> while (fscan (list, s1, s2, s3) != EOF) {
>> scombine (s1//","//s2, s3)
>> }where the variables s1/s2/s3 are the filenames on each line, and the scombine call uses the "//" string concatenation operator to create the input image list. Tasks file FILES can expand a template like "blue*" into a list of matching files, and JOINLINES can combine two lists, etc.See the Script Programmer's Guide (https://iraf.net/irafdocs/script/) for more about processing in loops and syntax needed. Hope this helps.Cheers,
-Mike

 
Profile Email
 Quote
   
Content generated in: 0.08 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