-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Morris
committed
Oct 9, 2024
1 parent
0ee4aae
commit a103287
Showing
21 changed files
with
251 additions
and
147 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -9,4 +9,5 @@ Usage | |
usage/sites.rst | ||
usage/plans.rst | ||
usage/simulations.rst | ||
usage/tods.rst | ||
usage/mapping.rst |
This file contains 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 |
---|---|---|
@@ -1,36 +1,8 @@ | ||
####### | ||
======= | ||
Mapping | ||
####### | ||
======= | ||
|
||
We can map a ``TOD`` (or several of them) with a ``Mapper``. The simplest possible mapper just bins the data: | ||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
.. code-block:: python | ||
from maria.map.mappers import BinMapper | ||
mapper = BinMapper(center=(150, 10), | ||
frame="ra_dec", | ||
width=1e0, | ||
height=1e0, | ||
resolution=5e-3, | ||
tod_preprocessing={ | ||
"window": {"tukey": {"alpha": 0.1}}, | ||
"remove_modes": {"n": 1}, | ||
"filter": {"f_lower": 0.01}, | ||
"despline": {"knot_spacing": 5}, | ||
}, | ||
map_postprocessing={ | ||
"gaussian_filter": {"sigma": 1}, | ||
"median_filter": {"size": 1}, | ||
}, | ||
units="K_RJ", | ||
tods=[tod], | ||
) | ||
output_map = mapper.run() | ||
where we define the preprocessing to be done on the ``TOD``. We can see the output with | ||
|
||
.. code-block:: python | ||
output_map.plot() | ||
mapping/index.rst |
This file contains 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,36 @@ | ||
####### | ||
Mapping | ||
####### | ||
|
||
We can map a ``TOD`` (or several of them) with a ``Mapper``. The simplest possible mapper just bins the data: | ||
|
||
.. code-block:: python | ||
from maria.map.mappers import BinMapper | ||
mapper = BinMapper(center=(150, 10), | ||
frame="ra_dec", | ||
width=1e0, | ||
height=1e0, | ||
resolution=5e-3, | ||
tod_preprocessing={ | ||
"window": {"tukey": {"alpha": 0.1}}, | ||
"remove_modes": {"n": 1}, | ||
"filter": {"f_lower": 0.01}, | ||
"despline": {"knot_spacing": 5}, | ||
}, | ||
map_postprocessing={ | ||
"gaussian_filter": {"sigma": 1}, | ||
"median_filter": {"size": 1}, | ||
}, | ||
units="K_RJ", | ||
tods=[tod], | ||
) | ||
output_map = mapper.run() | ||
where we define the preprocessing to be done on the ``TOD``. We can see the output with | ||
|
||
.. code-block:: python | ||
output_map.plot() |
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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,8 @@ | ||
==== | ||
TODs | ||
==== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
tods/index.rst |
This file contains 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,47 @@ | ||
#### | ||
TODs | ||
#### | ||
|
||
The result of a simulation is a ``TOD``, which encapsulates the generated time-ordered data (and all metadata, like the pointing coordinates). | ||
The overall signal in the | ||
|
||
|
||
.. code-block:: python | ||
tod.plot() | ||
It has a few useful features. We can see what our data looks like with | ||
|
||
.. code-block:: python | ||
tod.plot() | ||
========== | ||
Components | ||
========== | ||
|
||
The total signal in each detector can be accessed as | ||
|
||
.. code-block:: python | ||
tod.signal # returns an array | ||
which is the sum of all of the simulated fields (e.g. noise, atmosphere, CMB) separately, contributing to the incident power. For convenience, we can also access the individual fields as | ||
|
||
.. code-block:: python | ||
tod.get_field("atmosphere") # returns an array | ||
We can see all the available fields with ``tod.fields``. | ||
|
||
|
||
===== | ||
Units | ||
===== | ||
|
||
TODs are by default in units of picowatts, but we can convert to any unit that is a combination of an SI prefix and a base unit (one of `K_RJ`, `K_CMB`, or `W`). | ||
|
||
.. code-block:: python | ||
tod_in_rj_units = tod.to(units="mK_RJ") | ||
tod_in_cmb_units = tod.to(units="uK_CMB") |
This file contains 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 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 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 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 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 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 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 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.