def __init__(self, opt): self.log = create_logger(__name__, silent=False, to_disk=True, log_file=cfg.log_filename) self.w2i_dict, self.i2w_dict = load_dict() self.train_data = DataIter(opt.train_data, self.w2i_dict) cfg.vocab_size = len(self.w2i_dict) opt.vocab_size = cfg.vocab_size self.opt = opt self.show_config()
# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # import CALIB import argparse from helpers import create_logger, check_donemark uuid = create_logger() parser = argparse.ArgumentParser(description="Calibrate gains.") parser.add_argument("-m", "--ms", required=True, help="Input measurement set") parser.add_argument("-b", "--beamsize", type=lambda s: [int(item) for item in s.split(',')], required=True, help="List of beam sizes in arcsec") parser.add_argument("-f", "--fov", required=True, help="Field of view", type=float) parser.add_argument("-o", "--outdir", required=True, help="Output directory") parser.add_argument("-x", "--donemark_input", required=False, help="Input donemark dependency. (not required)") args = parser.parse_args() if args.donemark_input: check_donemark(args.donemark_input) for beamsize in args.beamsize: CALIB.wsclean_image(ms=args.ms,
# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # import CALIB import argparse from helpers import create_logger create_logger() parser = argparse.ArgumentParser( description="Generate sky model for calibrator or get from gsm for target." ) parser.add_argument("-m", "--ms", required=True, help="Measurement set with source name in meta data.") parser.add_argument("-o", "--outfile", required=True, help="Filename of the output skymodel.") parser.add_argument("-c", "--calib", action='store_true',