[daip] Can AIPS directories be moved en masse w/o writing to FITS?

Eric Perlman perlman at jca.umbc.edu
Thu Jan 17 14:08:10 EST 2002


Hi Eric,

Gotcha...I think the FITDISK run file will be my ticket.  Thanks!

Eric

On Thu, 17 Jan 2002, Eric Greisen wrote:

> Eric Perlman writes:
>  > Hi,
>  > 
>  > I have a fairly generic question:  can one move the contents of AIPS
>  > directories from computer to computer (and in this case from institution to
>  > institution) without the intermediate step of writing to FITS?  In other
>  > words, if I just tar the contents of the AIPS directory on machine a, and
>  > then copy it to a directory on machine b, will machine b be able to read 
>  > everything just fine?
>  > 
>  > A secondary question to this is how the issue of crossing platforms affects 
>  > this.  In my case the "from" machine is Solaris, while the "to" machine is 
>  > RedHat Linux.  As I'm sure you know, the two operating systems have opposite 
>  > endian-ness conventions.  What files would need to be converted and what 
>  > files wouldn't? 
> 
> The generic answer is as follows:
> 
> The copy does work and you can then just add the new directories to
> DADEVS.LIST and everything is cool.  But only if it is between
> machines of the same byte order.  Solaris and Linux are instrinsically
> of opposite byte order and it plain does not work.  All files will
> have to be converted and the easiest way to do that is FITS although
> you lose PLot files that way.  The following RUN file and procedure
> may help:
> 
> $ FITDISK
> $---------------------------------------------------------------
> $! Procedures for easy-to-learn VLBA data reduction
> $# RUN POPS FITS UV IMAGE-UTIL
> $-----------------------------------------------------------------------
> $;  Copyright (C) 2001
> $;  Associated Universities, Inc. Washington DC, USA.
> $;
> $;  This program is free software; you can redistribute it/or
> $;  and/or modify it under the terms of the GNU General Public
> $;  License as published by the Free Software Foundation; either
> $;  version 2 of the License, or (at your option) any later
> $;  version.
> $;
> $;  This program is distributed in the hope that it will be
> $;  useful, but WITHOUT ANY WARRANTY; without even the implied
> $;  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
> $;  PURPOSE.  See the GNU General Public License for more
> $;  details.
> $;
> $;  You should have received a copy of the GNU General Public
> $;  License along with this program; if not, write to the Free
> $;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
> $;  MA 02139, USA.
> $;
> $;  Correspondence concerning AIPS should be addressed as
> $;  follows:
> $;         Internet email: aipsmail at nrao.edu.
> $;         Postal address: AIPS Project Office
> $;                         National Radio Astronomy Observatory
> $;                         520 Edgemont Road
> $;                         Charlottesville, VA 22903-2475 USA
> $-----------------------------------------------------------------------
> *
> PROCEDURE FITDISK
> *-----------------------------------------------------------------------
> *    Write files to disk using (with FITTP) an automatically g
> *    enerated name based on the AIPS file name.
> *
> * Inputs:
> *   INNAME      input file name
> *   INCLASS     input file class
> *   INSEQ       input file sequence number
> *   INDISK      input file disk number
> *   OUTFILE     logical name for output directory
> *   DOSTOKES    FITTP input
> *   DONEWTAB    FITTP input
> *   FORMAT      FITTP input
> *   BLOCKING    FITTP input
> *
> *-----------------------------------------------------------------------
> scalar jinna
> scalar jincl
> scalar jout
> scalar oldwait
> scalar inp_ok
> *
> tput fitdisk
> oldwait=dowait
> dowait=1
> inp_ok=1
> if substr(outfile,1,1) = ' ' then
>   inp_ok=-1
>   type 'OUTFILE must be set to a logical directory name'
>   type 'reset OUTFILE and run again'
> end
> if inp_ok > 0 then
>   task 'fittp'; default; tget 'fitdisk'; task 'fittp'
>   outna=inname; outcl=inclass; outseq=inseq
>   jinna=length(inname)
>   for j=jinna to 1 by -1
>      if substr(inname,j,j)=' ' then
>            substr(inname,j,j)='_'
>      end
>   end
>   jincl=length(inclass)
>   for j=jincl to 1 by -1
>      if substr(inclass,j,j)=' ' then
>            substr(inclass,j,j)='_'
>      end
>   end
>   jout=length(outfi)
>   outfi=substr(outfi,1,jout)!!':'!!substr(inname,1,jinna)!!'.'
>   jout=length(outfi)
>   outfi=substr(outfi,1,jout)!!substr(inclass,1,jincl)!!'.'
>   jout=length(outfi)
>   outfi=substr(outfi,1,jout)!!char(inseq)
>   inna=outname; incl=outclass; inseq=outseq
>   go fittp
> end
> dowait=oldwait; tget fitdisk
> return; finish
> 

-- 
Eric S. Perlman				   E-mail: perlman at jca.umbc.edu
Joint Ctr. for Astrophysics, Physics Dept. Phone: +1 410 455 1982	
University of Maryland, Baltimore County   Fax:   +1 410 455 1072
1000 Hilltop Circle			   WWW:   www.jca.umbc.edu/~perlman
Baltimore, MD  21250			





More information about the Daip mailing list