<div>This doesn't seem to work. I made a bash script file called aipsrun.sh.<div>Here are the contents of that file:</div><div><br></div><div>#!/bin/sh</div><div>aips notv pr=1</div><div>5000</div><div>kleenex</div><div>

<br></div><div>I made that file executable. Then ran it from the shell:</div><div><br></div><div>./aipsrun.sh</div><div><br></div><div>It pulls up aips, asking for my user number, in interactive mode. This is not what I want. </div>

<div><br></div><div>I tried putting everything on one line. It doesn't ask for my username and I get the following output:</div><div>"START_AIPS: Your initial AIPS printer is the PS DUP,DEF LPGRAD </div><div><div>

START_AIPS:  - system name lpgrad|HP, AIPS type LaserJet</div><div> </div><div>START_AIPS: User data area assignments:</div><div><a href="http://DADEVS.PL">DADEVS.PL</a>: This program is untested under Perl version 5.010</div>

<div>  (Using global default file /opt/aips/DA00/DADEVS.LIST for <a href="http://DADEVS.PL">DADEVS.PL</a>)</div><div>   Disk 1 (1) is /opt/aips/DATA/ARTEMIS_1</div><div><br></div><div>Tape assignments: </div><div>   Tape 1 is REMOTE</div>

<div>   Tape 2 is REMOTE</div><div> </div><div>START_AIPS: Starting TPMON daemons on ARTEMIS asynchronously...</div><div>Usage: AIPSEXEC [REMOTE] [DEBUG] [LOCAL] [NOEX]</div><div><a href="http://DADEVS.PL">DADEVS.PL</a>: This program is untested under Perl version 5.010"</div>

</div><div><br></div><div>I am then dropped back to the UNIX shell. Have I misinterpreted your email?</div><div><br></div><div>Thanks.</div><div>Tanmoy</div><div>PS: removing the #!/bin/sh from the start of the file does not change anything.</div>

<div>
<br><br><div class="gmail_quote">On Wed, Jun 22, 2011 at 11:49 AM, Eric Greisen <span dir="ltr"><<a href="mailto:egreisen@nrao.edu">egreisen@nrao.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">Tanmoy Laskar wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Eric,<br>
<br>
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. <br>


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.<br>


<br>
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.<br>


</blockquote>
<br></div>
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<br>


text file would look something like<br>
<br>
aips notv pr=1<br>
<uuuu><br>
tget jmfit<br>
getn <n><br>
gmax=<p><br>
gpos=<x1,y1><br>
blc=<bx,by><br>
trc=<tx,ty><br>
go<br>
clrm<br>
print fmax(1),fpos(1,1),fpos(2,1),<u></u>fwidth(1,1),fwidth(2,1),<u></u>fwidth(3,1)<br>
print domax(1),dopos(1,1),dopos(2,1)<u></u>,dowidth(1,1),dowidth(2,1),<u></u>dowidth(3,1)<br>
<br>
outprint='<tttt'><br>
prtm<br>
clrm<br>
exit<br>
<br>
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.<br>


<br>
The script $SYSUNIX/BDF2AIPS sort of does this (in an interactive way) to invoke ObitTalk and the BDFIn task inside it.<br><font color="#888888">
<br>
Eric Greisen<br>
<br>
</font></blockquote></div><br></div></div>