TriBar1
=======

Keywords:

== Summary ==
This demo contains a bundled object version of a
https://en.wikipedia.org/wiki/1951_USAF_resolution_test_chart[USAF Resolution Target]. This object can be easily inserted into other scenes and used to
to characterize the resolution of the sensor imaging the scene.  This
demo also includes examples of using the point spread function (PSF) option
built into the
http://www.dirsig.org/docs/new/basicplatform_plugin.html#PointSpreadFunction[BasicPlatform]
plugin.


== Details ==
The USAF resolution target contains a series of Ronchi mask (high contrast,
square wave) targets as black stripe triplets. For this reason, the target
is frequently referred to as the USAF "tri bar" target.  The sizes of the
6 triplet sets used in the target panel follow a specific mathematical
formula (see MIL-STD-150A).

The panel in the bundled object is 1 meter x 1 meter.  Since the
object is exactly 1 meter wide, it can be easily scaled to any size
when it is instanced into a scene GLIST file.

== Important Files ==
This section highlights key files important to the simulation.

=== The Bundled Object
The bundled color checker object is in the `geometry/bundles/tribar`
folder. Within that folder, the following files define the geometry and
materials for the object:

`tribar.glist`::
    This is the main bundle GLIST that should in instanced into the
    scene.
`1x1.obj`::
    This is the 1 x 1 meter OBJ file for the target panel.  It includes
    a simple UV texture coordinate system that allows the material map
    for the target to be attached.
`tribar.mat`::
    This is the material database that contains the entries for material
    mapped target and the black (1% spectrally flat, diffuse reflectance)
    and white (40% spectrally flat, diffuse reflectance) materials.
    All the materials are configured with the *WardBRDF* model (100%
    diffuse, 0% specular).
`maps/usaf_1951_tribar.png`::
    This folder contains the 2048 x 2149 material map that defines the
    black and white regions of the target.

=== Platform Files
In addition to the simple `demo.platform` file, there are three alternative 
platform files that incorporate a point spread function (PSF) into the
simulation. These scenarios zoom into the higher-resolution features of
the target to demonstrate the impacts:

`no_psf.platform`::
    This scenario does not include a PSF.
`circle_psf.platform` and `psf/airy_psf.png`::
    This scenario uses the classic Airy disk PSF pattern associated with
    a clear, circular aperture.
`hex_psf.platform` and `psf/hex_psf.png`::
    This scenario uses the PSF pattern for a single, hexagonal mirror in
    the James Web Space Telescope (JWST).
`jwst_psf.platform` and `psf/jwst_psf.png`::
    This scenario uses the PSF pattern for the entire James Web Space
    Telescope (JWST).

IMPORTANT: As described in the manual, the PSF option is an experimental
           feature that requires hand-editing of the `.platform` file to
           configure.  

  
== Setup ==
This section includes any step-by-step instructions for running and
visualizing the simulation.

To run the simulation, perform the following steps:

. Run the DIRSIG `demo.sim` file
. Load the resulting `demo.img` radiance file in the image viewer.

The alternative PSF simulations can be run using the respective
JSIM files (see `no_psf.jsim`, `circle_psf.jsim`, `hex_psf.jsim`
and `jwst_psf.jsim`).


== Results ==
.The pan radiance image of the "tri bar" target.
image::images/demo.png[]

.The zoom image of the "tri bar" target without a PSF.
image::images/no_psf.png[]

.The zoom image of the "tri bar" target with the circular aperture PSF.
image::images/circle_psf.png[]

.The zoom image of the "tri bar" target with the hexagonal aperture PSF.
image::images/hex_psf.png[]

.The zoom image of the "tri bar" target with the JWST aperture PSF.
image::images/jwst_psf.png[]
