If one wants to write out multiple fits files at a time which have same inname and inclass just different inseq no. how does one do that?
Thursday, July 26, 2007
Multiple output files
Posted by Scorpionqueen at 10:18 AM
Labels: outputting data
Subscribe to:
Post Comments (Atom)
8 comments:
See this comment by Ian. I think it's the most relevant thing I've found.
Thanks! But my problem is specific to the types of files I want to export out of AIPS. The wrtprocs (i checked) is useful for for files written serially in the catalog and the not the ones which have same filename.classname.seqn (i.e only the seq. no. is different). These could be in any order in the catalog. So, I want to be able to select at a time same files just with a different sequence number.
Hello.
You could try a procedure such as this one which defines an array of catalogue numbers and then automatically exports them to FITS files:
$
proc init_var
scalar i
finish
proc export
array maparray(6)
maparray 4 9 10 15 21 24
for i = 1 to 6 ; getn maparray(i)
outfil='PWD:'!!inna!!'_'!!char(inseq)!!'.FITS'
go fittp ; wait fittp
end
finish
As you can probably tell the above example (hopefully!) gets cat numbers 4, 9, 10, 15, 21 and 24 and exports them to the current directory with filenames of the form:
INNAME_INSEQ.FITS
You can use the task CATA to get the list of numbers, just set INNAME, INTYPE and INCLASS accordingly and set INSEQ to zero. Remember to change the length of the array when it gets defined too.
Typing out the results of CATA into the procedure, even if you copy and paste them, is going to be tedious if you've got hundreds of them. I'd probably try to devise a Perl script and run AIPS in batch mode if this was the case, although if anyone knows how to pipe output such as that from CATA into other procedures I'd be glad to hear it.
Good luck.
hey ian, would you like to be added as an contributor so you can post as well as comment?
Sure, that'd be great. I like to help out if I can, I stumbled across this blog a while ago and found it useful, and it's always nice to give something back.
hi ian, i had blogger send an email invite to the email address of the person i think you are. let me know if you don't get anything and then i'll just ask you for your email. :)
Yep, got it.
Thanks!
Hi Ian,
Thanks, that's what I wanted :)
Post a Comment