-
Notifications
You must be signed in to change notification settings - Fork 13
Issue202 spectro x2 d crystal #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
860996b
[Issue202] Improved CrystBragg docstrings for get_approx_detector_fra…
87899e8
[Issue202] Renamed CrystBragg.get_approx_detect() and started introdu…
efbf5ff
[Issue202] Advanced approx_detect() with di, dj, tilt add vertical su…
413be47
[Issue202] Added vertsum1d to CrystBragg.plot_data_vs_philamb(), tuna…
c472511
Merge remote-tracking branch 'origin/devel' into Issue202_SpectroX2DC…
7b9be6c
[Issue202] Computing cone intersection with circle too cumbersome => …
072d163
[Issue202] Added magnetic axis to plot => investigate rhotn transform ?
b6ed4fc
[Issue202] CrystBragg.calc_johannerror() operational with plot, but D…
9ce7828
[Issue202] Fixed tanget_to_rowland, and more informative exception me…
063c165
[Issue202] Plotted images for ITER PDR, implemented tit / wintit in C…
ebe97e3
[Issue202] Added rockingcurve to dbragg and plot_rockingcurve() to be…
fb0ea5e
[Issue202] Added get_rockingcurve_func(), TODO: add possibility of ta…
5fe6eee
[Issue202] Rocking curve more elaborate, now allows for tabulated dat…
dfd2011
[Issue202] Added input files for tests and develeping, to be deleted …
ebc5fa7
Merge branch 'devel' into Issue202_SpectroX2DCrystal
7d3011e
[Issue202] CrystBragg.get_summary() now displays rocking curve type
f44434f
[Issue202] Both tabulated-1d and 2d rocking curves possible, finish p…
b2beda9
[Issue202] Johann error now also visible with plot_line_tracing() for…
c751117
[Issue202] Corrected lack of recurrence of self.to_dict(sep=...) in t…
b0dac67
[Issue202] imas2tofu more robust vs Config saving and loading to/from…
e6b26cc
[Issue202] save(mode='mat') default to sep='_'
e1f9f11
[Issue202] Advanced calc_from_pts (phibragg, line projection...), TBF
202c2cf
[Issue202] Continued calc_phibragg_from_pts(), updating related metho…
6ffce17
[Issue202] Minor changes for better robustness in tofu/geom/_core.py …
39b1a00
[Issue202] PEP8 Compliance 1
29de9d5
[Issue202] PEP8 Compliance 2
b5d9193
[Issue202] PEP8 Compliance 3
ac0016b
[Issue202] PEP8 Compliance 4
c31f86b
[Issue202] PEP8 Compliance 5
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
133 changes: 133 additions & 0 deletions
133
Notes_Upgrades/SpectroX2D/SpectroX2D_ConeCircleMagAxis.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| \documentclass[a4paper,11pt,twoside,titlepage,openright]{book} | ||
|
|
||
| \usepackage[english]{babel} | ||
| \usepackage{color} | ||
| \usepackage{graphicx} | ||
| \usepackage{amsmath} | ||
| \numberwithin{equation}{section} | ||
| \usepackage[margin=3cm]{geometry} | ||
| \usepackage{hyperref} | ||
| \usepackage{epsfig,amsfonts} | ||
| \usepackage{xcolor,import} | ||
|
|
||
|
|
||
| \pagestyle{plain} | ||
|
|
||
| \newcommand{\ud}[1]{\underline{#1}} | ||
| \newcommand{\e}[1]{\underline{e}_{#1}} | ||
| \newcommand{\lt}{\left} | ||
| \newcommand{\rt}{\right} | ||
| \newcommand{\lra}{\Leftrightarrow} | ||
| \DeclareMathOperator{\n}{\underline{n}} | ||
| \DeclareMathOperator{\ex}{\underline{e}_x} | ||
| \DeclareMathOperator{\ey}{\underline{e}_y} | ||
| \DeclareMathOperator{\ez}{\underline{e}_z} | ||
| \DeclareMathOperator{\bragg}{\theta_{bragg}} | ||
| \DeclareMathOperator{\Z}{Z_C} | ||
| \DeclareMathOperator{\DD}{\cos(\theta)^2 - \sin(\psi)^2} | ||
| \newcommand{\wdg}{\wedge} | ||
| \newcommand{\hypot}[1]{\textbf{\textcolor{green}{#1}}} | ||
|
|
||
|
|
||
| \begin{document} | ||
|
|
||
| \title{ToFu geometric tools\\ Intersection of a cone with a circle (magnetic axis)} | ||
| \author{Didier VEZINET} | ||
| \date{04.12.2019} | ||
| \maketitle | ||
|
|
||
| \tableofcontents | ||
|
|
||
| \chapter{Geometry} | ||
| \label{chap:Geometry} | ||
|
|
||
| \section{Generic cone and plane} | ||
|
|
||
| Let's consider a cartesian frame $(O, \ex, \ey, \ez)$. | ||
| Let's consider a half-cone defined by its axis $(S, \n)$ and half-opening $\alpha = \pi/2 - \bragg$. | ||
| The coordinates of $S$ are $(x_S, y_S, z_S)$. | ||
| The coordinates of $\n$ are $(n_x, n_y, n_z)$. | ||
| Let's consider a circle of axis $(O, \ez)$, of radius $R$, centered on $C$ or coordinates $(0, 0, \Z)$. | ||
|
|
||
| Let's consider point $M$ of coordinates $(x, y, z)$ and $(R, \theta, z)$ belonging to both the cone and the circle. | ||
|
|
||
|
|
||
| $$ | ||
| \lt\{ | ||
| \begin{array}{ll} | ||
| M \in circle & \lra \ud{OM} = \Z\ez + R(\cos(\theta)\ex + \sin(\theta)\ey)\\ | ||
| M \in cone & \lra \ud{SM}.\n = \cos(\alpha)\|\ud{SM}\| | ||
| \end{array} | ||
| \rt. | ||
| $$ | ||
|
|
||
|
|
||
|
|
||
| \section{Intersection} | ||
|
|
||
| If $M$ belongs to both the circle and the cone, then: | ||
|
|
||
| $$ | ||
| \begin{array}{ll} | ||
| & \lt[\lt(\ud{SO}+\ud{OM}\rt).\n\rt]^2 = \cos^2(\alpha)\|\ud{SO} + \ud{OM}\|^2\\ | ||
| \lra & | ||
| \lt(\ud{SO}.\n\rt)^2 + \lt(\ud{OM}.\n\rt)^2 + 2\lt(\ud{SO}.\n\rt)\lt(\ud{OM}.\n\rt) | ||
| = \cos^2(\alpha)\lt[\|\ud{SO}\|^2 + \|\ud{OM}\|^2 + 2\ud{SO}.\ud{OM}\rt]\\ | ||
| \lra & | ||
| \lt(\ud{OM}.\n\rt)^2 + 2\lt(\ud{SO}.\n\rt)\lt(\ud{OM}.\n\rt) | ||
| - \cos^2(\alpha)\|\ud{OM}\|^2 - 2\cos^2(\alpha)\ud{SO}.\ud{OM} + A = 0 | ||
| \end{array} | ||
| $$ | ||
|
|
||
| Where we have introduced $A = \lt(\ud{SO}.\n\rt)^2 - \cos^2(\alpha)\|\ud{SO}\|^2$ | ||
|
|
||
| Now, we can write: | ||
| $$ | ||
| \lt\{ | ||
| \begin{array}{lll} | ||
| \|\ud{OM}\|^2 & = & \Z^2 + R^2\\ | ||
| \ud{OM}.\n & = & \Z n_z + R\cos(\theta)n_x + R\sin(\theta)n_y\\ | ||
| \lt(\ud{OM}.\n\rt)^2 & = & \lt(\Z n_z\rt)^2 + \lt(R\cos(\theta)n_x\rt)^2 + \lt(R\sin(\theta)n_y\rt)^2\\ | ||
| && + 2\Z R\cos(\theta)n_xn_Z + 2\Z R\sin(\theta)n_yn_z + 2R^2\cos(\theta)\sin(\theta)n_xn_y\\ | ||
| \ud{SO}.\ud{OM} & = & -\Z z_S - Rx_S\cos(\theta) - Ry_S\sin(\theta) | ||
| \end{array} | ||
| \rt. | ||
| $$ | ||
|
|
||
| Hence: | ||
| $$ | ||
| \begin{array}{ll} | ||
| & \lt(\ud{OM}.\n\rt)^2 + 2\lt(\ud{SO}.\n\rt)\lt(\ud{OM}.\n\rt) | ||
| - \cos^2(\alpha)\|\ud{OM}\|^2 - 2\cos^2(\alpha)\ud{SO}.\ud{OM} + A\\ | ||
| = & | ||
| \lt(\Z n_z\rt)^2 + \lt(R\cos(\theta)n_x\rt)^2 + \lt(R\sin(\theta)n_y\rt)^2\\ | ||
| & + 2\Z R\cos(\theta)n_xn_Z + 2\Z R\sin(\theta)n_yn_z + 2R^2\cos(\theta)\sin(\theta)n_xn_y\\ | ||
| & +2\lt(\ud{SO}.\n\rt)\lt(\Z n_z + R\cos(\theta)n_x + R\sin(\theta)n_y\rt)\\ | ||
| & - \cos^2(\alpha)\Z^2 - \cos^2(\alpha)R^2\\ | ||
| & + 2\cos^2(\alpha)\lt(\Z z_S + Rx_S\cos(\theta) + Ry_S\sin(\theta)\rt) + A | ||
| \end{array} | ||
| $$ | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| \section{Parametric equation} | ||
|
|
||
| \subsection{From bragg angle and parameter to local cartesian coordinates} | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| \appendix | ||
| \chapter{Appendices} | ||
|
|
||
| \section{Section} | ||
| \subsection{Subsection} | ||
|
|
||
| \end{document} |
Binary file added
BIN
+46.2 KB
TFG_CrystalBragg_ExpWEST_DgXICS_ArXVII_sh00000_Vers1.4.1-174-g453d6a3.npz
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change to _core.py is just adding a safeguard (making it more robust with respect to ill-defined input from users)