Skip to content

Commit

Permalink
fix extract_locit.py and locit.py documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vsmagalhaes committed Nov 13, 2024
1 parent a8f79d2 commit 4a31975
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/astrohack/extract_locit.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ def extract_locit(
**Examples**
- `locit_mds = extract_locit("myphase.cal", locit_name="myphase.locit.zarr")` -> Extract phase calibration data for
- `locit_mds = extract_locit("myphase.cal", locit_name="myphase.locit.zarr")` -> Extract phase calibration data for \
all antennas and all DDIs in "myphase.cal" into a locit file called "myphase.locit.zarr"
- `locit_mds = extract_locit("myphase.cal", ant=["ea06", "ea03", "ea25"], DDI=0, overwrite=True) -> Extract phase
calibration data for DDI 0 of antennas ea06, ea03 and ea25 in "myphase.cal" into a locit file called
- `locit_mds = extract_locit("myphase.cal", ant=["ea06", "ea03", "ea25"], DDI=0, overwrite=True)` -> Extract phase \
calibration data for DDI 0 of antennas ea06, ea03 and ea25 in "myphase.cal" into a locit file called \
"myphase.locit.zarr" that will be overwritten if already present.
"""
# Doing this here allows it to get captured by locals()
Expand Down
16 changes: 8 additions & 8 deletions src/astrohack/locit.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def locit(
'linear algebra' and a newer more pythonic engine using scipy curve fitting capabilities, which we call
scipy, more details below.
* linear algebra: This fitting engine is based on the least square methods for solving linear systems,
this engine is fast, about one order of magnitude faster than scipy, but may fail to
* linear algebra: This fitting engine is based on the least square methods for solving linear systems, \
this engine is fast, about one order of magnitude faster than scipy, but may fail to \
converge, also its uncertainties may be underestimated.
* scipy: This fitting engine uses the well established scipy.optimize.curve_fit routine. This engine is
* scipy: This fitting engine uses the well established scipy.optimize.curve_fit routine. This engine is \
slower than the linear algebra engine, but it is more robust with better estimated uncertainties.
.. rubric:: Choosing a polarization
Expand All @@ -127,18 +127,18 @@ def locit(
two DDIs by computing the delays from the difference in phases between the two DDIs of different frequencies
(combine_ddis='difference').
combine_ddis='simple' : Generates higher antenna position correction solutions of higher SNR as more data is used
each delay fit.
combine_ddis='simple' : Generates higher antenna position correction solutions of higher SNR as more data is \
used in each delay fit.
combine_ddis='no' : Useful for detecting systematic differences between different DDIs.
combine_ddis='difference' : This method is useful for cases where phase wrapping may have occurred due to large
combine_ddis='difference' : This method is useful for cases where phase wrapping may have occurred due to large \
delays.
**Examples**
- `position_mds = locit("myphase.locit.zarr", polarization='R', combine_ddis='simple')` -> Fit the phase delays in
- `position_mds = locit("myphase.locit.zarr", polarization='R', combine_ddis='simple')` -> Fit the phase delays in \
"myphase.locit.zarr" for all antennas by combining the delays from all DDIs but using only the 'R' polarization.
- `position_mds = locit("myphase.locit.zarr", combine_ddis='difference', elevation_limit=30.0)` -> Fit the phase
- `position_mds = locit("myphase.locit.zarr", combine_ddis='difference', elevation_limit=30.0)` -> Fit the phase \
difference delays in "myphase.locit.zarr" for all antennas but only using sources above 30 degrees elevation.
"""

Expand Down

0 comments on commit 4a31975

Please sign in to comment.