//
// Spectrum.java
//
/*
VisAD system for interactive analysis and visualization of numerical
data. Copyright (C) 1996 - 2017 Bill Hibbard, Curtis Rueden, Tom
Rink, Dave Glowacki, Steve Emmerson, Tom Whittaker, Don Murray, and
Tommy Jasmin.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
*/
package visad.sounder;
import visad.*;
import visad.java3d.DirectManipulationRendererJ3D;
import visad.data.netcdf.units.UnitsDB;
import visad.data.netcdf.units.DefaultUnitsDB;
import visad.data.netcdf.StandardQuantityDB;
import java.util.Vector;
import java.rmi.RemoteException;
/**
Sounding is the VisAD class for atmospheric soundings.
It extends FlatField.
*/
public class Spectrum extends FlatField {
static private UnitsDB udb;
static private StandardQuantityDB qdb;
static private RealType Wavelength;
static private RealType Radiance;
static private FunctionType spectrumType;
static {
try {
udb = DefaultUnitsDB.instance();
qdb = StandardQuantityDB.instance();
Wavelength = qdb.get("Wavelength");
Radiance = qdb.get("Radiance");
spectrumType = new FunctionType(Wavelength, Radiance);
}
catch (VisADException e) {
e.printStackTrace();
}
}
//- this spectrum's display_s
//
private Vector spectrumDisplay_s = new Vector();
//- this spectrum's DataReference
//
DataReferenceImpl spectrum_ref;
Unit domain_unit;
Unit range_unit;
public Spectrum(float[] wavelength_domain,
Unit domain_unit,
float[] radiance_range,
Unit range_unit
)
throws VisADException, RemoteException
{
super(spectrumType, makeSet(wavelength_domain));
int length = getLength();
if (radiance_range == null) {
radiance_range = new float[length];
for (int i=0; i
Ads help maintain this website.