Skip to content

Commit ccb4c85

Browse files
committed
Fixed syntax for code blocks
1 parent bb2abcf commit ccb4c85

2 files changed

Lines changed: 28 additions & 21 deletions

File tree

docs/AstroHACK_under_a_venv_for_locit.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Obtaining Antenna position Corrections
2-
~~~~~~~~
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33

44
This guide assumes that astrohack was installed in a virtual
55
environment (venv) with the convenience functions as described `here <./Installing-astrohack-in-a-virtual-environment>`_
@@ -12,7 +12,7 @@ The first step in the data reduction is to download the scripts to be
1212
used in the data reduction process, this can be done by using one of the
1313
convenience functions created by the installation script:
1414

15-
.. code-block:: bash
15+
.. code-block:: sh
1616
1717
$ get_locit_scripts
1818
@@ -38,14 +38,14 @@ This script contains a basic command line interface to control its
3838
parameters, because of this it must be run in CASA in the command line
3939
mode, i.e.:
4040

41-
.. code-block:: bash
41+
.. code-block:: sh
4242
4343
$ casa -c pre_locit_script.py -h
4444
4545
The output of the pre_locit_script.py script called with the **-h** flag
4646
is the help which should look like this:
4747

48-
.. code-block:: bash
48+
.. code-block::
4949
5050
$ casa -c pre_locit_script.py baseline.ms teste1 -h
5151
@@ -91,7 +91,7 @@ will throw an error before executing any CASA step.
9191

9292
A typical execution call will look like this:
9393

94-
.. code-block:: bash
94+
.. code-block:: sh
9595
9696
$ casa -c pre_locit_script.py my_dl_asdm baseline-241125
9797
@@ -108,13 +108,14 @@ Running exec_locit.py
108108
For running **exec_locit.py** we need to first activate the astrohack
109109
venv:
110110

111-
.. code-block:: bash
111+
.. code-block:: sh
112+
112113
$ activate_astrohack
113114
114115
With the venv activated we can then call **exec_locit.py** with the **-h**
115116
flag to have a look at its help:
116117

117-
.. code-block:: bash
118+
.. code-block::
118119
119120
$ python exec_locit.py -h
120121
usage: exec_locit.py [-h] [-d] [-a ANTENNAS] [-c COMBINATION] [-p POLARIZATION] [-k] [-e ELEVATION_LIMIT] [-f FIT_ENGINE] caltable
@@ -154,9 +155,9 @@ few antennas for which we want antenna position corrections and that
154155
we want to combine the spectral windows using the phase difference
155156
between them.
156157

157-
.. code-block:: bash
158+
.. code-block:: sh
158159
159-
$ python exec_locit.py baseline-241125-pha.cal -a 'ea06,ea13,ea27' -c difference
160+
python exec_locit.py baseline-241125-pha.cal -a 'ea06,ea13,ea27' -c difference
160161
161162
162163
Exporting results to parminator
@@ -167,7 +168,7 @@ to a parminator file by calling the **export_to_parminator.py** script.
167168
Like the other scripts it has a help that can be accessed with the
168169
**-h** flag:
169170

170-
.. code-block:: bash
171+
.. code-block::
171172
172173
$ python export_to_parminator.py -h
173174
usage: export_to_parminator.py [-h] [-t CORRECTION_THRESHOLD] [-a ANTENNAS] position_file parminator_file
@@ -191,9 +192,9 @@ Like the other scripts it has a help that can be accessed with the
191192
192193
A typical call to **export_to_parminator.py** shall look like this:
193194

194-
.. code-block:: bash
195+
.. code-block:: sh
195196
196-
$ python export_to_parminator.py baseline-241125.position.zarr 241125-baseline.par -t 0.05 -a 'ea13,ea27'
197+
$ python export_to_parminator.py baseline-241125.position.zarr 241125-baseline.par -t 0.05 -a 'ea13,ea27'
197198
198199
In this call we have chosen a threshold for corrections of 5 cm and to
199200
only export corrections for antennas ea13 and ea27 which will be

docs/astrohack_installation.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,24 @@ python supported by astrohack. A fresh environment is recommended as
2323
to avoid conflicting dependencies with other packages. To create such
2424
an environment:
2525

26-
.. code-block:: bash
26+
.. code-block:: sh
27+
2728
$ conda create --name astrohack python=3.12 --no-default-packages
2829
$ conda activate astrohack
2930
3031
On macos it is required to pre-install `python-casacore
3132
<https://github.com/casacore/python-casacore>`_, before installing
3233
astrohack:
3334

34-
.. code-block:: bash
35+
.. code-block:: sh
36+
3537
$ conda install -c conda-forge python-casacore
3638
3739
Astrohack is not yet available for download directly from conda-forge,
3840
therefore we suggest to install astrohack by using pip:
3941

40-
.. code-block:: bash
42+
.. code-block:: sh
43+
4144
$ pip install astrohack
4245
4346
It is also possible to install astrohack from source by downloading
@@ -46,7 +49,8 @@ the `source code
4649
directly from github. With the zip extracted you can then navigate to
4750
the root directory and make a local pip installation:
4851

49-
.. code-block:: bash
52+
.. code-block:: sh
53+
5054
$ cd <Astrohack_root_dir>
5155
$ pip install -e .
5256
@@ -72,7 +76,7 @@ The installation script can be downloaded `here
7276
run the installation script it is necessary to make it executable, and
7377
then it can be executed:
7478

75-
.. code-block:: bash
79+
.. code-block:: sh
7680
7781
$ chmod u+x astrohack_install.sh
7882
$ ./astrohack_install.sh
@@ -96,7 +100,7 @@ convenience functions.
96100
When the installation is done the user can check that it worked by
97101
invoking the environment:
98102

99-
.. code-block:: bash
103+
.. code-block:: sh
100104
101105
$ activate_astrohack
102106
@@ -112,7 +116,7 @@ If the installation happened without any problems the user will see no
112116
error messages. To exit the venv the user should use the deactivate
113117
command:
114118

115-
.. code-block:: bash
119+
.. code-block:: sh
116120
117121
$ deactivate
118122
@@ -127,14 +131,16 @@ functionalities and/or bug fixes. To update astrohack it is necessary
127131
to first get into the venv and then we can call pip to update
128132
astrohack:
129133

130-
.. code-block:: bash
134+
.. code-block:: sh
135+
131136
$ activate_astrohack
132137
$ pip install astrohack --upgrade
133138
134139
If the user is not going to use astrohack straight away it is
135140
recommended to deactivate the venv after doing the update:
136141

137-
.. code-block:: bash
142+
.. code-block:: sh
143+
138144
$ deactivate
139145
140146
Installation or execution problems

0 commit comments

Comments
 (0)