.TH picko 1 

.SH picko
picko \- Converts Buil's PIC format to the FITS format files.

.SH SYNOPSIS
picko [options] [@dirfile] [par=parfile] [tcor=?] [mask=?] [image1] ...

.SH "DESCRIPTION"
This utility is a very usefull for Ch. Buil camera owners.
It converts a lot of PIC images to FITS images non-interactively.

.SS WARNING
CCD cameras by the Ch. Buil are a great secret for me. I haven't this
one, so that I wrote this utility on base a few PIC images
of an unknown origin. Please, check all output files carefully!


\." All professional image handling packages works on FITS format   

.SS "@dirfile" 
file with name(s) of image(s) to convert, no wildcards *,?
You can use 'ls' command to make it: 'ls *.pic > dirfile'

.SS @
read image(s) name(s) from standart input

.SS "image1 .. imageN..N"
name(s) of simple image(s) to convert, no wildcards *,?

.SS "par=parname" 
Parameter file. Any line of this file is directly copied to the FITS file 
header. Therefore, you must use FITS format. 

Ordinary record:

 position     description

 1 - 9        keyword (OBJECT,...) 
 10           '=' 
 11 - 30      value (character: 'kjshfksjh', integer: 10000, real: 1.0000E6) 
 30 - 79      '/' + comment ('/ UT..')

Comment and history record:

 "COMMENT" or "HISTORY" followed by any text.

Do not use ascii characters above 127. 

.SS "tcor=seconds"
Correction of time in seconds. Integer, signed or unsigned number
up to your system specific long int type.

.SS "mask=string"
Output mask (default = kout????.fts)
'*' means an '?'. 

.SH OPTIONS
.SS "-p parname"
dark frame image (equivalent with 'par=')
.SS "-o mask"
output mask (equivalent with 'mask=')
.SS "-c number"
counter initial value (default = 1)
.SS -h  
create only header of FITS file
.SS -help
 give help
.SS -L
display software license
.SS -g 
 wrote an example of the parameter file to the file 'picko.par' 

.SH "RETURN VALUE"
Zero.

.SH ERRORS
Return codes, either exit status or errno settings.

.SH EXAMPLES
 
  Give help
  
      picko

  Convert file 'image.pic' to 'kout0001.fts'

      picko image.pic
  
  Convert file 'image.pic' to 'image.fts'
  
     picko image.pic mask=image.pic

  Convert all PIC images at current directory to default mask
  
     ls *.pic | picko @ 
 
 Convert R images of beta Lyr
     ls betalyrR???.pic | picko @ mask=betalyrR???.fits

 Convert only headers of R images of beta Lyr
    
    ls betalyrR???.pic | picko -h @ mask=betalyrR???.fits

.SH FILES
.br
.nf
.\" set tabstop to longest possible filename, plus a wee bit
Uses file like 'picko.par' - see description above.

.SH "SEE ALSO"
.\" Always quote multiple words for .SH
 munipack(1)

.SH CAVEATS
You must uses this utility a very CAREFULLY. If output mask (option -o
or mask=?) is equivalent with input image, picko overwrite
the input image and your DATA are LOST. An example is the command
"picko i.pic -o i.pic" (your are overtyped suffix '.pic' and 'fits').
Try allways set the permissions to read-only for input files before.

.SH DIAGNOSTICS

The error messages like "Can't convert..","Can't open.." usually means, that
you typed wrong filename(s). 

"No input files." - missed '@' at command line. 

"Can't create..", "Can't write.." - disk full?

"Unknown image type." - wrong filename (suffix)?  

.SH BUGS
Many, but unknown.

.SH RESTRICTIONS
Don't insert blanks between key (par=, tcor=,..) and argument.

.SH AUTHOR
F. Hroch, Masaryk University, Brno (hroch@physics.muni.cz) 
