-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Focal plane visualizer and detector file generator (#345)
* add plot_fp.py * ask duration_yr * CHANGELOG.md: Add entry for plot_fp.py implementation and its functionality * update README * add plot.fp.rst in docs * docs: Improve formatting and clarity in plot_fp.rst * Fix the formatting to make ruff happy --------- Co-authored-by: Yusuke Takase <[email protected]> Co-authored-by: Maurizio Tomasi <[email protected]>
- Loading branch information
1 parent
dd4c0bf
commit e7b14ea
Showing
5 changed files
with
416 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.. _plot_fp: | ||
|
||
Focal plane visualization | ||
=========== | ||
|
||
We can visualize detectors in the focal plane by: | ||
|
||
.. code-block:: text | ||
python -m litebird_sim.plot_fp | ||
This software loads the IMo, which is installed on the machine you are using. | ||
As the conversation unfolds, an interactive Matplotlib window will appear. | ||
|
||
Detectors corresponding to the specified channels are represented as blue dots. | ||
Clicking on a dot reveals the `DetectorInfo` for that detector in real time, highlighted with a red star. | ||
|
||
Additionally, if you agree during the conversation to generate a detector file, | ||
a list of starred detectors will be saved into a text file at the designated location after you close the plot. | ||
|
||
The format of the detector file is as follows: | ||
|
||
+------------+---------+---------+------------+------------+-----------------------+ | ||
| Telescope | Channel | IMO_NET | Number_det | Scaled_NET | Detector_name | | ||
+------------+---------+---------+------------+------------+-----------------------+ | ||
| LFT | L1-040 | 114.63 | 2/48 | 13.51 | `000_003_003_UB_040_T`| | ||
+------------+---------+---------+------------+------------+-----------------------+ | ||
| LFT | L1-040 | 114.63 | 2/48 | 13.51 | `000_003_003_UB_040_B`| | ||
+------------+---------+---------+------------+------------+-----------------------+ | ||
|
||
The description of each column is as follows: | ||
|
||
- `Telescope`: The telescope name. | ||
- `Channel`: The channel name. | ||
- `IMO_NET`: The NET of the detector in IMo. | ||
- `Number_det`: :math:`N_{\text{selected}}/N_{\text{total}}` where :math:`N_{\text{selected}}` is the number of selected detectors by clicking and :math:`N_{\text{total}}` is the total number of detectors in the channel. | ||
- `Scaled_NET`: The scaled NET of the detectors is given by the following equation: | ||
|
||
.. math:: | ||
\text{Scaled NET} = \text{NET}_{\text{IMO}} \sqrt{\frac{t_{\text{obs}}}{3} \frac{N_{\text{selected}}}{N_{\text{total}}}} | ||
where :math:`t_{\text{obs}}` is the observation time in years that you can specify in the conversation. The factor of 3 is the nominal observation time in years. | ||
- `Detector_name`: The detector name. |
Oops, something went wrong.