Skip to content

Commit

Permalink
docs: fix warnings (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhasself authored Jan 29, 2025
1 parent 3419cc6 commit 6dba368
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 37 deletions.
12 changes: 5 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = {'.rst': 'restructuredtext'}

# The master toctree document.
master_doc = 'index'
Expand All @@ -88,7 +85,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -137,7 +134,8 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#
# html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down Expand Up @@ -230,7 +228,7 @@
# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}

# -- Options for todo extension ----------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/hk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ The tool can run the following analyses:
See more details below. Please note that when presenting provider and
field names, the program strips out tokens ``observatory`` and
``feeds``, by default (for example, ``observatory.DRptc1.feeds.ptc_status``
becomes ``DRptc1.ptc_status``). Pass ``--strip-tokens=""` to instead
becomes ``DRptc1.ptc_status``). Pass ``--strip-tokens=""`` to instead
show the full provider / feed names.

.. argparse::
Expand Down
68 changes: 39 additions & 29 deletions python/proj/coords.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,18 +256,23 @@ def __init__(self, quats=None, resps=None, dets=None):
"""Construct a FocalPlane from detector quaternions and responsivities.
Arguments:
quats: Detector quaternions. Either:
* An array-like of floats with shape [ndet,4]
* An array-like of so3g.proj.quat.quat with shape [ndet]
* An so3g.proj.quat.G3VectorQuat
* None, which results in an empty focalplane with no detectors
resps: Detector responsivities. Either:
* An array-like of floats with shape [ndet,2], where the first and
second number in the last axis are the total intensity and
polarization response respectively
* None, which results in a T and P response of 1 for all detectors.
dets: Deprecated argument temporarily present for backwards
compatibility."""
quats:
Detector quaternions. Either:
* An array-like of floats with shape [ndet,4]
* An array-like of so3g.proj.quat.quat with shape [ndet]
* An so3g.proj.quat.G3VectorQuat
* None, which results in an empty focalplane with no detectors
resps:
Detector responsivities. Either:
* An array-like of floats with shape [ndet,2], where the first and
second number in the last axis are the total intensity and
polarization response respectively
* None, which results in a T and P response of 1 for all detectors.
dets:
Deprecated argument temporarily present for backwards
compatibility.
"""
# Building them this way ensures that
# quats will be an quat coeff array-2 and resps will be a numpy
# array with the right shape, so we don't need to check
Expand Down Expand Up @@ -327,26 +332,31 @@ def from_xieta(cls, *args, **kwargs):
So there are two ways to specify the polarization angle and
responsivity:
1. gamma and P
2. Q and U
Examples, assuming ndet = 2
* ``from_xieta(xi, eta, gamma=[0,pi/4])``
Constructs a FocalPlane with T and P responsivity of 1
and polarization angles of 0 and 45 degrees, representing
a Q-sensitive and U-sensitive detector.
* ``from_xieta(xi, eta, gamma=[0,pi/4], P=0.5)``
Like the above, but with a polarization responsivity of
just 0.5.
* ``from_xieta(xi, eta, gamma=[0,pi/4], T=[1,0.9], P=[0.5,0.6])``
Like above, but with a detector-dependent intensity and
polarization responsivity. There is no restriction that
T > P. For the pseudo-detector timestreams one gets after
HWP demodulation, one would have T=0 for the cos-modulated
and sin-modulated timestreams, for example.
* ``from_xieta(xi, eta, Q=[1,0], U=[0,1])``
Construct the FocalPlane with explicit Q and U responsivity.
This example is equivalent to example 1.
Examples, assuming ndet = 2:
``from_xieta(xi, eta, gamma=[0,pi/4])``
Constructs a FocalPlane with T and P responsivity of 1
and polarization angles of 0 and 45 degrees, representing
a Q-sensitive and U-sensitive detector.
``from_xieta(xi, eta, gamma=[0,pi/4], P=0.5)``
Like the above, but with a polarization responsivity of
just 0.5.
``from_xieta(xi, eta, gamma=[0,pi/4], T=[1,0.9], P=[0.5,0.6])``
Like above, but with a detector-dependent intensity and
polarization responsivity. There is no restriction that
T > P. For the pseudo-detector timestreams one gets after
HWP demodulation, one would have T=0 for the cos-modulated
and sin-modulated timestreams, for example.
``from_xieta(xi, eta, Q=[1,0], U=[0,1])``
Construct the FocalPlane with explicit Q and U responsivity.
This example is equivalent to example 1.
Usually one would either use gamma,P or Q,U. If they are
combined, then ``gamma_total = gamma + arctan2(U,Q)/2`` and
Expand Down

0 comments on commit 6dba368

Please sign in to comment.