14 lines
20 KiB
HTML
14 lines
20 KiB
HTML
<!DOCTYPE html> <html lang=en data-content_root="../../"> <meta charset=utf-8 /> <meta name=viewport content="width=device-width, initial-scale=1.0" /><meta name=viewport content="width=device-width, initial-scale=1" /> <meta name=viewport content="width=device-width,initial-scale=1"> <meta http-equiv=x-ua-compatible content="ie=edge"> <meta name="lang:clipboard.copy" content="Copy to clipboard"> <meta name="lang:clipboard.copied" content="Copied to clipboard"> <meta name="lang:search.language" content=en > <meta name="lang:search.pipeline.stopwords" content=True > <meta name="lang:search.pipeline.trimmer" content=True > <meta name="lang:search.result.none" content="No matching documents"> <meta name="lang:search.result.one" content="1 matching document"> <meta name="lang:search.result.other" content="# matching documents"> <meta name="lang:search.tokenizer" content="[\s\-]+"> <link href="https://fonts.gstatic.com/" rel=preconnect crossorigin> <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500,700|Roboto:300,400,400i,700&display=fallback" rel=stylesheet > <style> body, input { font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif } code, kbd, pre { font-family: "Roboto Mono", "Courier New", Courier, monospace } </style> <link rel=stylesheet href="../../_static/stylesheets/application.css"/> <link rel=stylesheet href="../../_static/stylesheets/application-palette.css"/> <link rel=stylesheet href="../../_static/stylesheets/application-fixes.css"/> <link rel=stylesheet href="../../_static/fonts/material-icons.css"/> <meta name=theme-color content="#3f51b5"> <script src="../../_static/javascripts/modernizr.js"></script> <title>DetectorModulePlacement — Jungfraujoch 1.0.0-rc.186 documentation</title> <link rel=stylesheet type="text/css" href="../../_static/pygments.css?v=83e35b93" /> <link rel=stylesheet type="text/css" href="../../_static/material.css?v=79c92029" /> <link rel=stylesheet type="text/css" href="../../_static/jfjoch.css?v=bb6ed8b7" /> <script src="../../_static/documentation_options.js?v=dbce4c6c"></script> <script src="../../_static/doctools.js?v=9bcbadda"></script> <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> <script src="../../_static/jfjoch_downloads.js?v=9e84fe5a"></script> <link rel=icon href="../../_static/jfjoch.png"/> <link rel=index title=Index href="../../genindex.html" /> <link rel=search title=Search href="../../search.html" /> <link rel=next title=DetectorPowerState href=DetectorPowerState.html /> <link rel=prev title=DetectorModuleDirection href=DetectorModuleDirection.html /> <body dir=ltr data-md-color-primary=indigo data-md-color-accent=lime> <svg class=md-svg > <defs data-children-count=0 > <svg xmlns="http://www.w3.org/2000/svg" width=500 height=500 viewBox="0 0 500 500" id=__gitlab ><path fill=currentColor d="M93.667 473.347l90.684-279.097H2.983l90.684 279.097z" transform="translate(156.198 1.16)"/><path fill=currentColor d="M221.333 473.345L130.649 194.25H3.557l217.776 279.095z" transform="translate(28.531 1.16)" opacity=.7 /><path fill=currentColor d="M32 195.155L4.441 279.97a18.773 18.773 0 0 0 6.821 20.99l238.514 173.29L32 195.155z" transform="translate(.089 .256)" opacity=.5 /><path fill=currentColor d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856 0L2.667-84.844z" transform="translate(29.422 280.256)"/><path fill=currentColor d="M2.667 473.345L93.351 194.25h127.092L2.667 473.345z" transform="translate(247.198 1.16)" opacity=.7 /><path fill=currentColor d="M221.334 195.155l27.559 84.815a18.772 18.772 0 0 1-6.821 20.99L3.557 474.25l217.777-279.095z" transform="translate(246.307 .256)" opacity=.5 /><path fill=currentColor d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649 15.047-8.649 17.856 0l54.618 168.098z" transform="translate(336.974 280.256)"/></svg> </defs> </svg> <input class=md-toggle data-md-toggle=drawer type=checkbox id=__drawer > <input class=md-toggle data-md-toggle=search type=checkbox id=__search > <label class=md-overlay data-md-component=overlay for=__drawer ></label> <a href="#python_client/docs/DetectorModulePlacement" tabindex=1 class=md-skip > Skip to content </a> <header class=md-header data-md-component=header > <nav class="md-header-nav md-grid"> <div class="md-flex navheader"> <div class="md-flex__cell md-flex__cell--shrink"> <a href="../../documentation.html" title="Jungfraujoch 1.0.0-rc.186 documentation" class="md-header-nav__button md-logo"> <i class=md-icon ></i> </a> </div> <div class="md-flex__cell md-flex__cell--shrink"> <label class="md-icon md-icon--menu md-header-nav__button" for=__drawer ></label> </div> <div class="md-flex__cell md-flex__cell--stretch"> <div class="md-flex__ellipsis md-header-nav__title" data-md-component=title > <span class=md-header-nav__topic >PSI Jungfraujoch</span> <span class=md-header-nav__topic > DetectorModulePlacement </span> </div> </div> <div class="md-flex__cell md-flex__cell--shrink"> <label class="md-icon md-icon--search md-header-nav__button" for=__search ></label> <div class=md-search data-md-component=search role=dialog > <label class=md-search__overlay for=__search ></label> <div class=md-search__inner role=search > <form class=md-search__form action="../../search.html" method=get name=search > <input type=text class=md-search__input name=q placeholder=""Search"" autocapitalize=off autocomplete=off spellcheck=false data-md-component=query data-md-state=active > <label class="md-icon md-search__icon" for=__search ></label> <button type=reset class="md-icon md-search__icon" data-md-component=reset tabindex=-1 >  </button> </form> <div class=md-search__output > <div class=md-search__scrollwrap data-md-scrollfix> <div class=md-search-result data-md-component=result > <div class=md-search-result__meta > Type to start searching </div> <ol class=md-search-result__list ></ol> </div> </div> </div> </div> </div> </div> <div class="md-flex__cell md-flex__cell--shrink"> <div class=md-header-nav__source > <a href="https://gitea.psi.ch/mx/jungfraujoch" title="Go to repository" class=md-source data-md-source=github > <div class=md-source__icon > <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width=28 height=28 > <use xlink:href="#__gitlab" width=24 height=24 ></use> </svg> </div> <div class=md-source__repository > Jungfraujoch </div> </a> </div> </div> <script src="../../_static/javascripts/version_dropdown.js"></script> <script> var json_loc = "../../"versions.json"", target_loc = "../../../", text = "Versions"; $( document ).ready( add_version_dropdown(json_loc, target_loc, text)); </script> </div> </nav> </header> <div class=md-container > <nav class=md-tabs data-md-component=tabs > <div class="md-tabs__inner md-grid"> <ul class=md-tabs__list > <li class=md-tabs__item ><a href="../../documentation.html" class=md-tabs__link >Jungfraujoch 1.0.0-rc.186 documentation</a> <li class=md-tabs__item ><a href="../../PYTHON_CLIENT.html" class=md-tabs__link >OpenAPI Python client</a> </ul> </div> </nav> <main class=md-main > <div class="md-main__inner md-grid" data-md-component=container > <div class="md-sidebar md-sidebar--primary" data-md-component=navigation > <div class=md-sidebar__scrollwrap > <div class=md-sidebar__inner > <nav class="md-nav md-nav--primary" data-md-level=0 > <label class="md-nav__title md-nav__title--site" for=__drawer > <a href="../../documentation.html" title="Jungfraujoch 1.0.0-rc.186 documentation" class="md-nav__button md-logo"> <i class=md-icon ></i> </a> <a href="../../documentation.html" title="Jungfraujoch 1.0.0-rc.186 documentation">PSI Jungfraujoch</a> </label> <div class=md-nav__source > <a href="https://gitea.psi.ch/mx/jungfraujoch" title="Go to repository" class=md-source data-md-source=github > <div class=md-source__icon > <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width=28 height=28 > <use xlink:href="#__gitlab" width=24 height=24 ></use> </svg> </div> <div class=md-source__repository > Jungfraujoch </div> </a> </div> <ul class=md-nav__list > <li class=md-nav__item > <span class="md-nav__link caption"><span class=caption-text >Rugnux</span></span> <li class=md-nav__item > <a href="../../RUGNUX.html" class=md-nav__link >Getting started</a> <li class=md-nav__item > <a href="../../RUGNUX_DOWNLOAD.html" class=md-nav__link >Download</a> <li class=md-nav__item > <a href="../../RUGNUX_OVERVIEW.html" class=md-nav__link >Overview</a> <li class=md-nav__item > <a href="../../RUGNUX_INSTALL.html" class=md-nav__link >Installing Rugnux</a> <li class=md-nav__item > <a href="../../RUGNUX_FORMATS.html" class=md-nav__link >Input formats</a> <li class=md-nav__item > <a href="../../RUGNUX_TUTORIAL.html" class=md-nav__link >Running Rugnux</a> <li class=md-nav__item > <a href="../../RUGNUX_CLI.html" class=md-nav__link >Command-line options</a> <li class=md-nav__item > <a href="../../RUGNUX_REPORT.html" class=md-nav__link >The results report</a> <li class=md-nav__item > <a href="../../RUGNUX_INTEGRATION.html" class=md-nav__link >Rugnux with other programs</a> <li class=md-nav__item > <a href="../../RUGNUX_ADVANCED.html" class=md-nav__link >Advanced Rugnux</a> <li class=md-nav__item > <a href="../../RUGNUX_MODEL_AND_REFERENCE.html" class=md-nav__link >Models and reference data</a> <li class=md-nav__item > <a href="../../RUGNUX_CALIBRATION.html" class=md-nav__link >Detector calibration</a> <li class=md-nav__item > <span class="md-nav__link caption"><span class=caption-text >Jungfraujoch Viewer</span></span> <li class=md-nav__item > <a href="../../JFJOCH_VIEWER.html" class=md-nav__link >Using the viewer</a> <li class=md-nav__item > <a href="../../VIEWER_DOWNLOAD.html" class=md-nav__link >Download</a> <li class=md-nav__item > <span class="md-nav__link caption"><span class=caption-text >Jungfraujoch</span></span> <li class=md-nav__item > <a href="../../JUNGFRAUJOCH.html" class=md-nav__link >Overview</a> <li class=md-nav__item > <a href="../../DEPLOYMENT.html" class=md-nav__link >Deployment</a> <li class=md-nav__item > <a href="../../REPOSITORIES.html" class=md-nav__link >Linux package repositories</a> <li class=md-nav__item > <a href="../../RELEASE_CONTENTS.html" class=md-nav__link >Release contents</a> <li class=md-nav__item > <a href="../../JFJOCH_BROKER.html" class=md-nav__link >jfjoch_broker</a> <li class=md-nav__item > <a href="../../JFJOCH_WRITER.html" class=md-nav__link >jfjoch_writer</a> <li class=md-nav__item > <a href="../../WEB_FRONTEND.html" class=md-nav__link >Web frontend</a> <li class=md-nav__item > <a href="../../SOFTWARE_INTEGRATION.html" class=md-nav__link >MX software integration</a> <li class=md-nav__item > <a href="../../TOOLS.html" class=md-nav__link >Tools</a> <li class=md-nav__item > <a href="../../PYTHON_CLIENT.html" class=md-nav__link >Python client</a> <li class=md-nav__item > <span class="md-nav__link caption"><span class=caption-text >Reference</span></span> <li class=md-nav__item > <a href="../../TECHNICAL.html" class=md-nav__link >Technical reference</a> <li class=md-nav__item > <span class="md-nav__link caption"><span class=caption-text >Project</span></span> <li class=md-nav__item > <a href="../../PUBLICATIONS.html" class=md-nav__link >Publications</a> <li class=md-nav__item > <a href="../../ACKNOWLEDGEMENT.html" class=md-nav__link >Acknowledgements</a> <li class=md-nav__item > <a href="../../LICENSE.html" class=md-nav__link >License</a> <li class=md-nav__item > <a href="../../THIRD_PARTY_NOTICES.html" class=md-nav__link >Third-party software notices</a> <li class=md-nav__item > <a href="../../NAMING.html" class=md-nav__link >Naming</a> <li class=md-nav__item > <a href="../../CHANGELOG.html" class=md-nav__link >Changelog</a> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component=toc > <div class=md-sidebar__scrollwrap > <div class=md-sidebar__inner > <nav class="md-nav md-nav--secondary"> <ul class=md-nav__list data-md-scrollfix=""> </ul> </nav> </div> </div> </div> <div class=md-content > <article class="md-content__inner md-typeset" role=main > <section class="tex2jax_ignore mathjax_ignore" id=detectormoduleplacement > <h1 id=python-client-docs-detectormoduleplacement--page-root >DetectorModulePlacement<a class=headerlink href="#python-client-docs-detectormoduleplacement--page-root" title="Link to this heading">¶</a></h1> <p>One module of the image and where it lies on the detector plane, as rugnux measures it. Frame: <code class="docutils literal notranslate"><span class=pre >custom_geometry</span></code> is BEFORE <code class="docutils literal notranslate"><span class=pre >mirror_y</span></code> (the image as assembled from the readout); <code class="docutils literal notranslate"><span class=pre >module_placement</span></code> is AFTER <code class="docutils literal notranslate"><span class=pre >mirror_y</span></code> (the image as stored, the only one a file reader sees). Same words in both: <code class="docutils literal notranslate"><span class=pre >x0</span></code>/<code class="docutils literal notranslate"><span class=pre >y0</span></code> is the image position of the module’s readout pixel 0 and <code class="docutils literal notranslate"><span class=pre >fast_axis</span></code>/<code class="docutils literal notranslate"><span class=pre >slow_axis</span></code> say which way its fast and slow readout axes run in the image. With <code class="docutils literal notranslate"><span class=pre >mirror_y</span></code> on, a module’s entry differs between the two by the mirror: for an image of height H, y0 (module_placement) = H - 1 - y0 (custom_geometry), x0 is the same, and Yp and Yn swap in fast_axis/slow_axis. With <code class="docutils literal notranslate"><span class=pre >mirror_y</span></code> off they are equal. <code class="docutils literal notranslate"><span class=pre >x0</span></code>, <code class="docutils literal notranslate"><span class=pre >y0</span></code>, <code class="docutils literal notranslate"><span class=pre >fast_axis</span></code> and <code class="docutils literal notranslate"><span class=pre >slow_axis</span></code> identify the module, whatever the order of the entries, and with the module size they give its box in the image. The plane is in image pixels (a pixel’s centre at its index): readout pixel (i, j) - i along the fast axis, j along the slow axis from pixel 0 - lies on it at (x0_plane, y0_plane) + i fast_step + j slow_step. As assembled: x0_plane = x0, y0_plane = y0, and each step is the unit vector of its axis (Xp = [1, 0], Xn = [-1, 0], Yp = [0, 1], Yn = [0, -1]).</p> <section id=properties > <h2 id=properties >Properties<a class=headerlink href="#properties" title="Link to this heading">¶</a></h2> <table> <thead> <tr class=row-odd ><th class=head ><p>Name</p> <th class=head ><p>Type</p> <th class=head ><p>Description</p> <th class=head ><p>Notes</p> <tr class=row-even ><td><p><strong>x0</strong></p> <td><p><strong>int</strong></p> <td><p>Image x of the module’s readout pixel 0, after mirror_y</p> <td><p></p> <tr class=row-odd ><td><p><strong>y0</strong></p> <td><p><strong>int</strong></p> <td><p>Image y of the module’s readout pixel 0, after mirror_y</p> <td><p></p> <tr class=row-even ><td><p><strong>fast_axis</strong></p> <td><p><a class="reference internal" href=DetectorModuleDirection.html ><span class="std std-doc"><strong>DetectorModuleDirection</strong></span></a></p> <td><p></p> <td><p></p> <tr class=row-odd ><td><p><strong>slow_axis</strong></p> <td><p><a class="reference internal" href=DetectorModuleDirection.html ><span class="std std-doc"><strong>DetectorModuleDirection</strong></span></a></p> <td><p></p> <td><p></p> <tr class=row-even ><td><p><strong>x0_plane</strong></p> <td><p><strong>float</strong></p> <td><p>Plane x of readout pixel 0, in image pixels</p> <td><p></p> <tr class=row-odd ><td><p><strong>y0_plane</strong></p> <td><p><strong>float</strong></p> <td><p>Plane y of readout pixel 0, in image pixels</p> <td><p></p> <tr class=row-even ><td><p><strong>fast_step</strong></p> <td><p><strong>List[float]</strong></p> <td><p>Plane displacement (x, y) for one pixel along the fast readout axis</p> <td><p></p> <tr class=row-odd ><td><p><strong>slow_step</strong></p> <td><p><strong>List[float]</strong></p> <td><p>Plane displacement (x, y) for one pixel along the slow readout axis</p> <td><p></p> </table> </section> <section id=example > <h2 id=example >Example<a class=headerlink href="#example" title="Link to this heading">¶</a></h2> <div class="highlight-python notranslate"><div class=highlight ><pre><span></span><span class=kn >from</span> <span class=nn >jfjoch_client.models.detector_module_placement</span> <span class=kn >import</span> <span class=n >DetectorModulePlacement</span>
|
|
|
|
<span class=c1 ># TODO update the JSON string below</span>
|
|
<span class=n >json</span> <span class=o >=</span> <span class=s2 >"</span><span class=si >{}</span><span class=s2 >"</span>
|
|
<span class=c1 ># create an instance of DetectorModulePlacement from a JSON string</span>
|
|
<span class=n >detector_module_placement_instance</span> <span class=o >=</span> <span class=n >DetectorModulePlacement</span><span class=o >.</span><span class=n >from_json</span><span class=p >(</span><span class=n >json</span><span class=p >)</span>
|
|
<span class=c1 ># print the JSON string representation of the object</span>
|
|
<span class=nb >print</span><span class=p >(</span><span class=n >DetectorModulePlacement</span><span class=o >.</span><span class=n >to_json</span><span class=p >())</span>
|
|
|
|
<span class=c1 ># convert the object into a dict</span>
|
|
<span class=n >detector_module_placement_dict</span> <span class=o >=</span> <span class=n >detector_module_placement_instance</span><span class=o >.</span><span class=n >to_dict</span><span class=p >()</span>
|
|
<span class=c1 ># create an instance of DetectorModulePlacement from a dict</span>
|
|
<span class=n >detector_module_placement_from_dict</span> <span class=o >=</span> <span class=n >DetectorModulePlacement</span><span class=o >.</span><span class=n >from_dict</span><span class=p >(</span><span class=n >detector_module_placement_dict</span><span class=p >)</span>
|
|
</pre></div> </div> <p><a class="reference internal" href="../README.html#documentation-for-models"><span class="std std-ref">[Back to Model list]</span></a> <a class="reference internal" href="../README.html#documentation-for-api-endpoints"><span class="std std-ref">[Back to API list]</span></a> <a class="reference internal" href="../README.html"><span class="std std-doc">[Back to README]</span></a></p> </section> </section> </article> </div> </div> </main> </div> <footer class=md-footer > <div class=md-footer-nav > <nav class="md-footer-nav__inner md-grid"> <a href=DetectorModuleDirection.html title=DetectorModuleDirection class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel=prev > <div class="md-flex__cell md-flex__cell--shrink"> <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i> </div> <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title"> <span class=md-flex__ellipsis > <span class=md-footer-nav__direction > "Previous" </span> DetectorModuleDirection </span> </div> </a> <a href=DetectorPowerState.html title=DetectorPowerState class="md-flex md-footer-nav__link md-footer-nav__link--next" rel=next > <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title"><span class=md-flex__ellipsis > <span class=md-footer-nav__direction > "Next" </span> DetectorPowerState </span> </div> <div class="md-flex__cell md-flex__cell--shrink"><i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i> </div> </a> </nav> </div> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright > <div class=md-footer-copyright__highlight > © Copyright 2024, Paul Scherrer Institute. </div> Created using <a href="http://www.sphinx-doc.org/">Sphinx</a> 8.1.3. and <a href="https://github.com/bashtage/sphinx-material/">Material for Sphinx</a> </div> </div> </div> </footer> <script src="../../_static/javascripts/application.js"></script> <script>app.initialize({version: "1.0.4", url: {base: ".."}})</script> |