aboutsummaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-11-15 16:29:49 +0800
committerAaron LI <aly@aaronly.me>2017-11-15 16:29:49 +0800
commit5dbb18fcc00813bfbbc0e87fc6f95a9b2c58b5fe (patch)
tree7780051ec1a70d1c7ff54e2cda6ad3bd3efa84ca /astro
parent83ef5d503f4c59e4d42cd8f6c70b6e06a3b5da6a (diff)
downloadatoolbox-5dbb18fcc00813bfbbc0e87fc6f95a9b2c58b5fe.tar.bz2
jybeam2k.py & wsclean.py: Update descriptions/comments
Diffstat (limited to 'astro')
-rwxr-xr-xastro/oskar/jybeam2k.py2
-rwxr-xr-xastro/oskar/wsclean.py20
2 files changed, 12 insertions, 10 deletions
diff --git a/astro/oskar/jybeam2k.py b/astro/oskar/jybeam2k.py
index 5fcc383..76072e3 100755
--- a/astro/oskar/jybeam2k.py
+++ b/astro/oskar/jybeam2k.py
@@ -80,7 +80,7 @@ def main():
raise ValueError("--frequency required")
print("Frequency: %.2f [MHz]" % freq)
- # beam size
+ # Elliptical Gaussian beam (full width at half power; FWHP)
bmajor = header["BMAJ"] * 3600 # [arcsec]
bminor = header["BMIN"] * 3600 # [arcsec]
beam = np.pi * bmajor*bminor / (4*np.log(2)) # [arcsec^2]
diff --git a/astro/oskar/wsclean.py b/astro/oskar/wsclean.py
index 16abeea..05899b4 100755
--- a/astro/oskar/wsclean.py
+++ b/astro/oskar/wsclean.py
@@ -36,13 +36,14 @@ def wsclean(args, dryrun=False):
def main():
parser = argparse.ArgumentParser(
description="Run WSClean with more handy arguments")
- parser.add_argument("-n", "--dry-run", dest="dryrun", action="store_true",
- help="do not actually run WSClean")
parser.add_argument("-a", "--args", dest="args",
- help="additional arguments for WSClean " +
- "(in a quoted string separated by space)")
+ help="additional arguments for WSClean, " +
+ "in a quoted string separated by space, e.g.," +
+ "' -simulate-noise 0.001' (NOTE the beginning space!)")
parser.add_argument("-d", "--dirty", dest="dirty", action="store_true",
help="only create dirty images (by setting niter=0)")
+ parser.add_argument("-n", "--dry-run", dest="dryrun", action="store_true",
+ help="do not actually run WSClean")
parser.add_argument("--update-model", dest="update_model",
action="store_true",
help="write/update the MODEL_DATA column in MS")
@@ -51,12 +52,13 @@ def main():
help="save gridded weights in <name>-weights.fits")
parser.add_argument("--save-uv", dest="save_uv",
action="store_true",
- help="save gridded uv in <name>-uv-{real,imag}.fits")
+ help="save gridded uv plane (i.e., FFT of the " +
+ "residual image) in <name>-uv-{real,imag}.fits")
parser.add_argument("--uv-range", dest="uv_range", default=":",
help="uv range [lambda] (i.e., baseline lengths) " +
"used for imaging; syntax: '<min>:<max>' " +
"(default: ':', i.e., all uv/baselines)")
- parser.add_argument("-w", "--weight", dest="weight", default="briggs",
+ parser.add_argument("-w", "--weight", dest="weight", default="uniform",
choices=["uniform", "natural", "briggs"],
help="weighting method (default: 'briggs')")
parser.add_argument("-B", "--briggs", dest="briggs",
@@ -64,9 +66,9 @@ def main():
help="Briggs robustness parameter (default: 0); " +
"-1 (uniform) -> 1 (natural)")
parser.add_argument("-#", "--niter", dest="niter",
- type=int, default=100000,
+ type=int, default=200000,
help="maximum number of CLEAN iterations " +
- "(default: 100,000)")
+ "(default: 200,000)")
parser.add_argument("--gain", dest="gain", type=float, default=0.1,
help="CLEAN gain for each minor iteration " +
"(default: 0.1)")
@@ -121,7 +123,7 @@ def main():
elif args.weight == "briggs":
cmdargs += ["-weight", "briggs", args.briggs]
else:
- cmdargs += ["-weight", args.weight]
+ cmdargs += ["-weight", args.weight] # natural
cmdargs += ["-gain", args.gain]
cmdargs += ["-mgain", args.mgain]
cmdargs += ["-size", args.size, args.size]