;+
; NAME:
;	SMEI_PRINT
;
;
; PURPOSE:
;	Send a SMEI sequence to a PostScript file
;
;
; CATEGORY:
;	CLI
;
;
; CALLING SEQUENCE:
;	smei_print, seqref
;
;
; INPUTS:
;	seqref	objref	Object reference to the SMEI sequence to print.
;
;
; KEYWORD PARAMETERS:
;	/grid		If specfied, then add a grid to the images
;	/nodate		If specified, then do not add the date and
;			time range of the images
;	/file		If specified, then add the filename to the
;			images.
;	/add_range	If set, then add the range to the plot.
;	range	float	The min and max values for the display
;			(implies adding the range to the plot)
;	colour_table int The colour table to use. (-1 or unset to use
;			the sequence map)
;	xsize	float	The size in cm of the x-dimension of the page
;	ysize	float	The size in cm of the y-dimension of the page
;	/no_colour	Do not generate colour PS (equivalent to
;			colour_table=0)
;	/portrait	Print in portrait mode (default is landscape).
;	plot_file str	Specify a filename other than the default idl.ps
;	/encapsulated	If set, then make an eps file (handled
;			explicitly as other things are done
;			differently for eps).
;	ncolumns int	The number of columns to arrange the images
;	nrows	int	The number of rows to arrange the images
;	/logarithmic	If set, then use a logarithmic mapping of the
;			colour table.
;	/in_rows	If set, then go arrange the frames in rows
;			rather than in columns.
;	/cmyk		If set, then use the CMYK colour model
;
;	Any keywords to DEVICE that do not clash with the above and
;	which are accepted by the PS device may be passed.
;
; SIDE EFFECTS:
;	A PostScript file is generated.
;
;
; RESTRICTIONS:
;	Pro-tem it doesn't print the file.
;
;
; MODIFICATION HISTORY:
;	Original: 16/5/03; SJT
;	Add row orientation: 21/7/03; SJT
;	Add cmyk option" 3/6/10; SJT
;-

pro smei_print, ss,  grid = grid, nodate = nodate, colour_table = $
                colour_table, range = range, xsize = xsize, $
                no_colour = no_colour, portrait = portrait, $
                plot_file = plot_file, encapsulated = $
                encapsulated, file = file, add_range = $
                add_range, logarithmic = logarithmic, $
                ncolumns = ncolumns, nrows = nrows, $
                ysize = ysize, help = help, in_rows = in_rows, cmyk = $
                cmyk, _extra = _extra

if keyword_set(help) then begin
    self_help
    return
endif

if not obj_isa(ss, 'SMEI_SEQUENCE') then begin
    smei_msg, /alert, ['The argument to SMEI_PRINT must be', $
                       'a reference to a SMEI_SEQUENCE']
    return
endif

ss -> print, grid = grid, nodate = nodate, colour_table = $
  colour_table, range = range, xsize = xsize, $
  no_colour = no_colour, portrait = portrait, $
  plot_file = plot_file, encapsulated = $
  encapsulated, file = file, add_range = $
  add_range, logarithmic = logarithmic, $
  ncolumns = ncolumns, nrows = nrows, $
  ysize = ysize, cmyk = cmyk, _extra = _extra

end
