#ifndef SOLAREDGEMODEL_H_ #define SOLAREDGEMODEL_H_ // //----------------------------------------------------------------------- /// @copyright /// (c) Copyright 2008 by GATS, Inc., /// 11864 Canon Blvd, Suite 101, Newport News VA 23606 /// /// All Rights Reserved. No part of this software or publication may be /// reproduced, stored in a retrieval system, or transmitted, in any form /// or by any means, electronic, mechanical, photocopying, recording, or /// otherwise without the prior written permission of GATS, Inc. /// //----------------------------------------------------------------------- /// /// @file SolarEdgeModel.h /// /// @author John Burton /// /// @date Thu May 8 14:06:58 2008 /// //----------------------------------------------------------------------- // //----------------------------------------------------------------------- // Include Files: //----------------------------------------------------------------------- // #include #include "EventVar.h" #include "EventVarVect.h" #include "ConfigFile.h" #include "XAxisFunctor.h" // //----------------------------------------------------------------------- // Constants, Defines, Macros and Type Definitions: //----------------------------------------------------------------------- // // //----------------------------------------------------------------------- // Global Variables: //----------------------------------------------------------------------- // // //----------------------------------------------------------------------- // Class Definition: //----------------------------------------------------------------------- // class SolarEdgeModel { // //----------------------------------------------------------------------- // Private Members: //----------------------------------------------------------------------- // private: ConfigFile cf_; std::string section_; EventVar AverageIntensity_; EventVar ExtentNormalizedGrid_; EventVar ImpactAngleGrid_; EventVar FPACoordinateGrid_; EventVar EdgeModel_; EventVar Sample_; double TopEdgeIntensity_; double BottomEdgeIntesity_; XAxisFunctor ImpactAngleAxis_; XAxisFunctor FPACoordinateAxis_; // double linterp(double &x, double &xa, double &xb, double &ya, double &yb); // double findLowXEdge(double &edge, EventVar &X, EventVar &Y); // double findHighXEdge(double &edge, EventVar &X, EventVar &Y); void lmAdjustFunction(double *p); double lmFitFunction(double loc); void lmEvaluate(double *par, int m_dat, double *fvec, void *data, int *info); void lmPrint(int n_par, double *par, int m_dat, double *fvec, void *data, int iflag, int iter, int nfev); // //----------------------------------------------------------------------- // Protected Members: //----------------------------------------------------------------------- // protected: // //----------------------------------------------------------------------- // Public Members: //----------------------------------------------------------------------- // public: SolarEdgeModel(ConfigFile &cf, std::string section); void calcImpactAngleGrid(double &topedge, double &bottomedge); void calcFPACoordinateGrid(double &topedge, double &bottomedge); void attenuateEdgeModel(EventVar &ImpactAngle, EventVar &Transmission); void plotEdgeModel(double &ts); EventVarVect findEdges(EventVar &Xgrid, EventVar &sample, double &lx, double &lxval, double &hx, double &hxval, double &te, double &be); // EventVar doEdgeModel(EventVar &sample, double &lx, double &lxval, // double &hx, double &hxval, double &te, double &be); EventVar doEdgeModel(EventVar &Xgrid, EventVar &sample, double &lx, double &lxval, double &hx, double &hxval); EventVar findIntensityCoeff(EventVar &vals, EventVar &locs); EventVar findNoiseFloorAndBlur(EventVar &vals, EventVar &locs); void applyNoiseFloorAndBlur(EventVar &coeffs); }; // end class SolarEdgeModel #endif