source: sasview/realSpaceModeling/pointsmodelpy/libpointsmodelpy/points_model.h @ 2bb0b26

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.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 2bb0b26 was 2bb0b26, checked in by Mathieu Doucet <doucetm@…>, 17 years ago

Added underlying 2D real-space simulation

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/** \file points_model.h child class of SANSmodel*/
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 "sans_model.h"
12
13using namespace std;
14
15class PointsModel : public SANSModel{
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 
31  //given a set of points, calculate distance correlation
32  //function, and return the max dist
33  double DistDistribution(const vector<Point3D>&);
34  void DistDistributionXY(const vector<Point3D>&);
35
36  Array2D<double> GetPr();
37  void OutputPR(const std::string &);
38  void OutputPR_XY(const std::string &);
39
40  virtual int GetPoints(Point3DVector &) = 0;
41  void OutputPDB(const vector<Point3D>&,const char*);
42
43  //will be used in calculating P(r), the maximum distance
44  virtual double GetDimBound() = 0;
45  //will be used to determin the maximum distance for
46  //several pointsmodel instances
47  virtual vector<double> GetCenter();
48
49 protected:
50  double CalculateRstep(int num_points, double rmax);
51  double rmax_, rstep_,cormax_,cormax_xy_;
52  int r_grids_num_;
53  vector<double> center_;
54
55 private:
56  Array2D<double> pr_,pr_xy_;
57  vector<double> product_sld_;
58};
59
60#endif
Note: See TracBrowser for help on using the repository browser.