45 CSVReader csv(smileDefFilename.toString());
47 if (csv.columns() != 2) {
48 QString msg = QObject::tr(
"Input calibration file [%1] must have 2 columns with "
49 "the format: wavelength centers, wavelength widths").
50 arg(smileDefFilename.toString());
55 QString msg = QObject::tr(
"Input calibration file [%1] must have at least 2 lines.").
56 arg(smileDefFilename.toString());
66 if (centers[0] < centers[1]) {
73 double lastWavelength = centers[0].toDouble();
76 for (
int i=0; i <csv.rows(); i++) {
85 Spectel temp(Isis::NULL8, Isis::NULL8, i+1, Isis::NULL8, centers[i].
toDouble(),
87 tempList->append(temp);
88 lastWavelength = centers[i].toDouble();
104 QString msg = QObject::tr(
"Unable to open input file [%1]. Is it a valid CSV?").
105 arg(smileDefFilename.toString());
117 temp +=
"----Section ";
118 temp +=QString::number(i);
121 temp+=
"Wavelength= ";
122 temp+=QString::number(
m_spectelList->at(i)->at(j).centerWavelength());
124 temp+=QString::number(
m_spectelList->at(i)->at(j).filterWidth());
195 if (tempBand <= m_spectelList->at(i)->length()) {
244 double bestDiff = DBL_MAX;
245 double bestBand = -DBL_MAX;
248 QString msg = QObject::tr(
"Input section number is greater than total number of sections.");
252 for (
int i=0; i<
m_spectelList->at(sectionNumber)->length(); i++) {
253 diff =
m_spectelList->at(sectionNumber)->at(i).centerWavelength() - wavelength;
254 if (std::abs(diff) < std::abs(bestDiff)) {
261 if (bestBand == -DBL_MAX) {