source: sasview/src/sas/sascalc/simulation/pointsmodelpy/libpointsmodelpy/points_model.h @ 58a255b

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 58a255b was d85c194, checked in by Piotr Rozyczko <piotr.rozyczko@…>, 9 years ago

Remaining modules refactored

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/** \file points_model.h child class of SASmodel*/
2
3#ifndef POINTSMODEL_H
4#define POINTSMODEL_H
5
6#include <vector>
7#include "tnt/tnt.h"
8#include <string>
9#include "Point3D.h"
10#include "iq.h"
11#include "sas_model.h"
12
13using namespace std;
14
15class PointsModel : public SASModel{
16 public:
17  PointsModel();
18  virtual ~PointsModel();
19
20  void CalculateIQ(IQ *iq);
21  double CalculateIQ(double q);
22  double CalculateIQError(double q);
23 
24  // Old lengthy 2D simulation (unchecked)
25  void CalculateIQ_2D(IQ *iq,double phi);
26  double CalculateIQ_2D(double qx, double qy);
27 
28  // Fast 2D simulation
29  double CalculateIQ_2D(const vector<Point3D>&, double qx, double qy);
30  double CalculateIQ_2D_Error(const vector<Point3D>&, double qx, double qy);
31 
32  //given a set of points, calculate distance correlation
33  //function, and return the max dist
34  double DistDistribution(const vector<Point3D>&);
35  void DistDistributionXY(const vector<Point3D>&);
36
37  Array2D<double> GetPr();
38  void OutputPR(const std::string &);
39  void OutputPR_XY(const std::string &);
40
41  virtual int GetPoints(Point3DVector &) = 0;
42  void OutputPDB(const vector<Point3D>&,const char*);
43
44  //will be used in calculating P(r), the maximum distance
45  virtual double GetDimBound() = 0;
46  //will be used to determin the maximum distance for
47  //several pointsmodel instances
48  virtual vector<double> GetCenter();
49
50 protected:
51  double CalculateRstep(int num_points, double rmax);
52  double rmax_, rstep_,cormax_,cormax_xy_;
53  int r_grids_num_;
54  vector<double> center_;
55
56 private:
57  Array2D<double> pr_,pr_xy_;
58  vector<double> product_sld_;
59};
60
61#endif
Note: See TracBrowser for help on using the repository browser.