|
ObjCryst++
1.5CVS
|
Class to display a Powder Pattern (calc,obs) in a graphic window. More...
Public Member Functions | |
| WXPowderPatternGraph (wxFrame *frame, WXPowderPattern *parent) | |
| Constructor. The top frame should have a Status bar with two fields (at least) | |
| void | OnPaint (wxPaintEvent &WXUNUSED(event)) |
| Redraw the spectrum. | |
| void | OnMouse (wxMouseEvent &event) |
| Display the Theta and intensity values at the mouse position, in the status bar. | |
| void | OnMouseWheel (wxMouseEvent &event) |
| Wheel wan be used to scroll the pattern. | |
| void | OnUpdate (wxCommandEvent &WXUNUSED(event)) |
| Update the powder spectrum, at the user's request. | |
| void | SetPattern (const CrystVector_REAL &obs, const CrystVector_REAL &calc, const REAL tthetaMin, const REAL tthetaStep, const CrystVector_REAL &sigma, const CrystVector_REAL &chi2Cumul) |
| Update the pattern. | |
| void | SetPattern (const CrystVector_REAL &x, const CrystVector_REAL &obs, const CrystVector_REAL &calc, const CrystVector_REAL &sigma, const CrystVector_REAL &chi2Cumul) |
| Update the pattern. | |
| void | OnRedrawNewPattern (wxUpdateUIEvent &WXUNUSED(event)) |
| Redraw the pattern (special function to ensure complete redrawing under windows...) | |
| void | OnToggleLabel (wxCommandEvent &WXUNUSED(event)) |
| void | OnFindPeaks (wxCommandEvent &WXUNUSED(event)) |
| void | OnLoadPeaks (wxCommandEvent &WXUNUSED(event)) |
| void | OnSavePeaks (wxCommandEvent &WXUNUSED(event)) |
| void | OnChangePeak (wxCommandEvent &WXUNUSED(event)) |
| Add or remove peak. | |
| void | OnIndex (wxCommandEvent &WXUNUSED(event)) |
| void | OnChangeScale (wxCommandEvent &event) |
| void | OnLeBail (wxCommandEvent &event) |
| Profile fitting & Le Bail intensity extraction. | |
| void | OnKeyDown (wxKeyEvent &event) |
| void | OnSize (wxSizeEvent &event) |
| WXPowderPattern & | GetWXPowderPattern () |
| const WXPowderPattern & | GetWXPowderPattern () const |
Private Member Functions | |
| void | ResetAxisLimits () |
| Reset the limits of the axis to full range. | |
| long | Data2ScreenX (const REAL x) const |
| Convert X data (2theta) coordinate to screen coordinate (pixel) | |
| long | Point2ScreenX (const long x) const |
| Convert X data (as data point index) to screen coordinate (pixel) | |
| long | Data2ScreenY (const REAL y) const |
| Convert Y data (intensity) coordinate to screen coordinate (pixel) | |
| REAL | Screen2DataX (const long x) const |
| Convert X screen coordinate (pixel) to data (2theta) coordinate. | |
| REAL | Screen2DataY (const long y) const |
| Convert Y screen coordinate (pixel) to data (intensity) coordinate. | |
Private Attributes | |
| WXPowderPattern * | mpPattern |
| CrystVector_REAL | mX |
| Data vectors (Note that when x coordinates are 2theta, they are stored in degrees here) | |
| CrystVector_REAL | mObs |
| CrystVector_REAL | mCalc |
| CrystVector_REAL | m2theta |
| CrystVector_REAL | mSigma |
| CrystVector_REAL | mChi2Cumul |
| const long | mMargin |
| const REAL | mDiffPercentShift |
| REAL | mMaxIntensity |
| REAL | mMinIntensity |
| REAL | mMinX |
| REAL | mMaxX |
| wxFrame * | mpParentFrame |
| CrystMutex | mMutex |
| Mutex to lock the pattern and associated data. | |
| wxMenu * | mpPopUpMenu |
| Pop-up menu. | |
| bool | mIsDragging |
| Are we within a dragging event ? | |
| REAL | mDraggingX0 |
| Remember coordinates at the beginning of the dragging. | |
| REAL | mDraggingIntensity0 |
| RefinableObjClock | mClockAxisLimits |
| Clock corresponding to when the graph limits where last changed. | |
| bool | mDisplayLabel |
| Display labels ? | |
| bool | mDisplayPeak |
| Display peaks ? | |
|
list< list< pair< const REAL,const string > > > | mvLabelList |
| The lists of labels for all components of the powder pattern. | |
| PeakList | mPeakList |
| List of observed peak positions. | |
| long | mXScale |
| Scaling options for x and y axis x: 0 data (2theta, tof) ; 1: 1/d ; 2: 2pi/d y: 0 linear ; 1: sqrt(I) ; 2: log10(I) | |
| long | mYScale |
Class to display a Powder Pattern (calc,obs) in a graphic window.
So far only displays calc and obs patterns.
| void ObjCryst::WXPowderPatternGraph::OnUpdate | ( | wxCommandEvent & | WXUNUSEDevent | ) |
Update the powder spectrum, at the user's request.
This calls the WXPowderPattern::CrystUpdate().
| void ObjCryst::WXPowderPatternGraph::SetPattern | ( | const CrystVector_REAL & | obs, |
| const CrystVector_REAL & | calc, | ||
| const REAL | tthetaMin, | ||
| const REAL | tthetaStep, | ||
| const CrystVector_REAL & | sigma, | ||
| const CrystVector_REAL & | chi2Cumul | ||
| ) |
Update the pattern.
This is called by the WXPowderPattern parent.
| void ObjCryst::WXPowderPatternGraph::SetPattern | ( | const CrystVector_REAL & | x, |
| const CrystVector_REAL & | obs, | ||
| const CrystVector_REAL & | calc, | ||
| const CrystVector_REAL & | sigma, | ||
| const CrystVector_REAL & | chi2Cumul | ||
| ) |
Update the pattern.
This is called by the WXPowderPattern parent.
|
private |
Clock corresponding to when the graph limits where last changed.
This is compared to PowderPattern::GetClockPowderPatternPar() to know if these parameter need to be reset.
1.8.1