\section{Using the Laser Disk System at ISAS}

\subsection{Viewing Existing Movies (VIDEO\_MENU)}\label{video_menu}
\index{laser video}
\index{video}

This program provides interactive computer controlled viewing of
the library of movie sequences recorded on the ISAS SONY laser
disks.  The user must be logged on to the isass3 computer (remote
logon from another ISAS workstation is fine) in order to use the SONY laser disk player.

To run the software the user must log on to isass3.  The calling sequence
is:
%
\idlinputa{video\_menu}\index{VIDEO\_MENU}
%
The user is prompted to check for
the proper settings on the SONY disk drive, and then a listing is
displayed from which the user selects a movie sequence for display.
Upon selection the sequence is played repeatedly.  While the
sequence is playing the user may adjust the speed by keyboard input.
The user may interrupt the movie at any time and return to the menu.
The library of available movie sequences is updated manually as movies 
are recorded on the SONY, so the listing could be out of date.  

In addition to this basic mode, VIDEO\_MENU may be called with
a keyword {\it vcr} set which allows non-interactive playing of frame
sequences specified in an input file.  This mode of operation is
convenient for demonstrations and for making video tape copies of
selected sequences of movies.

The centerpiece of the laser disk movie
catalogue is the full disk movie which covers the duration of the
mission.  However, there are over 100 entries in the menu, corresponding
to a variety of interesting sequences showing flares, large scale
coronal transients, and theoretical modeling.

\subsection{Making Title Pages}
\label{laser_titles}

The video title pages may be prepared by using an IDL program called
VIDEO\_TITLE{}.  First, you must prepare an ASCII control file that
specifies what the title pages should contain.  The IDL routine reads
this file and writes the text to a Z-buffer window (using ordinary
XYOUTS commands) and then reads it back into an array that can be
stored in a {\tt *.genx} file.  The font type and size and placement
can be easily adjusted.  
Some example calls are:
%
\idlinputa{array = video\_title(filename)}\index{\VIDEO\_TITLE}
\idlinputB{3.5}{array = video\_title(filename,/plot)	}{; Display the results}
\idlinputb{array = video\_title(filename,/plot,outfile='video1',/high)}
\idlinputb{array = video\_title(filename,/plot,outfile='video1')}
%
The variable $filename$ specifies the name of an ASCII control
file that contains the text of the page.  For example try the
following:
%
\idlinputa{array = video\_title('/ys/gen/doc/howto\_video\_title.doc',/plot)}
%
where {\tt /ys/gen/doc/howto\_video\_title.doc} is the name of a
``how to" file which is also an example control file.  This file
explains the format of the control file.  For the first time users,
it is recommended to copy that file over and make changes to it to
accommodate your needs.

The control file specifies the position on the screen, the text, the size
and thickness of the characters.  Different fonts can be used also.
A portion of that file is shown here:

\begin{verbatim}
;  howto_video_title.doc                J. R. Lemen  Rev A,  4-Jan-94
;
;  The control file contains 5 items per line separated by a double
;  slash or "//".   The first and second fields are the positions in
;  the 620 by 480 sized video window (0,0 is the lower left corner).
;  It is advisable not to write too close to any edge, since the
;  text may be lost, depending on the display monitor.  Setting xpos
;  equal to -1 will cause the text to be automatically centered (and
;  leading or trailing blanks will be discarded).  The third field
;  is the text and the fourth and fifth fields are the character
;  size and thickness, respectively.
;
;  The Fonts can be changed using the standard !n IDL vector commands
;  (see the example below).
;
;  This entire document is an example control file (since every line
;  except the important ones below begin with an ";").  Below the
;  dashed line is a specific example.  This file will cause two
;  pages to be generated (because of the NEWPAGE// line).  It is not
;  necessary to have more than one title page per file.
;
; ------------------------------------------------------------------
;  Semicolons are treated as comments
;  Separate fields with //
;  xpos // ypos // Text // size // thickness
;  (size and thickness will default to 1.0 if omitted)
;  (setting xpos to -1 will cause x position to auto-center)
-1//425//X-RAY CORONA OF THE SUN                           //2.8//2.8
-1//375//Images from the Soft X-ray Telescope              //2.1//1.4
-1//345//on the YOHKOH mission                             //2.1//1.4
-1//275//Data from:  November 11 to 27, 1991               //2.1//1.4
-1//220//!8Prepared by:                                    //2.1//1.4
-1//190//J. Lemen, G. Slater, K. Strong, and S. Tsuneta    //1.7//1.7
-1//100//Institute for Astronautical Research, Japan       //1.4/1.4
-1// 75//National Aeronautics and Space Administration, USA//1.4//1.4
-1// 30//(V1.0 13 April 1992)//1.4
NEWPAGE//
-1//300//Data from:  November 11 to 27, 1991               //2.1//1.4
-1//200//!18Displayed 100,000 times real time              //2.1//1.4

\end{verbatim}

The {\it /high} switch makes the routine run slow, but gives a higher
quality result.  It is recommended to debug the output without the
{\it /high} switch and only use it for the final result. 

The $outfile=$ switch will cause the title pages to be written to
a {\tt *.genx} file that can be written to the ISAS Sony Laser disk
using GO\_NVS5{}.  If you want the background color to be blue,
make sure that you specify color table 1 in GO\_NVS5{}.

\subsection{Recording a New Movie to Laser Disk}

\subsubsection{Hardware: Positioning the Sony Laser Disk}

\begin{enumerate}
\item Check that the green light on the NVS is on.  Power cycle if necessary.
\item Check that the RS-232 cable is connected from the NVS to the Sony LVR-5000.
\item Make sure the correct optical disk is inserted (check side A or B).
\item Put the `LOCAL/REMOTE' switch in the local position.
\item Depress the `REC STANDBY' button to initiate blank frame check.
This will find positions of all blank areas on the disk.  
When completed, the disk will be positioned to the last recorded
frame before the nearest (not necessary the first) blank frame.
\item Use the record `SKIP' buttons to position the laser disk to the last 
recorded frame before the desired starting frame number (consult the
Sony Laser disk log book).  On the display, Cont. Rec = is the last
recorded frame before the blank frame; DUR = number of blank frames.
\item Toggle the format of the numbers displayed to show the time-format.  
Record numbers in the log book.   To start over, press the `CLEAR' button.
\item Set the left console switch to `remote'.
\end{enumerate}

\subsubsection{Software}

\EEnumerate
\item Login onto a non-isass0 machine (isass1-4).  

\item Enter IDL.  Make sure no other IDL window jobs are running on the same
workstation.  If there are two jobs, the color table could be corrupted.

\item Then enter one of the following:
\end{enumerate}
~\\
%
\idlinputA{3}{go\_nvs5,/sfd           }{; Standard weekly movie making}	\index{GO\_NVS5}
\idlinputB{3}{go\_nvs5,/sfd,/nosfw    }{; Standard weekly movie making}
\idlinputB{3}{go\_nvs5,/help          }{; For on-line documentation}
\idlinputB{3}{go\_nvs5,/genx          }{; to use a GENX type file as the input}
%
The temporary NVS files will be written to your home directory.
Use the nvsdirfn='/1p/user/nvs0' switch to redirect to another location.

For the SFD option, the default increment is 10 (process 10 images at a time).  
This is good if no one else is using the
workstation at the same time.
If the  /sfd switch is given, go\_nvs5 will prompt the user with the list of
files which are in the /yd1/sfd directory.

For the GENX option, the array will not be autoscaled (it should be a byte
type).  If the number of images in the genx file is large, IDL may run out of core.
In that case, try increment=1.  The program will prompt the user for the 
GENX filename.

\subsubsection{Adding Another Movie}

The above procedure is for starting from scratch.  If you have just completed
a run and the Sony frame number has not been changed, then just type:
%
\idlinputa{go\_nvs5 [,/sfd]}
%
to make the next movie.

\subsubsection{NVS/Sony Problems}

\IItem
\item Invalid Num -- If the message `Invalid Num' appears on the display
monitor, the nvs box is not in sync with the Sony laser disk.  To
correct this situation begin with a blank frame check (see
above hardware procedure) and follow that with software procedure shown above.

\item One common problem is to forget to attach the RS-232 cable.  This is
sometimes switched to ISASS3 to control the recorder during playback 
to record with the VCR).

\item How to toggle the format frame/time format:  depress the frame/time 
button located on the lower-left side of the console number keypad--where 
frame \# is a simple number and time has the format of mm:ss:ff.
\end{itemize}

\subsection{Transferring a Movie to VCR Video} \index{MK\_VCR}\label{mk_vcr} \index{video}	%-----------------------------
\index{VCR, making movie}

MK\_VCR is an IDL procedure which can be used to control the Sony Laserdisk
recorder.  In this way sequences can be displayed easily in order to make
VCR video recordings.

The MK\_VCR procedure reads an ASCII file (described) below and then calls 
sonyloop to actually control the laser disk player. 

\subsubsection{Initial setup}

\EEnumerate
\item First, make sure the RS-232 cable from isass3 is connected to the back
of the Sony recorder (it requires an adapter connector).  

\item Switch the local/remote switch to remote.

\item Log on to isass3 and enter IDL.  
\end{enumerate}

\subsubsection{Short test of hardware communications.}

You can preform a simple test to see if things are working correctly
by typing:
%
\idlinputA{3}{sonyloop,6000		}{; Position laser disk to frame number 6000}
\idlinputB{3}{sonyloop,6000,6200	}{; Play from 6000 to 6200 at normal speed}
\idlinputC{3}{sonyloop,6000,6200,sec=2	}{; Play a factor of 2 slower}
%

\subsubsection{Running MK\_VCR}

If things look like they are working correctly, you can then try mk\_vcr.
To get a template of the file the mk\_vcr will read, execute the following
Unix command to copy the example file to your own directory:
%
\ultrixinputa{cp /ys/gen/data/mk\_vcr\_example.txt .}
%
After you copy the example file, do the following.  Insert Side B of the 
laser optical disk. Then,
%
\idlinputa{mk\_vcr,'mk\_vcr\_example.txt',1,3}
%
which execute lines 1 to 3 of the file.  (Line 0 puts up a blank frame).
If you type 
%
\idlinputa{mk\_vcr,'mk\_vcr\_example.txt}
%
the routine will inform you of the number of lines in the file and
ask you to enter the start and stop line numbers.

If you want to make a movie, you could try the following IDL program:
%
\idlinputA{4}{sonyloop,8000            				}{;Get it to a blank frame}
\idlinputB{4}{for i=0,2 do mk\_vcr,'mk\_vcr\_example.txt',0,23	}{;There are 24 lines in the file}
\idlinputB{4}{sonyloop,8000                   			}{;End on a blank frame}
\idlinputB{4}{end }{}
%
As you can see, the sequence in the `for loop' will execute 3 times.  Each
time through takes about 7 minutes, so the whole movie will be just over
20 minutes in length.

\subsubsection{How to create/modify the file that MK\_VCR uses}

The file has some descriptions about how to change it.  Basically,
the lines in the file look like the following:

\begin{verbatim}
 8000				; Position to a blank frame (provide leader)
 6077, 6077,    4,    0, [ -1  0  0  0] "Movie Title Page"
 6078, 6078,    2,    1, [ -1  0  0  0] "Nov 1991 Movie - Title"
 5048, 5225,    2,    1, [  1  2  1 -1] "Nov 1991 Movie"
; c0    c1      c2    c3       [c4]         "  c5   "
\end{verbatim}

The above sequence will display the Nov 91 press release sequence if Side B
is inserted.  Some notes about the format:

\IItem
\item Text following a `:' is considered to be a comment.
\item Only the first column is required.  All subsequent columns are optional.
\item c0 is starting frame number.
\item c1 is the ending frame number.
\item c2 is the wait (in sec) after displaying the first frame
\item c3 is the wait (in sec) after displaying the last frame
\item c4: The number in the boxes are the speeds that are used by sonyloop.
Up to four different speeds can be specified. 
\end{itemize}
\begin{verbatim}
      0 is no operation
      1 is normal speed (30 frames per second)
      2 is twice slower (15 frames per second)
      3 is 3x slower, etc (10 frames per second)
      -2 is 3x faster.
\end{verbatim}

If a fifth parameter is specified in the brackets, it is a repeat number.
If this number is negative, sonyloop will play the sequence forward
and backward.  For example,

\begin{verbatim}
 5048, 5225, 2,  1, [  1  0  0  0  1] "Nov 1991 Movie" ;1 time forward
 5048, 5225, 2,  1, [  1  0  0  0 -1] "Nov 1991 Movie" ;1 time forward/backward
 5048, 5225, 2,  1, [  1  0  0  0 -3] "Nov 1991 Movie" ;3 times forward/backward
\end{verbatim}

SPECIAL NOTES:
\begin{itemize}
\item Sonyloop doesn't send the correct commands to the Sony Laser Recorder
        to go backwards.  Thus, no matter what speed you specify, it always
        goes at normal speed in reverse.  (Maybe a Japanese reader can study
        the manual and fix this problem).

\item Sonyloop tries to compute the time it will take the laser disk recorder
        to play the specified sequence.  Because the timings in IDL can be
        off by a certain amount (less than or equal to about a second), it is
        wise to make one of the wait parameters (c2 or c3) equal to at least
        1.  If they are set to 0, IDL will sometimes send the next sequence
        before the previous sequence has had a chance to complete.
\end{itemize}

\newpage %------------------------------------------------------------------------
\section{Using the Laser Disk System at LPARL}

The following is a guide to record and play laser disk movies at LPARL.

\subsection{Viewing Existing Movies}

\subsubsection{Using IDL and Menu Driven Software}

The program VIDEO\_MENU described in section~\ref{video_menu} is not available
at LPARL during the writing of this guide, however it may exist now.  See one of
the software engineers to see if it is available.

\subsubsection{Displaying a Single Recorded Image}

\begin{center} {A. Manual Operation} \end{center}

The Panasonic optical disk recorder/player and the Panasonic
optical disk player may be ``manually'' controlled by using either the
buttons on the front of each machine or the remote controllers.
These buttons and the remote controller are labeled in English
and are easily understood.

\begin{center} {B. IDL Operation} \end{center}

\EEnumerate
\item Log onto sxt0 on any terminal
\item Enter IDL
\item Suppose you want to display frame 1000.  Here's the command:
	\idlinputd{pana,1000}
\end{enumerate}

\subsubsection{Playing the Panasonic Laser Disks}

\begin{center} {A. Manual Operation} \end{center}

The Panasonic optical disk recorder/player and the Panasonic
optical disk player may be played ``manually'' by using either the
buttons on the front of each machine or the remote controllers.
These buttons and the remote controller are labeled in English
and are easily understood.

\begin{center} {B. IDL Operation} \end{center}

\EEnumerate
\item Log onto sxt0 on any terminal
\item Enter IDL
\item Suppose you want to play frames 100 to 200 on the recorder for 10
repetitions at a rate of 90 frames per second.  Here's the command:
%
\idlinputa{movie\_pana,100,200,rate=10,num\_repeat=3}\index{MOVIE\_PANA}
%
\item The general command is
%
\idlinputa{movie\_pana,start\_frame,stop\_frame,device,device=device1,rate=rate, \$}
\idlinputbb{		   num\_repeat=num\_repeat,backforth=backforth}
%
   The device parameters should be ignored because at the present time
   there is only one available device, which is the default.  More
   information on this routine can be obtained with the command:
%
\idlinputa{doc\_library,'movie\_pana'}
\end{enumerate}

\subsection{Making Title Pages}

See the description in the previous chapter on page~\pageref{laser_titles} describing the laser disk 
system at ISAS.

\subsection{Recording a New Movie to Laser Disk}

\begin{enumerate}
\item Turn on power to Panasonic recorder and Sony monitor labeled
   `Laser Disk Recorder'.
\item Find the disk you want to record on (it may be in the recorder).
   Note that each disk has two sides.  The `up' side is the active
   side.  Note also that there is blue `write protect' sliding switch
   on the right side of each side of the disk.  Move this switch to its
   right hand position (`read/write') using a Bic pen or equivalent tool.
   Now insert the laser disk you want to record on into the recorder
   after first ejecting the disk already in there if there is one.
\item Log onto sxt0 on an X terminal 
\item Enter IDL
\item At the prompt do this:
%
\idlinputa{ptest}
%
   Look at the monitor.  If after a few seconds a test pattern appears
   the equipment is properly set up and you may proceed.  If no test
   pattern appears or if it looks unusual then something is wrong.  Refer
   to section IV on problems below.
\item Images may be recorded either from an SDA file or from a data cube
   resident in memory.  The images will be re-sized to fit within the
   630 x 486 size of the Peritek video image.  The re-sizing will use
   linear interpolation unless the /NOINTERP option is used,  By default
   they will be
   centered.  The images may be of any size.  If they are in a data cube
   then the entire cube will be normalized to its maximum value and byte
   scaled, unless the /NOSCALE keyword is used in the procedure call.
   If the images are in an SDA file the images must be pre-scaled by the
   user.  Decide on a color table.  A gray scale (IDL standard color table
   1) will be used by default.  If the color table desired is not one of
   the first 15 IDL standard color tables then you must supply r, g, and b
   color vectors.
\item Decide what frame on the laser disk you wish to start recording at.
   The IDL recording program will automatically find the first sufficiently
   large unrecorded area if you skip this step.
   To do this manually, type:
%
\idlinputa{command\_pana,'OF'}\index{COMMAND\_PANA}
%
   Type the `display' button on the remote controller to display the
   current frame number on the monitor.  Then use the remote controller to
   play or scan through the disk until you find the frame number at which
   you want to start recording.  Key the number of frames you wish
   to record using the keypad.  Then hit the red `rec mode' key.  This
   will verify that there are enough contiguous blank frames available
   following the selected frame.
\item Suppose you have the cube in a 3-D IDL array called DATA and the color
   vectors in the variables R,G, and B.  Here's how to record it:
%
\idlinputd{pana\_record,data,r=r,g=g,b=b,/record}
%
\item For recording images from an SDA file the call would be
%
\idlinputa{pana\_record,file\_name,r=r,g=g,b=b,/record}
%
   where file\_name is a string naming the SDA file, including path.
   More information on this routine can be obtained like this:
%
\idlinputa{doc\_library,'pana\_record'}
\end{enumerate}

\subsubsection{Panasonic Problems}

If no test image appears after issuing the PTEST command in the instructions
described in the previous section, then do these things:

\IItem
\item Make sure that the power switch on the back of the Peritek
       `clock box' is in the on position.  The clock box is located
       in the middle shelf of the SXT0 computer cabinet.
\item Check that the four gold colored video cables from the Peritek
       are connected to the RGB and sync terminals on the back of the
       recorder.
\end{itemize}

\subsection{Transferring a Movie to VCR Video}

As of the writing of this document, the routine MK\_VCR (which is described
on page~\pageref{mk_vcr}) was not available for the LPARL video system.  The
routine may be expanded in the future.  The best method for transferring a 
laser disk movie to VCR video is to talk to one of the LPARL software
engineers.

