


SPECPR Users' Manual                                Page 4.2


_4._1  _I_M_P_O_R_T_A_N_T _R_U_L_E_S

     The following rules are important because they have been found to  pro-
tect your data and make specpr operate properly.  Study them well and follow
them closely.


_4._2  _P_r_o_t_e_c_t_i_v_e _L_o_c_k_s

     Protective Locks are enforced to prevent more than one user at  a  time
from  running  specpr in a directory.  When specpr is started, a file called
LOCK.specpr is created in the directory.  If another specpr is  started,  it
will see that file and give you a message and quit.  You should check to see
if a user is really running specpr, and even ask him or her why the lock  is
still  there  if  specpr is no longer being run (maybe specpr was terminated
abnormally).  If no one is running specpr, then you may delete the lock file
and  proceed  as  normal.  When specpr terminates normally, the lock will be
deleted.  If specpr crashes, the lock will still be deleted because the lock
activities are done in the startup shell for specpr.


_4._3  _M_a_k_e _S_p_e_c_p_r _F_i_l_e_s _R_e_a_d _O_n_l_y _W_h_e_n _O_u_t_s_i_d_e _Y_o_u_r _D_i_r_e_c_t_o_r_y

     There have been instances of people writing over data  in  specpr.   On
Unix systems, two users are allowed to write to the same file, and of course
such incidents happened on occasion.  Basically, two specpr  users,  working
in different directories, assigned the same file (somewhere in the Unix file
system) and each began writing to it.  Of course,  disastrous  results  fol-
lowed  as  they  wrote  over each other's data!  To prevent this, follow the
simple rule: If a specpr file is located outside  your  directory,  give  it
READ  ONLY  protection  (protection value negative).  Do not write to a file
unless it is in your directory.  If you need to write to a file not in  your
directory, move to that directory and run specpr from there.  If that direc-
tory is owned by another user, check with that user before adding to a file.
If  they are logged on, check that they are not running specpr from the same
directory.  If two people run specpr from the same directory, restart files,
command  history,  and  data  files  will be overwritten (ordinarily this is
prevented by the lock file discussed in the previous section, but could hap-
pen  if someone deletes the lock)!  If you add data to someone else's files,
send them mail so they will not be surprised (and  accidentally  write  over
data).


_4._4  _B_u_g _R_e_p_o_r_t_s

     Whenever you encounter a bug, you should report all details  so  others
can  see them (and at least avoid them) and the specpr manager can fix them.
Send bug reports directly from specpr with the command:

                    !_s_p_e_c_p_r._b_u_g_s
                      _e_n_t_e_r _y_o_u_r _r_e_p_o_r_t
                    <_c_o_n_t_r_o_l _d>  _m_e_a_n_i_n_g _t_y_p_e _a "_c_o_n_t_r_o_l _d"

If you are not in specpr, enter the same command without the "!".



                     February 20, 2002





SPECPR Users' Manual                                Page 4.3


_4._5  _K_e_e_p _T_r_a_c_k _o_f _t_h_e _N_u_m_b_e_r _o_f _C_h_a_n_n_e_l_s _a_n_d _t_h_e _W_a_v_e_l_e_n_g_t_h _S_e_t!

     Specpr supports a "number of channels" value that ranges between 1  and
4852.   You  should be sure that the correct number of channels value is set
BEFORE completing ANY MATH OPERATION.  This is VERY Important.  Further,  if
the  operation requires "wavelengths", such as a Planck black body function,
be sure the correct wavelength set is assigned.  Novice users seem  to  have
the most problems with this concept.

     For example, if 32 channels are assigned, and  you  divide  two  arrays
with  100  channels, only the first 32 channels are actually acted upon.  If
you then reset the number of channels to 100 after the  operation,  like  in
the  CRT  plot routines, 100 channels will be written to the data file after
you finish with the plot.  But channels 33 to 100 are actually garbage!


_4._5._1  _R_u_l_e_s _o_f _O_p_e_r_a_t_i_o_n _f_o_r _C_h_a_n_n_e_l_s

     The math  routines  use  the  number  of  channels  controlled  by  the
wavelength set to determine what to operate on.  For example if you have two
512 point spectra, and the wavelengths are set to 81 channels, then any math
(e.g.  divide)  will  only  work  on 81 channels.  There are some exceptions
(f14: edit, it will work on all 4852 channels).  If you have any doubt,  set
the  number  of channels BEFORE entering the routine, or if it gives you the
option, when you first enter it.  All routines that  operate  on  a  certain
number of channels inform you of how many channels they will use.

     When a math operation is complete, the program goes  to  the  CRT  plot
routines.   The NUMBER OF CHANNELS RECORDED IN THE HEADER of the data is set
after you exit the plot routines using the number of channels given  by  the
wavelength set in use.  For example, consider you had just divided two spec-
tra of 512 channels.  When you exit the CRT plot routines and the  data  are
written,  the  number  of channels is set by the wavelength set currently in
use.  If you changed the wavelength set in the CRT plot routines to 22 chan-
nels,  when you exit the plot the program sets the channels to 22, copies 22
channels to the output I/O buffer and writes the results  to  disk  and  you
don't get all your data.  So, be careful.  Most routines that have different
output channels from input channels will automatically set the output to the
correct values (e.g., f17: convolution).


_4._5._2  _I_f _Y_o_u _M_u_s_t _C_h_a_n_g_e _T_h_e _N_u_m_b_e_r _O_f _C_h_a_n_n_e_l_s

     MATH: CHANGE the WAVELENGTH SET number of channels.  DO NOT go  to  the
header  information  change  routines  and  change  the value there: it gets
overwritten by the value from the wavelength set when the data  are  written
to disk (after you exit the CRT plot routines).

     DISPLAY: Change protection on the data file to -1.  Then  transfer  the
data  to  itself.   For example, if the data you wanted to change was in v23
and had a length of 512 channels and you really wanted 510, then  you  would
set  the  protection on v to -1, and from transfer routines, use the command
"v23citv23" (see section 10.3.1), then change the number of  channels  value
and  exit  the  information  change  routines using "e" (exit and do pending



                     February 20, 2002





SPECPR Users' Manual                                Page 4.4


write of the data back to disk).  BE CAREFUL: if you change the channels  to
a  bigger  number,  there is really no data in those new channels.  Also, if
you increase the number of channels too much, you  will  go  over  a  record
boundary and the next record could be written over other data!  If you use a
much smaller number, the output data could take up fewer  records  and  then
there  would be a record that had its continuation bit turned on, but has no
beginning data to it.  A list of the data file will cause a  read  error  at
that  record.   In  that  case,  you  need to write a dummy data set in that
record.  To do that, copy (transfer) a data set whose number of channels  is
less  than or equal to 256 to that record.  BE SURE  and RESET protection to
the end of the file so you do not overwrite other data!


_4._5._3  _S_e_t_t_i_n_g _C_h_a_n_n_e_l_s

     Sometimes you must set the number of channels to a value  that  you  do
not  have  a  wavelength  set for.  Use the capital c "C" and a number.  For
example, you have just started specpr in a new directory and have no data in
any  file.   You  can  not  display  something  because  you have nothing to
display.  Go to MATH and operate on something that doesn't need input  data.
For  example,  do f16 (line segment generator).  When you enter f16, set the
number of channels to whatever you want and type in some  values  (e.g.  set
channel  1  to 0 and channel 2 to 0 and exit to the CRT plot).  You can then
write that data as a dummy data set.  Many specpr users usually start  every
data  file  with  a  dummy data set where the title has the name of the data
file (archive tape name) and maybe a description of the project.































                     February 20, 2002


