// Copyright (C) 1999-2018 // Smithsonian Astrophysical Observatory, Cambridge, MA, USA // For conditions of distribution and use, see copyright notice in "copyright" #include "inversescale.h" #include "framebase.h" #include "colorscale.h" InverseScale::InverseScale(int ss) : size_(ss) { level_ = new double[size_]; for (int ii=0; iivv) break; jj++; } double aa = double(jj)/histsize; level_[ii] = aa*dd +low; } } } IISInverseScale::IISInverseScale(int ss, double low, double high, Vector& iisz) : InverseScale(ss) { low = IISMIN; high = IISMAX; if (size_==1) { level_[0] = high; return; } double dd = high-low; for (int ii=0; ii IISMAX) level_[ii] = iisz[1]; else level_[ii] = ((vv-IISMIN) * (iisz[1]-iisz[0]))/(IISMAX-IISMIN) + iisz[0]; } }