Skip to content

Commit

Permalink
Update configuration of RTD, add xedocs docs (#1271)
Browse files Browse the repository at this point in the history
* Try to fix bug in RTD

* Fix bug

* Debug

* Fix bug

* Install graphviz to use dot
  • Loading branch information
dachengx committed Sep 29, 2023
1 parent 50b0cda commit 9bf6192
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .readthedocs.yml
Expand Up @@ -7,12 +7,14 @@ sphinx:
configuration: docs/source/conf.py

build:
image: latest
os: ubuntu-22.04
apt_packages:
- graphviz
tools:
python: "3.8"

python:
version: "3.8"
install:
- requirements: extra_requirements/requirements-tests.txt
- method: pip
path: .
extra_requirements:
Expand All @@ -21,5 +23,5 @@ python:
path: .

formats:
- pdf
- htmlzip
- epub
2 changes: 1 addition & 1 deletion docs/make_docs.sh
Expand Up @@ -3,4 +3,4 @@ make clean
rm -r source/reference
sphinx-apidoc -o source/reference ../straxen
rm source/reference/modules.rst
make html
make html #SPHINXOPTS="-W --keep-going -n"
1 change: 1 addition & 0 deletions docs/source/index.rst
Expand Up @@ -36,6 +36,7 @@ Straxen is the analysis framework for XENONnT, built on top of the generic `stra

config_storage
online_monitor
xedocs_configs
cmt
context_configs
url_configs
Expand Down
1 change: 1 addition & 0 deletions docs/source/tutorials/mini_analyses.md
Expand Up @@ -40,6 +40,7 @@ Besides the data kinds (`records` and `peaks` in the example above), a mini-anal
* time_range: (start, stop) time in ns since the epoch of the selected data interval
* time_selection: kind of time selection used (fully_contained, touching, or skip)


Your analysis will always get these arguments (if you add them to your function), even if the user does not pass them. For time_range, you will get the absolute time in ns even if the user uses one of the other time arguments (such as seconds_range). If no time_range is passed by the user, you will get the time range of the full run. If run metadata is not available, this will be estimated from the data that is passed in / loaded (and if that is empty, you will get (NaN, Nan)).

If your analysis takes any other arguments, they must be keyword arguments. For example, `plot_pmt_pattern` takes an extra `array` argument:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/xedocs_configs.rst
@@ -1,7 +1,7 @@
Xedocs context configs
======================

The xedocs package manages a versioned collection of context configs.
The `xedocs <https://github.com/XENONnT/xedocs>`_ package manages a versioned collection of context configs.
This is useful for applying a predefined set of configs to the context in a reproducible way.
Straxen registers a context method `context.apply_xedocs_configs` which can be used to load and apply
the configs from a given version. Example:
Expand Down
1 change: 0 additions & 1 deletion straxen/legacy/contexts_1t.py
Expand Up @@ -77,7 +77,6 @@ def get_x1t_context_config():
rel_light_yield=1.0,
s1_xyz_map=f'itp_map://resource://{pax_file("XENON1T_s1_xyz_lce_true_kr83m_SR1_pax-680_fdc-3d_v0.json")}?fmt=json', # noqa
s2_xy_map=f'itp_map://resource://{pax_file("XENON1T_s2_xy_ly_SR1_v2.2.json")}?fmt=json',
s1_aft_map=f'itp_map://resource://{aux_repo + "023cb8caf2008b289664b0fefc36b1cebb45bbe4/strax_files/s1_aft_UNITY_xyz_XENONnT.json"}?fmt=json', # noqa
g1=0.1426,
g2=11.55 / (1 - 0.63),
)
Expand Down

0 comments on commit 9bf6192

Please sign in to comment.