Skip to content
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

move some docs from L200 #4

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,47 @@
Welcome to legendtools's documentation!
==========================================

Registering detectors for use with `remage`_
-----------------------------------------------

On a physical volume instance, you can attach a ``pygeom_active_dector``, e.g.

.. code:: python

from pygeomtools import detectors

pv = g4.PhysicalVolume(...)

# attach an active detector to this physical volume.
lv.pygeom_active_dector = detectors.RemageDetectorInfo(
"optical", # detector type. The available options are defined by remage.
1, # detector id in remage.
{"some": "metadata"}, # user-defined data (optional) that is stored into GDML.
)


Adjusting the visualization
---------------------------

On a logical volume instance, you can set ``pygeom_color_rgba``, e.g.

.. code:: python

lv = g4.LogicalVolume(...)

# hide this volume in the visualization
lv.pygeom_color_rgba = False

# set the vis coloring to the given RGBA value. All 4 numbers should be given in the range 0–1.
lv.pygeom_color_rgba = (r, g, b, a)


Table of Contents
-----------------

.. toctree::
:maxdepth: 1

Package API reference <api/modules>

.. _remage: https://github.com/legend-exp/remage