[daip] Re: writing backup DVDs from AIPS

Eric Greisen egreisen at nrao.edu
Thu Jul 21 13:44:33 EDT 2005


Susan Neff writes:
 > Hi Eric,
 >     
 >      I'm proceding with my goal of writing DVDs to replace backup 
 > tapes.  I have a simple question and a more complicated one.
 > 
 > 1.  Do (some of) the user computers in the AOC have DVD readers - so if 
 > I brought data with me on DVD's would I be able to read it there?
 > 
 > 2.  Right now I'm writing disk FITS files from AIPS (on my old sun, 
 > which has the tape drive), then moving them to my Mac and burning DVDs.  
 > I have written a little procedure to do this, with the following as its 
 > heart:
 > 
 >    string*6 namseq; namseq char(inseq) ;
 >    outf = version !! ':' !! inna !! '_' !! incl !! '_' !! namseq !! 
 > '.fits' ;
 > 
 >    , basically trying to emulate what the tape writing program does 
 > about file names.  I have
 >     hit  the following problem.  The vast majority of my files have 
 > spaces in their names, and
 >    when I try writing this to unix disk, the filename gets truncated at 
 > the first space.  Since
 >     many of the files have the same text before the first space (e.g. 
 > ngc123), I lose the independent  
 >    names.  I can get around this by going through and manually changing 
 > the innames and inclasses
 >    to not have spaces.  However, this is very time consuming and (given 
 > my typing) very prone
 >    to screwups.  So, my question is, is there a way in POPS/AIPS to tell 
 > it to compress a string by
 >    deleting any spaces in it?  I know that there are some languages that 
 > will do this, but not if POPs
 >    can or how to do it.  Can you offer any help?

I was afraid you were going to ask a hard question - technical issues
about DVDs for example.  This is easy - name the file below, e.g.
NEFF.uuu  where uuu is your user number in extended hex and RUN it.
Then in your proc just

for i = 1:N; getn(i); build(outfile); go fittp; end

Have fun

Eric Greisen

------------------------------   cut here -----------------------
$               procs for Susan
proc defs
string*12  tname, tstr
string*6   tclas, tseq
string*48  tfile
scalar     iii, jjj, xxx, yyy
finish

proc stcomp (tstr, jjj)
XXX = length (substr (tstr, 1, jjj))
YYY = XXX+1
$                              replace blanks
for iii = 1:XXX
   if (substr(tstr,iii,iii) = ' ') then
      substr(tstr,iii,jji) = '-'
   else
      yyy = min (iii, yyy)
      end
   end
$                              remove leading blanks
substr (tstr, 1, xxx) = substr (tstr, yyy, xxx)
return
finish

proc build (tfile)
   tname = inname; stcomp(tname,12)
   tclas = inclas; stcomp(tclas,6)
   tseq = char(inseq)
   tfile = version!! ':' !!tname!! '_' !!tclas !! '_' !!tseq!! '.fits
return
finish





More information about the Daip mailing list