What's FLOW
"FLOW" is a Field Of View (FOV) visualizer for SPICE users,
which creates an FOV image in JPEG/PNG/FITS formats using SPICE kernels.
"FLOW" has the following features:
- Draw planetary bodies (texture images or wire frame)
- Draw planetary rings
- Draw shape models (format: STL or SPICE DSK Type 2)
- Draw stars
- Support polygonal FOV
- Support push broom scanner
- Insert WCS keywords into FITS header
"FLOW" is composed of two console applications:
simulation engine "flow_se" and image generator "flow_ig".
"flow_se" reads observing condition from a configuration file (flow.conf)
and calculates FOV using SPICE kernels.
An XML file is created as a result of the calculation.
"flow_ig" loads the XML output and texture images to create an FOV image
(see below).
Prerequisites
"FLOW" requires POSIX-compliant operating system (UNIX, Linux, BSD, etc.),
and the necessary libraries are properly installed to build it.
Libraries
- CSPICE (N0066 or later)
- libxml2 (2.7.6 or later)
- lua (5.1.4 or later)
- CFITSIO (v3.310 or later) (optional)
- libpng (1.2.49 or later) (optional)
- jpeglib (6 or later) (optional)
At least one of the CFITSIO, libpng, and jpeglib must be installed to generate an image.
The format of planetary textures also depends on these libraries.
important
"FLOW" users MUST know which SPICE kernels are essential to calculate FOV.
Build
"FLOW" uses autoconf to create a build environment.
$ tar zxvf flow-1.5.tar.gz
$ cd flow-1.5
$ configure --with-cspice=/path/to/cspice
$ make
$ su
# make install
--with-cspice option is essential to address the path of cspice directory.
View details
Quick Start
The basic use is in below:
- Plan your simulation
- Download SPICE kernels you need
- Prepare planetary textures/shape models
- Create your configuration file (flow.conf)
- Execute the following commands:
$ flow_se -o mysim.xml flow.conf
$ flow_ig -o mysim.png mysim.xml
Or, use pipe instead:
$ flow_se flow.conf | flow_ig -o mysim.png
View details
Configuration File
The configuration file includes paths of SPICE kernels, textures, and models.
In addition, there are observing conditions in it such as observing time and
instruments.
The "FLOW"'s configuration file is a Lua configuration file.
View details
"flow_se" Options
"flow_se" is a simulation engine. Inputting the configuration file as argument, "flow_se" outputs an XML file for rendering image.
"flow_se" has some options. It is as follow:
[-h][-t <time>][-o<outfile>][<infile>]
options
option |
direction |
-h |
To display a list of options and exit. |
-t<time> |
To ignore the specified time in the configuration file, and
calculate using the time by your order. |
-o <outfile> |
Specify the output file codec(XML). The default is standard
output. |
<infile> |
Specifythe input file codec(Lua) The default is standard
input. |
"flow_ig" Options
"flow_ig" is the image generator. It derive rendering image from the XML file which "flow_se" outputs.
"flow_ig" have some options. It is as follows:
[-h][-f][-m][-v][-s<scale>][-t<format>][-x<opts>...][-o<outfile>][<infile>]
options
View details
option |
direction |
-h |
To display a list of options and exit. |
-f |
Invert the top and bottom of the FITS file input and output. |
-m |
Outputs the 8-bit grayscale image. |
-v |
The standard error output of the details of the error when
loading the XML file. |
-s <scale> |
Be a real number specifying the magnification of the output
image. |
-t <format> |
Specify the output image format.
fits:FITS. The same meaning as the fits-imageextension in case of
color.
fits-imageextension:Image Extension format.
fits-extension: The same meaning as the fits-imageextension.
fits-rgbcube:RGBCube formatted fits.
If the option is not specified, it automatically detects the image
format from the extension of the output file name that is specified
in the -o option. If it is not possible to determine will be selected
fits-imageextension.
In case of the png or jpeg, You can set the compression level of
precision or by specifying a number followed by ":"(colon). If the
png is from 1 (maximum compression)to 9(lowest compression) , in the
case of jpeg can be specified in the range from 1(low quality) to
100(highest quality).
|
-x |
To specify (see below) the execution of other options. You
can specify more than one. |
-o <outfilet> |
To specify (see below) the execution of other options. You
can specify more than one. |
<infile> |
Specifythe input file codec(XML) The default is standard. |