The Spectrum View |

If you have opened a data product which contains spectral bands, you can use the spectrum view to inspect the spectra for a given pixel position.
A click on the icon in the main toolbar or selecting "Spectrum" from the View --> Tool Windows menu opens a view which will look similar to this one:

If you now move the mouse cursor over an image view, the spectrum view will display the spectra for the current pixel position. Note that the spectrum view can only display the intensities of spectral bands. The spectrum view will remain empty for products without any spectral bands. By clicking you open the Spectrum Chooser which allows you to define which spectra or bands to show. You can also use the Spectrum Chooser to change the symbol and line style of a spectrum.

You can click & drag the mouse in the diagram in order to display the value of the selected spectrum graph at a pin position (see screenshot above).

While you move the mouse cursor around a region in the image, you will notice that the diagram axes are automatically adjusted according to the min/max values of the displayed spectral band values.

Tip: If you press the `SHIFT` key while moving the mouse cursor, the Sentinel Toolbox adjusts the axes to the local values at the current pixel position, if you release the `SHIFT` key again, then the min/max are accumulated again.

#### Context Menu

A click with the right mouse button on the diagram brings up a context menu which consists of the following menu items:

- Properties...
  Edit several properties (colors, axes, etc.) of the diagram.
  Use this menu to set the axis' ranges to fixed values.
- Copy
  Copies the diagram as image into the clipboard.
- Save As...
  Save the diagram as image (PNG).
- Print...
  Print the diagram.
- Zoom In
  - Both Axes - Zoom in on both axes.
  - Domain Axes - Zoom in only on the domain axis.
  - Range Axes - Zoom in only on the range axis.
- Zoom Out
  - Both Axes - Zoom out on both axes.
  - Domain Axes - Zoom out only on the domain axis.
  - Range Axes - Zoom out only on the range axis.
- Auto Range
  - Both Axes - Adjusts both axes to the full data range.
    This is similar to holding the `SHIFT` key pressed.
  - Domain Axes - Adjusts the domain axis to the full data range.
  - Range Axes - Adjusts the range axis to the full data range.

In the following the tool buttons of the spectrum view are explained.

| Opens the Spectrum Chooser, which allows you to choose which spectra and bands to display and to alter their appearance.
| Toggles the visibility of the cursor spectrum.
| Toggles the visibility of the spectra of the selected pins.
| Toggles the visibility of all pin spectra.
| Switches the grid lines of the diagram on and off.
| Exports the spectra to a `.csv` file.
| Displays this help page.

#### Plot Range Fields

    ‣ Set Bounds X-Axis:
            Sets bounds of x-axis (uses X-Axis Min and X-Axis Max)

    ‣ X-Axis Min:
            Sets minimum bound of x-axis (blank entry uses auto-bounding to data)

    ‣ X-Axis Max:
            Sets maximum bound of x-axis (blank entry uses auto-bounding to data)

    ‣ Set Bounds Y-Axis:
            Sets bounds of y-axis (uses Y-Axis Min and Y-Axis Max)

    ‣ Y-Axis Min:
            Sets minimum bound of y-axis (blank entry uses auto-bounding to data)

    ‣ Y-Axis Max:
            Sets maximum bound of y-axis (blank entry uses auto-bounding to data)

#### System Performance Notes:

SeaDAS tools can become quite bogged down and slow, when working with large files such as the NASA OB.DAAC PACE AOP Level-2 files (which are in NetCDF format, and are compressed, and contain hundreds of spectral band). There are several options the user can explore to improve performance.

- Modify Tile Size (in Preferences)
  Spectrum View processes the scene one tile at a time.
  For example: if a scene size is 1000 pixels by 1000 pixels, and the tile size is 500 pixels (configurable in Preferences > Performance), then the scene would be divided into 4 tiles (500 pixels by 500 pixels) for processing. Spectrum View would then only process the tiles marked for processing.
  There are two Spectrum View modes to consider, pin mode and cursor mode.
  - Pin Mode
    Only the tiles which actually contain pins are processed. Any tiles which do not contain pins are not processed. Therefore, if there are only a few pins, or there a groupings of pins which do not span the full scene, then setting tile size small can improve performance.
  - Cursor Mode
    Only the tile which is located at the mouse cursor hover position is processed. Small tiles are nice if you plan to explore only a small section of the scene, but if you plan to move the cursor across all the image, then for small tiles, each new tile encountered will trigger a processing. While processing of a tile is being done the cursor is ignored, however when processing of a tile is completed and the cursor has been moved to a different tile, then the new tile will be processed. So in cursor mode, make sure to place cursor in your region of interest and then wait for processing to complete.
- Modify File Compression
  NASA OB.DAAC Level-2 files (which are in NetCDF format) are compressed files which is beneficial regarding file storage space. However, large compressed files can take longer to process within the Spectrum View. One option to improve performance is to reduce the compression of the file.
  - Converting an existing level2 file
    There are command line utilities for making an uncompressed copy of an existing level2 file.

        nccopy -d 0 L2fileIn L2fileOut

  - Creating a new level2 file (L2gen)
    You can create a new level-2 file from the level-1 files by using l2gen and including 'deflate=0' as one of the arguments.