Browse Source

Updated python to use (through env)

polconvert
Jops 3 years ago
parent
commit
81031bf8d6
  1. 2
      antabfs_interpolate.py
  2. 2
      antabfs_nominal.py
  3. 2
      expname.py
  4. 6
      flag_weights.py
  5. 2
      multiphase_sfxc2ms.py
  6. 2
      polswap.py
  7. 2
      split_vexfile.py
  8. 2
      ysfocus.py

2
antabfs_interpolate.py

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
description = """
Given an ANTAB file, it creates a new one with more Tsys values that are interpolated from the
given ones. This will fill gaps when the time separation between Tsys measurements is too long

2
antabfs_nominal.py

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
"""
Python port of Bob Campbell's IDL script to make nominal tsys tables.
It takes the nominal SEFD values from the sefd_values.txt table and generates an ANTAB file using

2
expname.py

@ -1,4 +1,4 @@
#! /usr/bin/python
#! /usr/bin/env python3
"""Change the name of an project in a measurement set (MS).
Usage: expname.py <msdata> <new_expname>

6
flag_weights.py

@ -1,4 +1,4 @@
#! /usr/bin/python
#!/usr/bin/env python3
"""
Flag visibilities with weights below the provided threshold.
@ -75,14 +75,14 @@ with pt.table(msdata, readonly=False, ack=False) as ms:
indexes = np.where(weights < threshold)
indexes2 = np.where((weights < threshold) & (weights > 0.0))
print('Got {0:9} bad points'.format(indexes[0].size))
print('{0:04.3}% of the total visibilities to flag\n'.format(100.0*indexes[0].size/weights.size))
print('{0:04.3}% of the total visibilities to flag'.format(100.0*indexes[0].size/weights.size))
print('{0:04.3}% of actual data (non-zero) to flag\n'.format(100.0*indexes2[0].size/weights.size))
if verbose:
weights[indexes] = -np.abs(weights[indexes])
ms.putcol("WEIGHT", weights)
print('Done.')
else:
rint('Flag has not been applied.')
print('Flag has not been applied.')
ms.close()

2
multiphase_sfxc2ms.py

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
"""Takes the default {exp}_sfxc2ms.sh file produced by the sfxc2ms.pl script and adds the _SRCname to the .cor files.
Generates different {exp}_sfxc2ms_SRCname.sh files for the different phase centers (detailed in SRCname).

2
polswap.py

@ -1,4 +1,4 @@
#! /usr/bin/python3
#! /usr/bin/env python3
"""
Swap polarizations for specified antennas and for a specific timerange.

2
split_vexfile.py

@ -1,4 +1,4 @@
#! /usr/bin/python3
#!/usr/bin/env python3
"""
Given a VEX file, it creates a new VEX file that is a subset of the given one,
dropping all the information (stations, source, PI names) that are not included

2
ysfocus.py

@ -1,4 +1,4 @@
#! /usr/bin/python
#!/usr/bin/env python3
"""
Change the MOUNT field in the ANTENNA table for Ys to 'ALT-AZ-NASMYTH-RH'.
It allows tConvert to put MNTSTA=4 into the FITS AN table, to handle the

Loading…
Cancel
Save