aboutsummaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
Diffstat (limited to 'astro')
-rwxr-xr-xastro/oskar/wsclean.py3
-rwxr-xr-xastro/ps2d.py5
2 files changed, 5 insertions, 3 deletions
diff --git a/astro/oskar/wsclean.py b/astro/oskar/wsclean.py
index 76e9229..511bb70 100755
--- a/astro/oskar/wsclean.py
+++ b/astro/oskar/wsclean.py
@@ -206,6 +206,9 @@ def main():
# Remove the output "-image" since it is identical to "-dirty"
os.remove(nameprefix+"-image.fits")
+ if logfile:
+ logfile.close()
+
if __name__ == "__main__":
main()
diff --git a/astro/ps2d.py b/astro/ps2d.py
index 27c4328..fd81bef 100755
--- a/astro/ps2d.py
+++ b/astro/ps2d.py
@@ -50,9 +50,8 @@ from matplotlib.figure import Figure
plt.style.use("ggplot")
logging.basicConfig(level=logging.INFO,
- format="%(asctime)s [%(levelname)s] %(message)s",
- datefmt="%H:%M:%S")
-logger = logging.getLogger(os.path.basename(sys.argv[0]))
+ format="[%(levelname)s:%(lineno)d] %(message)s")
+logger = logging.getLogger()
# HI line frequency