Skip to content

Commit

Permalink
Tryout memdir
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecThomson committed Aug 25, 2024
1 parent e9fba21 commit 0dc4b18
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arrakis/linmos.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from typing import Dict, List
from typing import NamedTuple as Struct
from typing import Optional, Tuple
from shutil import copyfile

import astropy.units as u
import numpy as np
Expand Down Expand Up @@ -204,6 +205,14 @@ def genparset(

if holofile is not None:
logger.info(f"Using holography file {holofile} -- setting removeleakge to true")
mem_dir = os.getenv("MEMDIR", None)
if mem_dir is not None:
logger.info(f"Copying holography file to {mem_dir}")
mem_path = Path(mem_dir)
holo_copy = mem_path / holofile.name
if not holo_copy.exists():
copyfile(holofile, holo_copy)
holofile = holo_copy

parset += f"""
linmos.primarybeam = ASKAP_PB
Expand Down

0 comments on commit 0dc4b18

Please sign in to comment.