Boolean DateiManager::treeExpanded (IContainerObject *o, IContainerControl *c) { disableUpdate (); Links.deleteTree (o); HDIR h = HDIR_CREATE; FILEFINDBUF3 b; ULONG Attribute = MUST_HAVE_DIRECTORY; ULONG n = 1; APIRET e; Verzeichnis *v = (Verzeichnis *)o; e = DosFindFirst (v->path () + "\\*.*", &h, Attribute, &b, sizeof (b), &n, FIL_STANDARD); while ( e == 0 ) { if ( IString (b.achName) != "." && IString (b.achName) != ".." ) { Verzeichnis *neu = new Verzeichnis (v->path () + "\\" + b.achName); c->addObject (neu, o); c->addObject (new Verzeichnis ("dummy"), neu); } e = DosFindNext (h, &b, sizeof (b), &n); } DosFindClose (h); enableUpdate (); return true; }
/** * Get the center X/Y Dn values for the bin at index. * * @param index The bin to get the center X/Y DN Values for * * @return The center DN value of the given bin */ QPair<double, double> ScatterPlotData::binXY(int index) const { QPair<int, int> indices = binXYIndices(index); int xIndex = indices.first; int yIndex = indices.second; if (xIndex != -1 && yIndex != -1) { int xSize = 0; int ySize = m_counts->size(); // Assume square 2D structurs if (ySize > 0) xSize = (*m_counts)[0].size(); double percentAcrossXRange = ((double)xIndex / (double)xSize); double xDnValue = m_xCubeMin + percentAcrossXRange * (m_xCubeMax - m_xCubeMin); double percentAcrossYRange = ((double)yIndex / (double)ySize); double yDnValue = m_yCubeMin + percentAcrossYRange * (m_yCubeMax - m_yCubeMin); return QPair<double, double>(xDnValue, yDnValue); } IString msg = "Bin at index [" + IString(index) + "] not found. " "There are [" + IString(numberOfBins()) + "] bins"; throw IException(IException::Programmer, msg, _FILEINFO_); }
Boolean DetailsTreeHandler :: windowScrolled(ICnrScrollEvent& evt) { IFUNCTRACE_DEVELOP(); IContainerControl* thisContainer = (IContainerControl*)evt.controlWindow(); IContainerControl* otherContainer; if(thisContainer==treeCnr) { ITRACE_DEVELOP("Tree scrolled"); otherContainer = &(treeCnr->detailsContainer()); } else { ITRACE_DEVELOP("Details scrolled"); otherContainer = treeCnr; } // Only worry about Vertical Scroll - scroll the Tree View the // same amount. if(evt.isVertical()) { if (!treeCnr->scrollStarted()) { treeCnr->setScrollStarted(true); otherContainer->scrollVertically(evt.amount()); ITRACE_DEVELOP(IString("Scrolled vertically(")+IString(evt.amount())); } else treeCnr->setScrollStarted(false); } return true; }
//************************************************************************** // ATopicServer :: acceptConversation(..) //************************************************************************** bool ATopicServer :: acceptConversation(unsigned long conversationId, IDDEBeginEvent& event) { mainWindow()->log( // Log this message with IString(resLib.loadString( MI_ACCEPT ))+ //member function name IString(conversationId)); // conversation ID return true; } /* end ATopicServer :: acceptConversation(..) */
IString SimpleIterationDataBlock::timeFileName(const IString& name, const IString& blockIndex, const IString& dateiEndung) const { Timer time; const IString zeitstempel(time.timeStamp()); const IString value = IString(zeitstempel) + IString("-") + IString(blockIndex) + IString("-") + IString(name) + IString(dateiEndung); return value; }
/** * @brief Parse the LimitPolygonSeeder spicific parameters from the PVL * * @param pvl The PVL object containing the control parameters for this * polygon seeder. */ void LimitPolygonSeeder::Parse(Pvl &pvl) { // Call the parents Parse method PolygonSeeder::Parse(pvl); // Pull parameters specific to this algorithm out try { // Get info from Algorithm group PvlGroup &algo = pvl.findGroup("PolygonSeederAlgorithm", Pvl::Traverse); PvlGroup &invalgo = invalidInput->findGroup("PolygonSeederAlgorithm", Pvl::Traverse); // Set the spacing p_majorAxisPts = 0; if(algo.hasKeyword("MajorAxisPoints")) { p_majorAxisPts = (int) algo["MajorAxisPoints"]; if(invalgo.hasKeyword("MajorAxisPoints")) { invalgo.deleteKeyword("MajorAxisPoints"); } } else { QString msg = "PVL for LimitPolygonSeeder must contain [MajorAxisPoints] in ["; msg += pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } p_minorAxisPts = 0; if(algo.hasKeyword("MinorAxisPoints")) { p_minorAxisPts = (int) algo["MinorAxisPoints"]; if(invalgo.hasKeyword("MinorAxisPoints")) { invalgo.deleteKeyword("MinorAxisPoints"); } } else { QString msg = "PVL for LimitPolygonSeeder must contain [MinorAxisPoints] in ["; msg += pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } } catch(IException &e) { QString msg = "Improper format for PolygonSeeder PVL [" + pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } if(p_majorAxisPts < 1.0) { IString msg = "Major axis points must be greater that 0.0 [(" + IString(p_majorAxisPts) + "]"; throw IException(IException::User, msg, _FILEINFO_); } if(p_minorAxisPts <= 0.0) { IString msg = "Minor axis points must be greater that 0.0 [(" + IString(p_minorAxisPts) + "]"; throw IException(IException::User, msg, _FILEINFO_); } }
//************************************************************************** // ATopicServer :: hotLinkEnded(..) //************************************************************************** void ATopicServer :: hotLinkEnded(unsigned long conversationId, IDDEEvent& event) { mainWindow()->log( // Log this request with IString(resLib.loadString( MI_END_HOTLINK ))+ // function member name event.item()+ // event item IString(resLib.loadString( MI_FROM ))+ // IString(conversationId)); // conversation ID mainWindow()->removeHot(); //Set hot link inactive mainWindow()->removeHot(); //Set hot link inactive mainWindow()->removeHot(); //Set hot link inactive } /* end ATopicServer :: beginHotLink(..) */
/** * Adds an angle to this latitude. The adding method is determined by the * latitude type. * * @param angleToAdd the latitude being added to this one * @param mapping the mapping group from a projection * @return The result */ Latitude Latitude::add(Angle angleToAdd, PvlGroup mapping) { CoordinateType latType; Distance equatorialRadius; Distance polarRadius; if (mapping.hasKeyword("EquatorialRadius") && mapping.hasKeyword("PolarRadius")) { equatorialRadius = Distance(toDouble(mapping["EquatorialRadius"][0]), Distance::Meters); polarRadius = Distance(toDouble(mapping["PolarRadius"][0]), Distance::Meters); } else { PvlGroup radiiGrp = TProjection::TargetRadii(mapping["TargetName"]); equatorialRadius = Distance(toDouble(radiiGrp["EquatorialRadius"][0]), Distance::Meters); polarRadius = Distance(toDouble(radiiGrp["PolarRadius"][0]), Distance::Meters); } if(mapping["LatitudeType"][0] == "Planetocentric") latType = Planetocentric; else if (mapping["LatitudeType"][0] == "Planetographic") latType = Planetographic; else { IString msg = "Latitude type [" + IString(mapping["LatitudeType"][0]) + "] is not recognized"; throw IException(IException::Programmer, msg, _FILEINFO_); } return add(angleToAdd, equatorialRadius, polarRadius, latType); }
/** * Create and initialize a Latitude value with planetographic support. * * @see ErrorChecking * @see CoordinateType * @param latitude The latitude value this instance will represent, * in planetocentric * @param equatorialRadius Radius of the target (planet) at the equator * @param polarRadius Radius of the target (planet) at the poles * @param latType The coordinate system of the latitude parameter * @param latitudeUnits The angular units of the latitude value (degs, rads) * @param errors Error checking conditions */ Latitude::Latitude(double latitude, Distance equatorialRadius, Distance polarRadius, CoordinateType latType, Angle::Units latitudeUnits, ErrorChecking errors) : Angle(latitude, latitudeUnits) { m_equatorialRadius = NULL; m_polarRadius = NULL; m_equatorialRadius = new Distance(equatorialRadius); m_polarRadius = new Distance(polarRadius); m_errors = errors; if (latType == Planetocentric) { setPlanetocentric(latitude, latitudeUnits); } else if (latType == Planetographic) { setPlanetographic(latitude, latitudeUnits); } else { IString msg = "Enumeration value [" + IString(latType) + "] is not a " "valid CoordinateType"; throw IException(IException::Programmer, msg, _FILEINFO_); } }
/** * Returns the day of year portion of the time as an int * * @return int */ int iTime::DayOfYear() const { SpiceChar out[4]; // Populate the private year member timout_c(p_et, "DOY", 4, out); return IString(out).ToInteger(); }
DKTSDIterationInfo DGKTSDecomposer::decompose(DKTS& a, DKTS& xi, DKTSDDataBlock& dataBlock) { DKTSDIterationInfo infoEntry; if(resize(a, xi)==true) { if(20<=a.k()) { (*this) .setUseNewtonMethode(false) ; } else { (*this) .setUseNewtonMethode(true) ; } (*this) .setDefaultParameter(1.0) ; infoEntry = startIteration(a, xi, 1.0, dataBlock); } else { throw SimpleException(IString("Warning In DGKTSD::decompose(const DKTS& a, DKTS& x, DKTSDDataBlock& dataBlock), Error in resize !!!")); } return infoEntry; }
/** * Get the latitude in the planetographic coordinate system. If this instance * was not constructed with the planetary radii, then an exception will be * thrown. * * @see CoordinateType * @param units The angular units to get the latitude in * @return The Planetographic latitude value */ double Latitude::planetographic(Angle::Units units) const { if (m_equatorialRadius == NULL || m_polarRadius == NULL) { IString msg = "Latitude [" + IString(degrees()) + " degrees] cannot " "be converted to Planetographic without the planetary radii, please " "use the other Latitude constructor"; throw IException(IException::Programmer, msg, _FILEINFO_); } if (*this > Angle(90.0, Angle::Degrees) || *this < Angle(-90.0, Angle::Degrees)) { IString msg = "Latitudes outside of the -90/90 range cannot be converted " "between Planetographic and Planetocentric"; throw IException(IException::Programmer, msg, _FILEINFO_); } if(!isValid()) { IString msg = "Invalid planetographic latitudes are not currently " "supported"; throw IException(IException::Programmer, msg, _FILEINFO_); } double ographicLatitude = atan(tan(radians()) * (*m_equatorialRadius / *m_polarRadius) * (*m_equatorialRadius / *m_polarRadius)); // This theoretically should just be an angle, but make it a Latitude so // we can access angle return Latitude(ographicLatitude, Angle::Radians).angle(units); }
/** * @brief Determines type of NAIF/ISIS kernel we're dealing with * * This method will open the file and look at the first 8 characters. Valid * NAIF binary and text kernels typically have its type defined in the first 8 * characters. The expected format of these characters is "DAF/CK". This * method retrieves this string, trims off formatting characters and spaces * and returns the string after the "/" character. This value is returned as * the kernel type. * * It also checks for ISIS DEMs and a special case of ISIS IAKs, which does * not follow the NAIF convention. ISIS IAKs don't typically contain the NAIF * format identifier but do contain the ".ti" file extention. * * UNKNOWN and DAF types are further checked by the filename. This is a last * resort to properly tag kernel types that are ambiguous. DAFs are common * for some SPKs. UNKNOWNs are common for many kernels that do not follow the * NAIF standard first 8 character identifier model. * * @param kfile Name of potential NAIF kernel to determine type for * * @return QString Value of the identifier found. If undetermined, * "UNKNOWN" is returned. */ QString Kernels::resolveType(const QString &kfile) const { FileName kernFile(kfile); QString kpath = kernFile.expanded(); ifstream ifile(kpath.toAscii().data(), ios::in | ios::binary); QString ktype("UNKNOWN"); if (ifile) { char ibuf[10]; ifile.read(ibuf, 8); ibuf[8] = '\0'; for (int i = 0 ; i < 8 ; i++) if (ibuf[i] == '\n') ibuf[i] = '\0'; // See if the file is a known NAIF type. Assume it has been // extracted from a NAIF compliant kernel QString istr = IString(ibuf).Trim(" \n\r\f\t\v\b").ToQt(); if (istr.contains("/")) { ktype = istr.split("/").last(); } // If type is not resolved, check file extensions and special ISIS types if ((ktype == "UNKNOWN") || (ktype == "DAF")) { ktype = resolveTypeByExt(kfile, ktype); } } return (ktype); }
/** * Set the latitude given a value in the Planetographic coordinate system * * @param latitude The planetographic latitude to set ourselves to * @param units The angular units latitude is in */ void Latitude::setPlanetographic(double latitude, Angle::Units units) { if (m_equatorialRadius == NULL || m_polarRadius == NULL) { IString msg = "Latitude [" + IString(latitude) + "] cannot be " "converted to Planetocentic without the planetary radii, please use " "the other Latitude constructor"; throw IException(IException::Programmer, msg, _FILEINFO_); } Angle inputAngle(latitude, units); if (inputAngle > Angle(90.0, Angle::Degrees) || inputAngle < Angle(-90.0, Angle::Degrees)) { IString msg = "Latitudes outside of the -90/90 range cannot be converted " "between Planetographic and Planetocentric"; throw IException(IException::Programmer, msg, _FILEINFO_); } if(IsSpecial(latitude)) { IString msg = "Invalid planetographic latitudes are not currently " "supported"; throw IException(IException::Programmer, msg, _FILEINFO_); } double ocentricLatitude = atan(tan(inputAngle.radians()) * (*m_polarRadius / *m_equatorialRadius) * (*m_polarRadius / *m_equatorialRadius)); // Sometimes the trig functions return the negative of the expected value at the pole. if ((ocentricLatitude > 0) != (inputAngle.radians() > 0)) { ocentricLatitude *= -1; } setAngle(ocentricLatitude, Angle::Radians); }
/** * Returns the year portion of the time as an int * * @return int */ int iTime::Year() const { SpiceChar out[5]; // Populate the private year member timout_c(p_et, "YYYY", 5, out); return IString(out).ToInteger(); }
/** * Returns the minute portion of the time as an int * * @return int */ int iTime::Minute() const { SpiceChar out[3]; // Populate the private year member timout_c(p_et, "MN", 3, out); return IString(out).ToInteger(); }
RMatrix& RMatrix::isInverseOf(const AMatrix& s, AMatrix& w) { const AMatrixType theMatrixS = s.type(); const AMatrixType theMatrixW = w.type(); if(theMatrixS==isRMatrix && theMatrixW==isRMatrix) { const RMatrix& S = (const RMatrix&)s; const RMatrix& W = (const RMatrix&)w; (*this) = S; integer m = numberOfRows(); integer n = numberOfColumns(); integer lda = MAX(1,m); integer dim = MIN(m,n); integer info = 0; integer lwork = m*n; integer* ipiv = new integer[dim]; // dgetrf (&m, &n, (LongReal*) &_pelm[0], &lda, ipiv, &info); // dgetri (&m, (LongReal*) &_pelm[0], &lda, ipiv, (LongReal*) &W(0,0), &lwork, &info); info = TensorCalculus::Lapack<double>::getrf (m, n, &_pelm[0], lda, ipiv); info = TensorCalculus::Lapack<double>::getri (m, &_pelm[0], lda, ipiv, &W(0,0), lwork); delete [] ipiv; } else { throw SimpleException(IString("Warning In RMatrix::isInverseOf(const AMatrix& s, const AMatrix& w), Bad Type!!!")); } return (*this); }
/** * Returns the second portion of the time as a double * * @return double */ double iTime::Second() const { SpiceChar out[256]; // Populate the private year member timout_c(p_et, "SC.#######::RND", 256, out); return IString(out).ToDouble(); }
/** * @brief Determine type of NAIF kernel file * * * This method will determine the type of kernel contained in the file * specified by the kfile parameter. * * The file specified by the kfile parameter is assumed to conform to NAIF * kernel file conventions (i.e., binary kernels are created using the NAIF * toolkit, text kernels conform to NAIF standards). There are, however, two * exceptions that must be considered. ISIS DEMs are cubes and do not follow * the NAIF convention for obvious reasons. ISIS IAK kernels also do not * typically follow NAIF identification standards. These two cases are * handled special. * * To determine a NAIF standard conforming file type, the first eight * characters of the file given will be inspected to determine the NAIF kernel * type. If this fails to produce a known type, then it is assumed to be an * ISIS DEM or IAK kernel. * * For valid NAIF kernels, the NAIF routine kinfo_c is used to acquire * additional information such as if it is loaded. * * For files where the type cannot be determined, the type is set to * "UNKNOWN". ISIS DEMs are set to the type "DEM". ISIS IAKs are set to * "IAK". Other types are set as follows: * * CK * SPK * DAF (may be SPKs) * PCK * EK * META * IK * FK * SCLK * * * @param kfile Name of kernel file to inspect * @param manage Default state to assign to kernel. Note that this only * retains effect if the kernel is not loaded. If it is loaded, * its state is set to unmanaged. You must explicitly exert * management upon kernels that are already loaded. Optional * argument so the default is true. * * @return Kernels::KernelFile An internal Kernels file structure describing * the file. */ Kernels::KernelFile Kernels::examine(const QString &kfile, const bool &manage) const { FileName kernfile(kfile); KernelFile kf; kf.pathname = kfile; kf.name = kernfile.name(); kf.fullpath = kernfile.expanded(); kf.exists = kernfile.fileExists(); kf.ktype = "UNKNOWN"; kf.loaded = false; // Assumes its not loaded kf.managed = manage; // Determine type and load info if (kf.exists) { kf.ktype = resolveType(kf.fullpath); // Use NAIF to determine if it is loaded if (IsNaifType(kf.ktype)) { SpiceChar ktype[32]; SpiceChar source[128]; SpiceInt handle; SpiceBoolean found; kinfo_c(kf.fullpath.toAscii().data(), sizeof(ktype), sizeof(source), ktype, source, &handle, &found); if (found == SPICETRUE) { kf.loaded = true; kf.managed = false; kf.ktype = IString(ktype).UpCase().ToQt(); } } } return (kf); }
bool Set(const std::string& val) { bool ok = stringto(val, value); if (!ok) std::cout << IString("Cannot parse integer value '%s' for -%c", val, shortOpt) << std::endl; return ok; }
/** * Checks if this latitude value is within the given range. Defines the * range as the change from the minimum latitude to the maximum latitude (an * angle), and returns whether the change from the minimum latitude to this * latitude is less than or equal to the maximum change allowed (the range). * * @param min The beginning of the valid latitude range * @param max The end of the valid latitude range * * @return Whether the latitude is in the given range */ bool Latitude::inRange(Latitude min, Latitude max) const { // Validity check on the range if (min > max) { IString msg = "Minimum latitude [" + IString(min.degrees()) + "] degrees is greater than maximum latitude [" + IString(max.degrees()) + "] degrees"; throw IException(IException::User, msg, _FILEINFO_); } // Provide a little wriggle room for precision problems Angle epsilon(DBL_EPSILON, Angle::Degrees); Latitude adjustedMin = min - epsilon; Latitude adjustedMax = max + epsilon; // Is this latitude between the min and the max return *this >= adjustedMin && *this <= adjustedMax; }
/** * @brief Get a vector of comma separated types from a string * * This method parses a string assumed to contain NAIF kernel file types. It * will return a vector of strings that contain each type found in the string * parameters, ktypes. * * Validity of the types of values found here are not verified but can still * be used effectively in other manipulation activities in this object. * * Here is now the strings are used: * * @code * std::vector<QString> klist = myKernels.getTypes("LSK,FK,SPK"); for * (unsigned int i = 0 ; i < klist.size(I) ; i++) { * cout << i << ": " << klist[i] << endl; * } * @endcode * * This will result in out of the following: * @code * 0: LSK * 1: FK * 2: SPK * @endcode * * * @param ktypes Sgtring containing comma separated list of kernel file types * * @return std::vector<QString> Vector containing values between commas. */ QStringList Kernels::getTypes(const QString &ktypes) const { // Find types and return requested types QStringList tlist = ktypes.split(","); for (int k = 0 ; k < tlist.size() ; k++) { tlist[k] = IString(tlist[k]).Trim(" \r\n\t\v\b\f").UpCase().ToQt(); } return (tlist); }
/** * @brief Check kernel type by file extension and special ISIS kernels * * This method is a fallback attempt to determine the type of an expected NAIF * kernel. This method assumes the proper way (inspecting first 8 characters * of the kernel file) did not succeed in making this determination. * * There are some times that are expected to fail this test. ISIS DEMs are * cube files and will not be determined using the NAIF 8 character approach. * As such, all files that end in .cub are assumed to be DEMs and are tagged * as such. * * There are also some special ISIS IK addendum files that exist in the ISIS * system. These files are used to augment an instruments' IK kernel and * potentially override some of the original IK contents. This file type is * determined by checking for a ".ti" extension and then further checking the * base filename for the substring "Addendum". This is the only way to ensure * it is an ISIS IAK file. It must pass both tests or it is simply tagged as * an IK (due to the .ti extension). * * The remainder of the tests are strictly testing the file extension. Here is * how the associations are made to the files based upon their file * extensions: * * .cub = DEM - ISIS cubes are DEMs * .ti = IK - unless "Addendum" is in basename, then it is an IAK * .tf = FK - frames kernel * .tsc = SCLK - spacecraft clock kernel * .tsl = LSK - leap seconds kernel * .tpc = PCK - planetary ephemeris kernel * .bc = CK - C-kernel * .bsp = SPK - spacecraft position kernel * .bes = EK - event kernels * * If none of these file extensions or condition are found, then the value of * the parameter iktype is returned as the default type. * * @param kfile File to determine type for * @param iktype Default type to be used in none are determined from this * methiod * * @return QString Type of kernel found from file extensions */ QString Kernels::resolveTypeByExt(const QString &kfile, const QString &iktype) const { QString ktype(iktype); // Set default condition // Deciminate file parts FileName kf(kfile); string ext = IString(kf.extension()).DownCase(); // Check extensions for types if (ext == "cub") { ktype = "DEM"; } else if (ext == "ti") { // Assume its an instrument kernel but check for ISIS IAK file ktype = "IK"; string base = IString(kf.baseName()).DownCase(); string::size_type idx = base.find("addendum"); if (idx != string::npos) { // This is an ISIS IK addendum (IAK) ktype = "IAK"; } } else if (ext == "tsc") { ktype = "SCLK"; } else if (ext == "tf") { ktype = "FK"; } else if (ext == "tls") { ktype = "LSK"; } else if (ext == "tpc") { ktype = "PCK"; } else if (ext == "bc") { ktype = "CK"; } else if (ext == "bsp") { ktype = "SPK"; } else if (ext == "bes") { ktype = "EK"; } return (ktype); }
//************************************************************************** // ATopicServer :: pokeData(..) //************************************************************************** bool ATopicServer :: pokeData(unsigned long conversationId, IDDEPokeEvent& event) { int rc=1; //Set default return code to processed if(event.item()==IString(resLib.loadString( MI_DONEPOKE ))) //Check the requested item { // the request is ok IString workItem=event.pokedData(); //Get poked Data mainWindow()->log( // Log this request with IString(resLib.loadString( MI_POKEDATA ))+ // function member name event.item()+ // event item (nextTodo) IString(resLib.loadString( MI_DATA ))+workItem+ // work item from client IString(resLib.loadString( MI_FROM ))+ // IString(conversationId)); // conversation ID mainWindow()->addDone(workItem); //Add this item to the done list } else //Request does not match { // mainWindow()->log( IString(resLib.loadString( MI_POKEDATA2 ))+ IString(resLib.loadString( MI_UNABLE_HANDLE )) + event.item()); rc=0; //Set return code to event not processed } return rc; } /* end ATopicServer :: pokeData(..) */
/** * Set the albedo dependent phase function normalization parameter. * This is an emperically derived coefficient. This parameter is * limited to values >= 0. * * @param bsh1 Normalization function parameter, default is 0.08 */ void MoonAlbedo::SetNormBsh1(const double bsh1) { if(bsh1 < 0.0) { std::string msg = "Invalid value of normalization bsh1 [" + IString(bsh1) + "]"; throw IException(IException::User, msg, _FILEINFO_); } p_normBsh1 = bsh1; }
/** * Set the normalization function parameter. This is the * reference emission angle to which the image photometry will * be normalized. This parameter is limited to values that are * >=0 and <90. * * @param emaref Normalization function parameter, default * is 0.0 */ void ShadeAtm::SetNormEmaref(const double emaref) { if(emaref < 0.0 || emaref >= 90.0) { std::string msg = "Invalid value of normalization emaref [" + IString(emaref) + "]"; throw IException(IException::User, msg, _FILEINFO_); } p_normEmaref = emaref; }
/** * @brief Method to get photometric property given angles * * This routine computes the photometric property at the given * cube location after ensuring a proper parameter container is * found for the specified band. * * @author Kris Becker - 2/21/2010 * * @param i Incidence angle at cube location * @param e Emission angle at cube location * @param g Phase angle at cube location * @param band Band number in cube (actually is band index) for * lookup purposes * * @return double Returns photometric correction using * parameters */ double Hillier::photometry ( double i, double e, double g, int band ) const { // Test for valid band if ((band <= 0) || (band > (int) _bandpho.size())) { std::string mess = "Provided band " + IString(band) + " out of range."; throw IException(IException::Programmer, mess, _FILEINFO_); } double ph = photometry(_bandpho[band - 1], i, e, g); return (_bandpho[band - 1].phoStd / ph); }
void QFMotionPlayer::open() { #ifdef TRACE stampTime(); *debugOutput << "Open:" << '\t' << &qf << endl; #endif moviePlayer->open(IString(), true, IMMDevice::nowait); }
/** * Set the albedo dependent phase function normalization parameter. * This is an emperically derived coefficient. This parameter * is limited to non-zero values. * * @param h Normalization function parameter, default is 0.048 */ void MoonAlbedo::SetNormH(const double h) { if(h == 0.0) { std::string msg = "Invalid value of normalization h [" + IString(h) + "]"; throw IException(IException::User, msg, _FILEINFO_); } p_normH = h; }
/** * Set the normalization function parameter. This is the * reference phase angle to which the image photometry will * be normalized. This parameter is limited to values that are * >=0 and <180. * * @param pharef Normalization function parameter, default * is 0.0 */ void ShadeAtm::SetNormPharef(const double pharef) { if(pharef < 0.0 || pharef >= 180.0) { std::string msg = "Invalid value of normalization pharef [" + IString(pharef) + "]"; throw IException(IException::User, msg, _FILEINFO_); } p_normPharef = pharef; }