[daip] quick aips ?

Eric Greisen egreisen at nrao.edu
Wed Jun 22 11:49:24 EDT 2011


Tanmoy Laskar wrote:
> Hi Eric,
> 
> The idea is that we want to run JMFIT on a list of point-like sources in 
> an image cube. We want to generate the list of sources dynamically, and 
> call JMFIT to fit for the source parameters, writing the output to a 
> text file for each source, parsing the output file and appending the 
> fitted parameters to our source listing. Doing this from our own scripts 
> will enable efficient bookkeeping, where we can keep track of the source 
> and the fit at the same time. 
> 
> We have many hundreds of sources, and dealing with hundreds of little 
> JMFIT ouput files is daunting. It would be easiest if we could, e.g. 
> call JMFIT from the UNIX command line (or through a spawned AIPS shell), 
> perform the fit, save the parameters, and absorb the results into our 
> dynamically-executing code.
> 
> We have so far been using MIRIAD, where this functionality is available 
> and works very well. However, the AIPS routine JMFIT is best suited for 
> our scientific purpose and we were wondering if dynamic execution in 
> this fashion is possible in AIPS.

We have someone that writes long data reduction scripts that invokes 
things both before and after the sequence of AIPS tasks.  What his 
scripts do is write a text file with all needed commands and then 
execute that file.  I am unfamiliar with all the gotchas but that
text file would look something like

aips notv pr=1
<uuuu>
tget jmfit
getn <n>
gmax=<p>
gpos=<x1,y1>
blc=<bx,by>
trc=<tx,ty>
go
clrm
print fmax(1),fpos(1,1),fpos(2,1),fwidth(1,1),fwidth(2,1),fwidth(3,1)
print domax(1),dopos(1,1),dopos(2,1),dowidth(1,1),dowidth(2,1),dowidth(3,1)

outprint='<tttt'>
prtm
clrm
exit

Where your script has to fill in all things in <>'s.  This deletes the 
messages of JMFIT and prints the returned fit values and error bars to a 
file for parsing.  Note that e-mail tool forced the break between print 
and domax which should not be there.  There are other alternatives 
depending on which of JMFIT's outputs you want.

The script $SYSUNIX/BDF2AIPS sort of does this (in an interactive way) 
to invoke ObitTalk and the BDFIn task inside it.

Eric Greisen




More information about the Daip mailing list