7 Physical units handling

To better understand how physical units are handled in Specview, one should understand where and why the units conversions take place when performing operations on spectral data. Specview uses four different types of units:

1.      Input units: these are the units in which the spectral data are expressed before they are ingested. That is, these are the units that are specified in the input file or stream. Also named “Native units

2.      Internal or standard units: upon ingestion, all data are converted to standard units. These are defined as Angstrom for the independent variable and photlam (photon/s/cm2/Angstrom) for the dependent variable. All internal operations and processing are performed in those units, and some algorithms actually assume the data to be expressed in those units (e.g. Planck function calculation). This has the effect of increasing the throughput of algorithms used by Specview, since no units conversions are ever needed internally. If data cannot be converted to standard units, it is left as is.

3.      Display units: when data are sent to the display, they are automatically converted to display units. These are set by default to be the same as the input units associated with the data. However, display units can be changed by the user at any time. Display units are associated with a particular “view” of the data, not the data themselves. Thus, it is possible for example to have two simultaneous plots of the same data set, each one displaying the data with a different set of units.

4.      Default units: Some operations may result in an undefined state for the resulting units. For instance, when overplotting together data whose input units are different, it is not clear which one to choose to be the current display units. In those cases, the currently selected default units are used as display units. These default units are set and maintained by Specview’s user preferences mechanism (Sec 9). Default units may also be used in other special contexts.

 

There is in place a temporary mechanism that provides limited support for intensity units (such as used by model or theoretical spectra). In normal use, Specview will not recognize such units as valid. This is legacy behavior caused by the original requirement that mandated Specview to be primarily a visualization tool for Hubble Space Telescope observational data.

 

However, if two conditions are met, Specview will be able to recognize intensity units as valid, and operate with them.

 

The first condition is that the intensity units in the input files are spelled exactly as explained above for flux density units, but with an additional/srsuffix at the end.

 

The second condition is that the user set in her preferences (see Sec. 9) the optional IntensityUnits property to true.

 

In this mode, Specview will be able to handle only data expressed in intensity units; flux density units will not be recognized as valid.